diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1bc35694835e2..1822a5b802b55 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -25,11 +25,11 @@ # PRLabel: %Storage /sdk/storage/ @amishra-dev @zezha-msft @annatisch @rakshith91 @xiafu-msft @tasherif-msft @kasobol-msft -/sdk/applicationinsights/ @alexeldeib +/sdk/applicationinsights/ @alexeldeib # PRLabel: %Batch /sdk/batch/ @bgklein @xingwu1 -/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish +/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish # PRLabel: %KeyVault /sdk/keyvault/ @schaabs @chlowell @iscai-msft @@ -52,7 +52,7 @@ # PRLabel: %Data Factory /sdk/datafactory/ @hvermis -/sdk/datalake/ @ro-joowan +/sdk/datalake/ @ro-joowan /sdk/datadatamigration/ @vchske # PRLabel: %Event Grid @@ -88,6 +88,9 @@ # PRLabel: %Cognitive - Form Recognizer /sdk/formrecognizer/ @kristapratico @iscai-msft @rakshith91 +# PRLabel: %Tables +/sdk/tables/ @seankane-msft + # Smoke Tests /common/smoketest/ @lmazuel @chlowell @annatisch @rakshith91 @shurd @southpolesteve diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 07730d27fdbb5..057ab8c913b1e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -111,6 +111,10 @@ Mypy install and run. **Example: Invoke tox, breaking into the debugger on failure** `tox -e whl -c ../../../eng/tox/tox.ini -- --pdb` +### More Reading + +We maintain an [additional document](doc/eng_sys_checks.md) that has a ton of detail as to what is actually _happening_ in these executions. + ### Dev Feed Daily dev build version of Azure sdk packages for python are available and are uploaded to Azure devops feed daily. We have also created a tox environment to test a package against dev built version of dependent packages. Below is the link to Azure devops feed. [`https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-python`](https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-python) diff --git a/README.md b/README.md index bb4e912af729a..3f390f79ffa82 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Packages](https://img.shields.io/badge/packages-latest-blue.svg)](https://azure.github.io/azure-sdk/releases/latest/python.html) [![Dependencies](https://img.shields.io/badge/dependency-report-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-python/dependencies/dependencies.html) [![DepGraph](https://img.shields.io/badge/dependency-graph-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-python/dependencies/InterdependencyGraph.html) [![Python](https://img.shields.io/pypi/pyversions/azure-core.svg?maxAge=2592000)](https://pypi.python.org/pypi/azure/) [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/python/python%20-%20core%20-%20ci?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=458&branchName=master) -This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our [public developer docs](https://docs.microsoft.com/en-us/python/azure/) or our versioned [developer docs](https://azure.github.io/azure-sdk-for-python). +This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our [public developer docs](https://docs.microsoft.com/python/azure/) or our versioned [developer docs](https://azure.github.io/azure-sdk-for-python). ## Getting started diff --git a/SECURITY.md b/SECURITY.md index 926b8ae4059a7..dec3d3b7013b5 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. ## Reporting Security Issues @@ -12,7 +12,7 @@ If you believe you have found a security vulnerability in any Microsoft-owned re Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). @@ -36,6 +36,6 @@ We prefer all communications to be in English. ## Policy -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd). diff --git a/common/smoketest/key_vault_base.py b/common/smoketest/key_vault_base.py index 38fe851d79229..9ed79f2e1fb20 100644 --- a/common/smoketest/key_vault_base.py +++ b/common/smoketest/key_vault_base.py @@ -1,17 +1,22 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ import os -from azure.identity import DefaultAzureCredential, KnownAuthorities +from azure.identity import AzureAuthorityHosts, DefaultAzureCredential + class KeyVaultBase: credential_type = DefaultAzureCredential host_alias_map = { - 'AzureChinaCloud': KnownAuthorities.AZURE_CHINA, - 'AzureGermanCloud': KnownAuthorities.AZURE_GERMANY, - 'AzureUSGovernment': KnownAuthorities.AZURE_GOVERNMENT, - 'AzureCloud': KnownAuthorities.AZURE_PUBLIC_CLOUD, + "AzureChinaCloud": (AzureAuthorityHosts.AZURE_CHINA, "2016-10-01"), + "AzureGermanCloud": (AzureAuthorityHosts.AZURE_GERMANY, "2016-10-01"), + "AzureUSGovernment": (AzureAuthorityHosts.AZURE_GOVERNMENT, "2016-10-01"), + "AzureCloud": (AzureAuthorityHosts.AZURE_PUBLIC_CLOUD, "7.1"), } - # Instantiate a default credential based on the credential_type - def get_default_credential(self, authority_host_alias=None): - alias = authority_host_alias or os.environ.get("AZURE_CLOUD") - authority_host = self.host_alias_map.get(alias, KnownAuthorities.AZURE_PUBLIC_CLOUD) - return self.credential_type(authority=authority_host) + def get_client_args(self, authority_host_alias=None): + alias = authority_host_alias or os.environ.get("AZURE_CLOUD", "AzureCloud") + authority_host, api_version = self.host_alias_map[alias] + credential = self.credential_type(authority=authority_host) + return {"api_version": api_version, "credential": credential, "vault_url": os.environ["AZURE_PROJECT_URL"]} diff --git a/common/smoketest/key_vault_base_async.py b/common/smoketest/key_vault_base_async.py index c6f25493c2ca3..c25bc90514344 100644 --- a/common/smoketest/key_vault_base_async.py +++ b/common/smoketest/key_vault_base_async.py @@ -1,5 +1,10 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ from key_vault_base import KeyVaultBase from azure.identity.aio import DefaultAzureCredential + class KeyVaultBaseAsync(KeyVaultBase): credential_type = DefaultAzureCredential \ No newline at end of file diff --git a/common/smoketest/key_vault_certificates.py b/common/smoketest/key_vault_certificates.py index b9c21a9ffce8f..dde2dc898a289 100644 --- a/common/smoketest/key_vault_certificates.py +++ b/common/smoketest/key_vault_certificates.py @@ -2,19 +2,15 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -import os import uuid from azure.keyvault.certificates import CertificateClient, CertificatePolicy from key_vault_base import KeyVaultBase + class KeyVaultCertificates(KeyVaultBase): def __init__(self): - - credential = self.get_default_credential() - self.certificate_client = CertificateClient( - vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential - ) - + args = self.get_client_args() + self.certificate_client = CertificateClient(**args) self.certificate_name = "cert-name-" + uuid.uuid1().hex def create_certificate(self): diff --git a/common/smoketest/key_vault_certificates_async.py b/common/smoketest/key_vault_certificates_async.py index fae70305e9ced..6c5b5e5e3043e 100644 --- a/common/smoketest/key_vault_certificates_async.py +++ b/common/smoketest/key_vault_certificates_async.py @@ -2,19 +2,16 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -import os import uuid from azure.keyvault.certificates import CertificatePolicy from azure.keyvault.certificates.aio import CertificateClient from key_vault_base_async import KeyVaultBaseAsync + class KeyVaultCertificates(KeyVaultBaseAsync): def __init__(self): - credential = self.get_default_credential() - self.certificate_client = CertificateClient( - vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential - ) - + args = self.get_client_args() + self.certificate_client = CertificateClient(**args) self.certificate_name = "cert-name-" + uuid.uuid1().hex async def create_certificate(self): diff --git a/common/smoketest/key_vault_keys.py b/common/smoketest/key_vault_keys.py index dc712ee82a6f6..d7b22af18004b 100644 --- a/common/smoketest/key_vault_keys.py +++ b/common/smoketest/key_vault_keys.py @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -import os import uuid from azure.keyvault.keys import KeyClient from key_vault_base import KeyVaultBase @@ -10,11 +9,8 @@ class KeyVaultKeys(KeyVaultBase): def __init__(self): - credential = self.get_default_credential() - self.key_client = KeyClient( - vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential - ) - + args = self.get_client_args() + self.key_client = KeyClient(**args) self.key_name = "key-name-" + uuid.uuid1().hex def create_rsa_key(self): diff --git a/common/smoketest/key_vault_keys_async.py b/common/smoketest/key_vault_keys_async.py index 071470f2b4f4a..d63c056fbe96f 100644 --- a/common/smoketest/key_vault_keys_async.py +++ b/common/smoketest/key_vault_keys_async.py @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -import os import uuid from azure.keyvault.keys.aio import KeyClient from key_vault_base_async import KeyVaultBaseAsync @@ -10,12 +9,8 @@ class KeyVaultKeys(KeyVaultBaseAsync): def __init__(self): - - credential = self.get_default_credential() - self.key_client = KeyClient( - vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential - ) - + args = self.get_client_args() + self.key_client = KeyClient(**args) self.key_name = "key-name-" + uuid.uuid1().hex async def create_rsa_key(self): diff --git a/common/smoketest/key_vault_secrets.py b/common/smoketest/key_vault_secrets.py index 1340b546399a5..6751c7ad6b33c 100644 --- a/common/smoketest/key_vault_secrets.py +++ b/common/smoketest/key_vault_secrets.py @@ -2,18 +2,15 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -import os import uuid from azure.keyvault.secrets import SecretClient from key_vault_base import KeyVaultBase + class KeyVaultSecrets(KeyVaultBase): def __init__(self): - credential = self.get_default_credential() - self.secret_client = SecretClient( - vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential - ) - + args = self.get_client_args() + self.secret_client = SecretClient(**args) self.secret_name = "secret-name-" + uuid.uuid1().hex self.secret_Value = "secret-value" diff --git a/common/smoketest/key_vault_secrets_async.py b/common/smoketest/key_vault_secrets_async.py index 807a93d1d1985..c054b0a67b8d6 100644 --- a/common/smoketest/key_vault_secrets_async.py +++ b/common/smoketest/key_vault_secrets_async.py @@ -2,17 +2,15 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -import os import uuid from azure.keyvault.secrets.aio import SecretClient from key_vault_base_async import KeyVaultBaseAsync + class KeyVaultSecrets(KeyVaultBaseAsync): def __init__(self): - credential = self.get_default_credential() - self.secret_client = SecretClient( - vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential - ) + args = self.get_client_args() + self.secret_client = SecretClient(**args) self.secret_name = "secret-name-" + uuid.uuid1().hex self.secret_value = "secret-value" diff --git a/doc/README.md b/doc/README.md index 0756c6aecdfe9..b4ecf81e6fd90 100644 --- a/doc/README.md +++ b/doc/README.md @@ -2,4 +2,6 @@ This folder contains some documentations for this repository: The folder structure is the following - [sphinx](./sphinx) : contains the documentation source code for https://azure.github.io/azure-sdk-for-python/ -- [dev](./dev) : contains advanced documentation for _developers_ of SDK (not _consumers_ of SDK) \ No newline at end of file +- [dev](./dev) : contains advanced documentation for _developers_ of SDK (not _consumers_ of SDK) + +The file [eng_sys_checks](eng_sys_checks.md) is a read up as to what a standard `ci.yml` will actually execute. \ No newline at end of file diff --git a/doc/dev/mgmt/generating-integration-test.md b/doc/dev/mgmt/generating-integration-test.md index 98de9892d5358..af07d85ebb3ea 100644 --- a/doc/dev/mgmt/generating-integration-test.md +++ b/doc/dev/mgmt/generating-integration-test.md @@ -123,7 +123,7 @@ now you can run live integration test: pytest -s sdk/attestation/azure-mgmt-attestation ->NOTE: To create service principal, follow instructions here: https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal +>NOTE: To create service principal, follow instructions here: https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal ## Fixing Test diff --git a/doc/dev/mgmt/tests.md b/doc/dev/mgmt/tests.md index 4c41cd5e0f401..5ec93aedec80d 100644 --- a/doc/dev/mgmt/tests.md +++ b/doc/dev/mgmt/tests.md @@ -66,10 +66,10 @@ you must use an OAuth authentication method which gives you a token: Certificate authentication does not allow you to record HTTP queries for testing. -### Get a token with Azure Active Directory user/password. This is considered deprecated and should not be used anymore (https://docs.microsoft.com/en-us/python/azure/python-sdk-azure-authenticate?view=azure-python#mgmt-auth-legacy). +### Get a token with Azure Active Directory user/password. This is considered deprecated and should not be used anymore (https://docs.microsoft.com/python/azure/python-sdk-azure-authenticate?view=azure-python#mgmt-auth-legacy). 1. Connect to the [Azure Classic Portal](https://manage.windowsazure.com/) with your admin account. -2. Create a user in your default AAD https://azure.microsoft.com/en-us/documentation/articles/active-directory-create-users/ +2. Create a user in your default AAD https://azure.microsoft.com/documentation/articles/active-directory-create-users/ **You must NOT activate Multi-Factor Authentication!** 3. Go to Settings - Administrators. 4. Click on *Add* and enter the email of the new user. @@ -89,13 +89,13 @@ credentials = UserPassCredentials( ### Get a token with Active Directory application and service principal Follow this detailed tutorial to set up an Active Directory application and service principal: -https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/ +https://azure.microsoft.com/documentation/articles/resource-group-create-service-principal-portal/ To use the credentials from Python, you need the application ID (a.k.a. client ID), authentication key (a.k.a. client secret), tenant ID and subscription ID from the Azure portal for use in the next step. -[This section of the above tutorial](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal#get-application-id-and-authentication-key) +[This section of the above tutorial](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-create-service-principal-portal#get-application-id-and-authentication-key) describes where to find them (besides the subscription ID, which is in the "Overview" section of the "Subscriptions" blade.) diff --git a/doc/dev/release.md b/doc/dev/release.md index eb61edcef111b..c65dbb72e4b76 100644 --- a/doc/dev/release.md +++ b/doc/dev/release.md @@ -16,11 +16,11 @@ Python packages are uploaded to [PyPI](https://pypi.org/). Once you've uploaded ### Production - Deploy with Azure Dev Ops -To avoid "accidental" pushes to our target repositories, [approval](https://docs.microsoft.com/en-us/azure/devops/pipelines/release/approvals/approvals?view=azure-devops) will be requested directly prior to the final PyPI publish. Reference this [wiki page](https://aka.ms/python-approval-groups) and click on `Release to PyPI Approvers` to add yourself to the group for PyPI publishing. +To avoid "accidental" pushes to our target repositories, [approval](https://docs.microsoft.com/azure/devops/pipelines/release/approvals/approvals?view=azure-devops) will be requested directly prior to the final PyPI publish. Reference this [wiki page](https://aka.ms/python-approval-groups) and click on `Release to PyPI Approvers` to add yourself to the group for PyPI publishing. Instead of a single central pipeline, the python SDK has moved to `service directory` associated build pipelines. These are driven by yml templates at the root of each service folder. [Example for storage service folder.](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/storage/ci.yml#L44) -As an aside, please note that the preview feature `multi-stage pipelines` must be enabled to properly interact with unified pipelines. If you aren't aware, find out how to enable by visiting [this link.](https://docs.microsoft.com/en-us/azure/devops/project/navigation/preview-features?view=azure-devops) +As an aside, please note that the preview feature `multi-stage pipelines` must be enabled to properly interact with unified pipelines. If you aren't aware, find out how to enable by visiting [this link.](https://docs.microsoft.com/azure/devops/project/navigation/preview-features?view=azure-devops) #### Releasing Through Unified Pipelines diff --git a/doc/eng_sys_checks.md b/doc/eng_sys_checks.md new file mode 100644 index 0000000000000..81d8e861af2da --- /dev/null +++ b/doc/eng_sys_checks.md @@ -0,0 +1,196 @@ +# Azure SDK for Python - Engineering System + +There are various tests currently enabled in Azure pipeline for Python SDK and some of them are enabled only for nightly CI checks. We also run some static analysis tool to verify code completeness, security and lint check. + +Check the [contributing guide](../CONTRIBUTING.md#building-and-testing) for an intro to `tox`. + +As a contributor, you will see the build jobs run in two modes: `Nightly Scheduled` and `Pull Request`. + +These utilize the _same build definition_, except that the `nightly` builds run additional, deeper checks that run for a bit longer. + +Example PR build: + +![res/job_snippet.png](res/job_snippet.png) + + - `Analyze` tox envs run during the `Analyze job. + - `Test _` runs PR/Nightly tox envs, depending on context. + +## Analyze Checks +Analyze job in both nightly CI and pull request validation pipeline runs a set of static analysis using external and internal tools. Following are the list of these static analysis. + +#### MyPy +`Mypy` is a static analysis tool that runs type checking of python package. Following are the steps to run `MyPy` locally for a specific package +1. Go to root of the package +2. Execute following command + ```tox -e mypy -c ../../../eng/tox/tox.ini ``` + +#### Pylint +`Pylint` is a static analysis tool to run lint checking. Following are the steps to run `pylint` locally for a specific package. + +1. Go to root of the package. +2. Execute following command + ```tox -e pylint -c ../../../eng/tox/tox.ini``` + + +#### Bandit +`Bandit` is static security analysis tool. This check is triggered for all Azure SDK package as part of analyze job. Following are the steps to `Bandit` tool locally for a specific package. + +1. Got to package root directory. +2. Execute following command + ```tox -e bandit -c ../../../eng/tox/tox.ini``` + + +#### ApiStubGen +`ApiStubGen` is an internal tool used to create API stub to help reviewing public APIs in our SDK package using [`APIViewTool`.](https://apiview.dev/) This tool also has some built in lint checks available and purpose of having this step in analyze job is to ensure any change in code is not impacting stubbing process and also to have more and more custom lint checks added in future. + +#### Change log verification + +Change log verification is added to ensure package has valid change log for current version. Guidelines to properly maintain the change log is documented [here]() + +## PR Validation Checks +Each pull request runs various tests using `pytest` in addition to all the tests mentioned above in analyze check. Pull request validation performs 3 different types of test: `whl, sdist and depends`. Following section explains the purpose of each of these tests and how to execute them locally. All pull requests are validated on multiple python versions across different platforms and below is the test matrix for pull request. + + +|`Python Version`|`Platform` | +|--|--| +|2.7|Linux| +|3.5|Windows| +|3.8|Linux| + +### PR validation tox test environments +Tests are executed using tox environment and following are the tox test names that are part of pull request validation +#### whl +This test installs wheel of the package being tested and runs all tests cases in the package using `pytest`. Following is the command to run this test environment locally. + +1. Go to package root folder on a command line +2. Run following command + ``tox -e whl -c ../../../eng/tox/tox.ini`` + +#### sdist +This test installs sdist of the package being tested and runs all tests cases in the package using `pytest`. Following is the command to run this test environment locally. + +1. Go to package root folder on a command line +2. Run following command + ``tox -e sdist -c ../../../eng/tox/tox.ini`` + +####depends +This test is to ensure all modules in the package being tested can be successfully imported. This is to ensure all package requirement is properly set in setup.py as well as to ensure modules are imported using valid namespace. This test install the package and it's required packages and executes `from import *`. For e.g. `from azure.core import *`. + +Following is the command to run this test environment locally. + +1. Go to package root folder on a command line +2. Run following command + ``tox -e sdist -c ../../../eng/tox/tox.ini`` + + +## Nightly CI Checks + +Nightly continuous integration checks run all tests mentioned above in Analyze and Pull request checks in addition to multiple other tests. Nightly CI checks run on all python versions that are supported by Azure SDK packages across multiple platforms. + +![res/full_matrix.png](res/full_matrix.png) + +Regression also executes: +![res/regression.png](res/regression.png) + +Nightly CI check runs following additional tests to ensure the dependency between a package being developed against released packages to ensure backward compatibility. Following is the explanation of why we need dependency tests to ensure backward compatibility. + +Imagine a situation where package `XYZ` requires another package `ABC` and as per the package requirement of `XYZ`, It should work with any version between 1.0 and 2.0 of package `ABC`. + +Package `XYZ` requires package `ABC` + +As a developer of package `XYZ`, we need to ensure that our package works fine with all versions of ABC as long as it is within package requirement specification. + +Another scenario where regression test( reverse dependency) is required. Let's take same example above and assume we are developers of package `ABC` which is taken as required package by another package `XYZ` + +Package `ABC is required by package `XYZ` + + +As a developer of `ABC`, we need to ensure that any new change in `ABC` is not breaking the use of `XYZ` and hence ensures backward compatibility. + +Let's take few Azure SDK packages instead of dummy names to explain this in a context we are more familiar of. + +Most of the Azure SDK packages require `azure-core` and this requirement is within a range for e.g. `azure-storage-blob` that requires `azure-core >1.0.0, <2.0.0`. So any new change in azure-storage-blob needs to make sure it works fine with all versions of azure-core between 1.0.0 and 2.0.0(Both included). +Similarly any new version of azure-core needs to ensure that it is still compatible with all released package versions which takes azure-core as required package. + +It is lot of combinations if we need to run tests for all released versions within the range of requirement specification. In order to reduce the test matrix and at the same time ensures the quality, we currently run the test using oldest released and latest released packages and skips any version in between. + +Following are the additional tests we run during nightly CI checks. + +####Latest Dependency Test + +This test makes sure that a package being developed works absolutely fine using latest released version of required Azure SDK package as long as there is a released version which satisfies the requirement specification. Workflow of this test is as follows: + +1. Identify if any azure SDK package is marked as required package in setup.py of current package being tested. +Note: Any dependency mentioned only in dev_requirements are not considered to identify dependency. +2. Identify latest released version of required azure sdk package on PyPI +3. Install latest released version of required package instead of dev dependency to package in code repo +4. Install current package that is being tested +5. Run pytest of all test cases in current package + +Tox name of this test is `latestdependency` and steps to manually run this test locally is as follows. +1. Go to package root. For e.g azure-storage-blob or azure-identity +2. Run following command + `Tox –e latestdependency –c ../../../tox/tox.ini` + + +####Oldest Dependency Test + +This test makes sure that a package being developed works absolutely fine using oldest released version of required Azure SDK package as long as there is a released version which satisfies the requirement specification. Workflow of this test is as follows: + +1. Identify if any azure SDK package is marked as required package in setup.py of current package being tested. +Note: Any dependency mentioned only in dev_requirements are not considered to identify dependency. +2. Identify oldest released version of required azure sdk package on PyPI +3. Install oldest released version of required package instead of dev dependency to package in code repo +4. Install current package that is being tested +5. Run pytest of all test cases in current package + +Tox name of this test is `mindependency` and steps to manually run this test locally is as follows. +1. Go to package root. For e.g azure-storage-blob or azure-identity +2. Run following command +`Tox –e mindependency –c ../../../tox/tox.ini` + + +####Regression Test + +As mentioned earlier, regression test or reverse dependency test is added to avoid a regression scenario for customers when any new change is made in a package that is required by other packages. Currently we have only very few Azure SDK packages that are added as required package by other Azure SDK package. As of now, list of these required packages are: +`azure-core` +`azure-eventhub` +`azure-storage-blob` + +Our regression framework automatically finds any such package that is added as required package so this list is not hardcoded. + +We have two different set of regression tests to verify regression scenarios against oldest and latest released dependent packages. +• Regression using latest released dependent package +• Regression using oldest released dependent package + +One main difference between regression tests and forward dependency test( latest and mindependency) is in terms of what test cases are executed as part of the tests. While forward dependency tests executes the test cases in current code repo, regression tests execute the tests that were part of repo at the time of dependent package release. To make it more clear, let's look at an example here. + +Let's assume that we are testing regression for azure-core and this test is for regression against latest released dependent packages. Test will identify all packages that takes azure-core as required package and finds latest released version of those packages. Test framework install currently being developed azure-core and latest released dependent package and runs the test cases in dependent package, for e.g. azure-identity, that were part of repo at the time of releasing depending package. + +Workflow of this test is as follows when running regression for an SDK package. +1. Identify any packages that takes currently being tested package as required package +2. Find latest and oldest released versions of dependent package from PyPI +3. Install currently being developed version of package we are testing regression for. E.g. azure-core +4. Checkout the release tag of dependent package from github +5. Install latest/oldest version of dependent package. For e.g. azure-identity +6. Run test cases within dependent package from checked out branch. + + +Steps to manually run regression test locally: +1. Run below command from your git code repo to generate the wheel of package being developed. Currently we have restricted to have prebuilt wheel. +`./scripts/devops_tasks/build_packages.py --service= -d ` +2. Run below command to start regression test locally +`./scripts/devops_tasks/test_regression.py azure-* --service= --whl-dir=` + + +How to run these additional tests on azure pipelines manually + +Following variables can be set at queueing time in order to run these additional tests which are by default run only for scheduled runs. + +• Latest and oldest dependency test in addition to basic testing +Variable name: `Run.DependencyTest` +Value: true + +• Regression test +Variable name: `Run.Regression` +Value: true diff --git a/doc/res/full_matrix.png b/doc/res/full_matrix.png new file mode 100644 index 0000000000000..7decc5e8cd015 Binary files /dev/null and b/doc/res/full_matrix.png differ diff --git a/doc/res/job_snippet.png b/doc/res/job_snippet.png new file mode 100644 index 0000000000000..e4d7c47a391a5 Binary files /dev/null and b/doc/res/job_snippet.png differ diff --git a/doc/res/regression.png b/doc/res/regression.png new file mode 100644 index 0000000000000..747008591b5a5 Binary files /dev/null and b/doc/res/regression.png differ diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index cc21ada7b0256..ee1371fe01df8 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -48,6 +48,7 @@ known_content_issues: - ['sdk/synapse/azure-synapse-spark/README.md', '#4554'] - ['sdk/synapse/azure-synapse-artifacts/README.md', '#4554'] - ['sdk/synapse/azure-synapse-nspkg/README.md', '#4554'] + - ['sdk/anomalydetector/azure-ai-anomalydetector/README.md', '#4554'] - ['sdk/applicationinsights/azure-applicationinsights/README.md', '#4554'] - ['sdk/batch/azure-batch/README.md', '#4554'] - ['sdk/cognitiveservices/azure-cognitiveservices-anomalydetector/README.md', '#4554'] diff --git a/eng/common/README.md b/eng/common/README.md index 7e9e197fc4665..10fcb49f2a888 100644 --- a/eng/common/README.md +++ b/eng/common/README.md @@ -4,9 +4,22 @@ The `eng/common` directory contains engineering files that are common across the It should remain relatively small and only contain textual based files like scripts, configs, or templates. It should not contain binary files as they don't play well with git. -# Updating +## Updating Any updates to files in the `eng/common` directory should be made in the [azure-sdk-tools](https://github.com/azure/azure-sdk-tools) repo. All changes made will cause a PR to created in all subscribed azure-sdk language repos which will blindly replace all contents of the `eng/common` directory in that repo. For that reason do **NOT** make changes to files in this directory in the individual azure-sdk -languages repos as they will be overwritten the next time an update is taken from the common azure-sdk-tools repo. \ No newline at end of file +languages repos as they will be overwritten the next time an update is taken from the common azure-sdk-tools repo. + +### Workflow + +The 'Sync eng/common directory' PRs will be created in the language repositories once a pull request that touches the eng/common directory is submitted against the master branch. This will make it easier for changes to be tested in each individual language repo before merging the changes in the azure-sdk-tools repo. The workflow is explained below: + +1. Create a PR against Azure/azure-sdk-tools:master. This is the **Tools PR**. +2. `azure-sdk-tools - sync - eng-common` is run automatically. It creates **Sync PRs** in each of the connected language repositories using the format `Sync eng/common directory with azure-sdk-tools for PR {Tools PR Number}`. Each **Sync PR** will contain a link back to the **Tools PR** that triggered it. +3. More changes pushed to the **Tools PR**, will automatically triggered new pipeline runs in the respective **Sync PRs**. The **Sync PRs** are used to make sure the changes would not break any of the connected pipelines. +4. Once satisfied with the changes; + - First make sure all checks in the **Sync PRs** are green and approved. The **Tools PR** contains links to all the **Sync PRs**. If for some reason the PRs is blocked by a CI gate get someone with permission to override and manually merge the PR. + - To test the state of all the **Sync PRs**, you can download the `PRsCreated.txt` artifact from the `azure-sdk-tools - sync - eng-common` pipeline, with that run the [Verify-And-Merge-PRs.ps1](https://github.com/Azure/azure-sdk-tools/blob/master/scripts/powershell/Verify-And-Merge-PRs.ps1) passing the downloaded `PRsCreated.txt` file path for `PRDataArtifactPath` and `false` to `ShouldMerge`. + - Next approve the `VerifyAndMerge` job for the `azure-sdk-tools - sync - eng-common` pipeline triggered by your **Tools PR** which will automatically merge all the **Sync PRs**. You need `azure-sdk` devops contributor permissions to reach the `azure-sdk-tools - sync - eng-common` pipeline. + - Finally merge the **Tools PR**. \ No newline at end of file diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 3201f5175483d..0552f9dd5e7bf 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -15,6 +15,9 @@ param ( [ValidatePattern('^[-a-zA-Z0-9\.\(\)_]{0,80}(?<=[a-zA-Z0-9\(\)])$')] [string] $BaseName, + [ValidatePattern('^[-\w\._\(\)]+$')] + [string] $ResourceGroupName, + [Parameter(Mandatory = $true)] [string] $ServiceDirectory, @@ -115,6 +118,7 @@ $repositoryRoot = "$PSScriptRoot/../../.." | Resolve-Path $root = [System.IO.Path]::Combine($repositoryRoot, "sdk", $ServiceDirectory) | Resolve-Path $templateFileName = 'test-resources.json' $templateFiles = @() +$environmentVariables = @{} Write-Verbose "Checking for '$templateFileName' files under '$root'" Get-ChildItem -Path $root -Filter $templateFileName -Recurse | ForEach-Object { @@ -194,14 +198,18 @@ $serviceName = if (Split-Path -IsAbsolute $ServiceDirectory) { $ServiceDirectory } -# Format the resource group name based on resource group naming recommendations and limitations. -$resourceGroupName = if ($CI) { - $BaseName = 't' + (New-Guid).ToString('n').Substring(0, 16) - Write-Verbose "Generated base name '$BaseName' for CI build" +if ($CI) { + $BaseName = 't' + (New-Guid).ToString('n').Substring(0, 16) + Write-Verbose "Generated base name '$BaseName' for CI build" +} - "rg-{0}-$BaseName" -f ($serviceName -replace '[\\\/:]', '-').Substring(0, [Math]::Min($serviceName.Length, 90 - $BaseName.Length - 4)).Trim('-') +$ResourceGroupName = if ($ResourceGroupName) { + $ResourceGroupName +} elseif ($CI) { + # Format the resource group name based on resource group naming recommendations and limitations. + "rg-{0}-$BaseName" -f ($serviceName -replace '[\\\/:]', '-').Substring(0, [Math]::Min($serviceName.Length, 90 - $BaseName.Length - 4)).Trim('-') } else { - "rg-$BaseName" + "rg-$BaseName" } # Tag the resource group to be deleted after a certain number of hours if specified. @@ -225,13 +233,14 @@ if ($CI) { } # Set the resource group name variable. - Write-Host "Setting variable 'AZURE_RESOURCEGROUP_NAME': $resourceGroupName" - Write-Host "##vso[task.setvariable variable=AZURE_RESOURCEGROUP_NAME;]$resourceGroupName" + Write-Host "Setting variable 'AZURE_RESOURCEGROUP_NAME': $ResourceGroupName" + Write-Host "##vso[task.setvariable variable=AZURE_RESOURCEGROUP_NAME;]$ResourceGroupName" + $environmentVariables['AZURE_RESOURCEGROUP_NAME'] = $ResourceGroupName } -Log "Creating resource group '$resourceGroupName' in location '$Location'" +Log "Creating resource group '$ResourceGroupName' in location '$Location'" $resourceGroup = Retry { - New-AzResourceGroup -Name "$resourceGroupName" -Location $Location -Tag $tags -Force:$Force + New-AzResourceGroup -Name "$ResourceGroupName" -Location $Location -Tag $tags -Force:$Force } if ($resourceGroup.ProvisioningState -eq 'Succeeded') { @@ -295,7 +304,7 @@ foreach ($templateFile in $templateFiles) { $preDeploymentScript = $templateFile | Split-Path | Join-Path -ChildPath 'test-resources-pre.ps1' if (Test-Path $preDeploymentScript) { Log "Invoking pre-deployment script '$preDeploymentScript'" - &$preDeploymentScript -ResourceGroupName $resourceGroupName @PSBoundParameters + &$preDeploymentScript -ResourceGroupName $ResourceGroupName @PSBoundParameters } Log "Deploying template '$templateFile' to resource group '$($resourceGroup.ResourceGroupName)'" @@ -364,6 +373,7 @@ foreach ($templateFile in $templateFiles) { foreach ($key in $deploymentOutputs.Keys) { $value = $deploymentOutputs[$key] + $environmentVariables[$key] = $value if ($CI) { # Treat all ARM template output variables as secrets since "SecureString" variables do not set values. @@ -386,12 +396,14 @@ foreach ($templateFile in $templateFiles) { $postDeploymentScript = $templateFile | Split-Path | Join-Path -ChildPath 'test-resources-post.ps1' if (Test-Path $postDeploymentScript) { Log "Invoking post-deployment script '$postDeploymentScript'" - &$postDeploymentScript -ResourceGroupName $resourceGroupName -DeploymentOutputs $deploymentOutputs @PSBoundParameters + &$postDeploymentScript -ResourceGroupName $ResourceGroupName -DeploymentOutputs $deploymentOutputs @PSBoundParameters } } $exitActions.Invoke() +return $environmentVariables + <# .SYNOPSIS Deploys live test resources defined for a service directory to Azure. @@ -422,6 +434,10 @@ the ARM template. See also https://docs.microsoft.com/azure/architecture/best-pr Note: The value specified for this parameter will be overriden and generated by New-TestResources.ps1 if $CI is specified. +.PARAMETER ResourceGroupName +Set this value to deploy directly to a Resource Group that has already been +created. + .PARAMETER ServiceDirectory A directory under 'sdk' in the repository root - optionally with subdirectories specified - in which to discover ARM templates named 'test-resources.json'. diff --git a/eng/common/TestResources/New-TestResources.ps1.md b/eng/common/TestResources/New-TestResources.ps1.md index c9a462aae3a8d..d4479294d3813 100644 --- a/eng/common/TestResources/New-TestResources.ps1.md +++ b/eng/common/TestResources/New-TestResources.ps1.md @@ -14,19 +14,20 @@ Deploys live test resources defined for a service directory to Azure. ### Default (Default) ``` -New-TestResources.ps1 [-BaseName] -ServiceDirectory -TestApplicationId - [-TestApplicationSecret ] [-TestApplicationOid ] [-DeleteAfterHours ] - [-Location ] [-Environment ] [-AdditionalParameters ] [-CI] [-Force] [-WhatIf] - [-Confirm] [] +New-TestResources.ps1 [-BaseName] [-ResourceGroupName ] -ServiceDirectory + -TestApplicationId [-TestApplicationSecret ] [-TestApplicationOid ] + [-DeleteAfterHours ] [-Location ] [-Environment ] [-AdditionalParameters ] + [-CI] [-Force] [-OutFile] [-WhatIf] [-Confirm] [] ``` ### Provisioner ``` -New-TestResources.ps1 [-BaseName] -ServiceDirectory -TestApplicationId - [-TestApplicationSecret ] [-TestApplicationOid ] -TenantId [-SubscriptionId ] - -ProvisionerApplicationId -ProvisionerApplicationSecret [-DeleteAfterHours ] - [-Location ] [-Environment ] [-AdditionalParameters ] [-CI] [-Force] [-WhatIf] - [-Confirm] [] +New-TestResources.ps1 [-BaseName] [-ResourceGroupName ] -ServiceDirectory + -TestApplicationId [-TestApplicationSecret ] [-TestApplicationOid ] + -TenantId [-SubscriptionId ] -ProvisionerApplicationId + -ProvisionerApplicationSecret [-DeleteAfterHours ] [-Location ] + [-Environment ] [-AdditionalParameters ] [-CI] [-Force] [-OutFile] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -112,6 +113,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ResourceGroupName +Set this value to deploy directly to a Resource Group that has already been +created. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServiceDirectory A directory under 'sdk' in the repository root - optionally with subdirectories specified - in which to discover ARM templates named 'test-resources.json'. @@ -381,29 +398,32 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -OutFile +Save test environment settings into a test-resources.json.env file next to test-resources.json. +File is protected via DPAPI. +Supported only on windows. +The environment file would be scoped to the current repository directory. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: Required: False Position: Named -Default value: None +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -412,15 +432,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -OutFile -save test environment settings into a test-resources.json.env file next to test-resources.json. -The file is protected via DPAPI. The environment file would be scoped to the current repository directory. -Note: Supported only on Windows. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: +Aliases: cf Required: False Position: Named @@ -440,4 +458,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Remove-TestResources.ps1](./Remove-TestResources.ps1.md) +[Remove-TestResources.ps1]() + diff --git a/eng/common/TestResources/README.md b/eng/common/TestResources/README.md index 3c0cd7c2207e1..e02990d023e54 100644 --- a/eng/common/TestResources/README.md +++ b/eng/common/TestResources/README.md @@ -35,10 +35,10 @@ eng\common\TestResources\New-TestResources.ps1 ` -TestApplicationSecret (ConvertFrom-SecureString $sp.Secret -AsPlainText) ``` -If you are running this for a .NET project on Windows, the recommended method is to -add the `-OutFile` switch to the above command. This will save test environment settings -into a test-resources.json.env file next to test-resources.json. The file is protected via DPAPI. -The environment file would be scoped to the current repository directory and avoids the need to +If you are running this for a .NET project on Windows, the recommended method is to +add the `-OutFile` switch to the above command. This will save test environment settings +into a test-resources.json.env file next to test-resources.json. The file is protected via DPAPI. +The environment file would be scoped to the current repository directory and avoids the need to set environment variables or restart your IDE to recognize them. Along with some log messages, this will output environment variables based on diff --git a/eng/common/TestResources/Remove-TestResources.ps1.md b/eng/common/TestResources/Remove-TestResources.ps1.md index f9bc1803ae323..7a70923dcd0d9 100644 --- a/eng/common/TestResources/Remove-TestResources.ps1.md +++ b/eng/common/TestResources/Remove-TestResources.ps1.md @@ -14,34 +14,35 @@ Deletes the resource group deployed for a service directory from Azure. ### Default (Default) ``` -Remove-TestResources.ps1 [-BaseName] [-Environment ] [-Force] [-WhatIf] [-Confirm] - [] +Remove-TestResources.ps1 [-BaseName] [-ServiceDirectory ] [-Environment ] [-Force] + [-RemoveTestResourcesRemainingArguments ] [-WhatIf] [-Confirm] [] ``` ### Default+Provisioner ``` Remove-TestResources.ps1 [-BaseName] -TenantId [-SubscriptionId ] - -ProvisionerApplicationId -ProvisionerApplicationSecret [-Environment ] [-Force] - [-WhatIf] [-Confirm] [] + -ProvisionerApplicationId -ProvisionerApplicationSecret [-ServiceDirectory ] + [-Environment ] [-Force] [-RemoveTestResourcesRemainingArguments ] [-WhatIf] [-Confirm] + [] ``` ### ResourceGroup+Provisioner ``` Remove-TestResources.ps1 -ResourceGroupName -TenantId [-SubscriptionId ] - -ProvisionerApplicationId -ProvisionerApplicationSecret [-Environment ] [-Force] - [-WhatIf] [-Confirm] [] + -ProvisionerApplicationId -ProvisionerApplicationSecret [-ServiceDirectory ] + [-Environment ] [-Force] [-RemoveTestResourcesRemainingArguments ] [-WhatIf] [-Confirm] + [] ``` ### ResourceGroup ``` -Remove-TestResources.ps1 -ResourceGroupName [-Environment ] [-Force] [-WhatIf] [-Confirm] - [] +Remove-TestResources.ps1 -ResourceGroupName [-ServiceDirectory ] [-Environment ] + [-Force] [-RemoveTestResourcesRemainingArguments ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION Removes a resource group and all its resources previously deployed using New-TestResources.ps1. - If you are not currently logged into an account in the Az PowerShell module, you will be asked to log in with Connect-AzAccount. Alternatively, you (or a @@ -54,10 +55,9 @@ create resources. ### EXAMPLE 1 ``` Remove-TestResources.ps1 -BaseName 'uuid123' -Force -``` - Use the currently logged-in account to delete the resource group by the name of 'rg-uuid123' +``` ### EXAMPLE 2 ``` @@ -68,11 +68,10 @@ Remove-TestResources.ps1 ` -ProvisionerApplicationSecret '$(AppSecret)' ` -Force ` -Verbose ` -``` - When run in the context of an Azure DevOps pipeline, this script removes the resource group whose name is stored in the environment variable AZURE_RESOURCEGROUP_NAME. +``` ## PARAMETERS @@ -171,7 +170,7 @@ Accept wildcard characters: False ### -ServiceDirectory A directory under 'sdk' in the repository root - optionally with subdirectories -specified - specified - in which to discover pre removal script named 'remove-test-resources-pre.json'. +specified - in which to discover pre removal script named 'remove-test-resources-pre.json'. ```yaml Type: String @@ -217,6 +216,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -RemoveTestResourcesRemainingArguments +Captures any arguments not declared here (no parameter errors) + +```yaml +Type: Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -WhatIf Shows what would happen if the cmdlet runs. The cmdlet is not run. @@ -259,4 +273,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[New-TestResources.ps1](./New-TestResources.ps1.md) +[New-TestResources.ps1]() + diff --git a/eng/common/TestResources/deploy-test-resources.yml b/eng/common/TestResources/deploy-test-resources.yml index b875a806b143a..87438443d6aad 100644 --- a/eng/common/TestResources/deploy-test-resources.yml +++ b/eng/common/TestResources/deploy-test-resources.yml @@ -12,8 +12,8 @@ parameters: # "TenantId": "", # "TestApplicationId": "", # "TestApplicationSecret": "", -# "ProvisionerApplicationId": "", -# "ProvisionerApplicationSecret": "", +# "ProvisionerApplicationId": "", +# "ProvisionerApplicationSecret": "", # "Environment": "AzureCloud | AzureGov | AzureChina | " # } diff --git a/eng/common/TestResources/remove-test-resources.yml b/eng/common/TestResources/remove-test-resources.yml index 767f8c8c516b2..01e9f64d55160 100644 --- a/eng/common/TestResources/remove-test-resources.yml +++ b/eng/common/TestResources/remove-test-resources.yml @@ -12,8 +12,8 @@ parameters: # "TenantId": "", # "TestApplicationId": "", # "TestApplicationSecret": "", -# "ProvisionerApplicationId": "", -# "ProvisoinerApplicationSecret": "", +# "ProvisionerApplicationId": "", +# "ProvisionerApplicationSecret": "", # "Environment": "AzureCloud | AzureGov | AzureChina | " # } # The Remove-TestResources.ps1 script accommodates extra parameters so it will @@ -27,7 +27,7 @@ steps: eng/common/TestResources/Remove-TestResources.ps1 ` -ResourceGroupName "${env:AZURE_RESOURCEGROUP_NAME}" ` - -ServiceDirectory ${{ parameters.ServiceDirectory }} ` + -ServiceDirectory "${{ parameters.ServiceDirectory }}" ` @subscriptionConfiguration ` -Force ` -Verbose diff --git a/eng/common/Update-Change-Log.ps1 b/eng/common/Update-Change-Log.ps1 index a819a05e8bb2e..6380e3ff800a2 100644 --- a/eng/common/Update-Change-Log.ps1 +++ b/eng/common/Update-Change-Log.ps1 @@ -1,4 +1,4 @@ -# Note: This script will add or replace version title in change log +# Note: This script will add or replace version title in change log # Parameter description # Version : Version to add or replace in change log diff --git a/eng/common/pipelines/templates/steps/create-pull-request.yml b/eng/common/pipelines/templates/steps/create-pull-request.yml index 10af61de1100a..b22d5dda2722a 100644 --- a/eng/common/pipelines/templates/steps/create-pull-request.yml +++ b/eng/common/pipelines/templates/steps/create-pull-request.yml @@ -11,9 +11,12 @@ parameters: PushArgs: WorkingDirectory: $(System.DefaultWorkingDirectory) PRTitle: not-specified + PRBody: '' ScriptDirectory: eng/common/scripts GHReviewersVariable: '' GHTeamReviewersVariable: '' + # Multiple labels seperated by comma, e.g. "bug, APIView" + PRLabels: '' steps: @@ -65,10 +68,13 @@ steps: -PRBranch "${{ parameters.PRBranchName }}" -AuthToken "$(azuresdk-github-pat)" -PRTitle "${{ parameters.PRTitle }}" + -PRBody "${{ coalesce(parameters.PRBody, parameters.CommitMsg, parameters.PRTitle) }}" + -PRLabels "${{ parameters.PRLabels}}" - task: PowerShell@2 displayName: Tag a Reviewer on PR condition: and(succeeded(), eq(variables['HasChanges'], 'true')) + continueOnError: true inputs: pwsh: true workingDirectory: ${{ parameters.WorkingDirectory }} diff --git a/eng/common/pipelines/templates/steps/get-pr-owners.yml b/eng/common/pipelines/templates/steps/get-pr-owners.yml index a80d5b83b2de5..545143ce09be2 100644 --- a/eng/common/pipelines/templates/steps/get-pr-owners.yml +++ b/eng/common/pipelines/templates/steps/get-pr-owners.yml @@ -6,24 +6,21 @@ steps: - pwsh: | git clone https://github.com/Azure/azure-sdk-tools.git $(Build.SourcesDirectory)/tools_repo cd $(Build.SourcesDirectory)/tools_repo - git checkout 564ad63ae72d18422533fa1da9d396e7703c1cb5 + git checkout 35ad98f821913eb0e8872f861ee60589b563c865 displayName: Setup Identity Resolver - pwsh: | - $result = dotnet run -v q -- ` + dotnet run -v q -- ` --aad-app-id-var APP_ID ` --aad-app-secret-var APP_SECRET ` --aad-tenant-var AAD_TENANT ` --kusto-url-var KUSTO_URL ` --kusto-database-var KUSTO_DB ` --kusto-table-var KUSTO_TABLE ` - --identity "$(Build.QueuedBy)" - $resolvedIdentity = $result[-1] | ConvertFrom-Json - - Write-Host $resolvedIdentity - - Write-Output "##vso[task.setvariable variable=${{ parameters.TargetVariable }}]$($resolvedIdentity.GithubUserName)" + --identity "$(Build.QueuedBy)" ` + --targetvar "${{ parameters.TargetVariable }}" displayName: 'Resolving Queuing User' + continueOnError: true workingDirectory: $(Build.SourcesDirectory)/tools_repo/tools/notification-configuration/identity-resolver env: APP_ID: $(notification-aad-app-id) @@ -37,10 +34,12 @@ steps: Remove-Item -Force -Recurse $(Build.SourcesDirectory)/tools_repo displayName: Clean Up Cloned Tools Repo - - pwsh: | - $originalValue = "$(${{ parameters.TargetVariable }})" - $result = $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1 -TargetDirectory /sdk/${{ parameters.ServiceDirectory }}/ -RootDirectory $(Build.SourcesDirectory) - if ($result) { - Write-Output "##vso[task.setvariable variable=${{ parameters.TargetVariable }}]$originalValue,$result" - } - displayName: Add CodeOwners if Present \ No newline at end of file + - task: PowerShell@2 + displayName: Add CodeOwners if Present + inputs: + pwsh: true + filePath: $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1 + arguments: > + -TargetDirectory "/sdk/${{ parameters.ServiceDirectory }}/" + -RootDirectory "$(Build.SourcesDirectory)" + -VsoVariable "${{ parameters.TargetVariable }}" \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/publish-blobs.yml b/eng/common/pipelines/templates/steps/publish-blobs.yml index 682cc4d4f7c88..5888edff87d12 100644 --- a/eng/common/pipelines/templates/steps/publish-blobs.yml +++ b/eng/common/pipelines/templates/steps/publish-blobs.yml @@ -4,6 +4,8 @@ parameters: TargetLanguage: '' BlobName: '' ScriptPath: '' + ArtifactLocation: '' + RepoId: $(Build.Repository.Name) steps: - pwsh: | @@ -21,6 +23,8 @@ steps: -SASKey "${{ parameters.BlobSASKey }}" -Language "${{ parameters.TargetLanguage }}" -BlobName "${{ parameters.BlobName }}" + -PublicArtifactLocation "${{ parameters.ArtifactLocation }}" + -RepoReplaceRegex "(https://github.com/${{ parameters.RepoId }}/(?:blob|tree)/)master" pwsh: true workingDirectory: $(Pipeline.Workspace) displayName: Copy Docs to Blob diff --git a/eng/common/pipelines/templates/steps/replace-relative-links.yml b/eng/common/pipelines/templates/steps/replace-relative-links.yml index 7ab2d76bc3f6e..fe90211c8c6cf 100644 --- a/eng/common/pipelines/templates/steps/replace-relative-links.yml +++ b/eng/common/pipelines/templates/steps/replace-relative-links.yml @@ -91,7 +91,7 @@ steps: else: return match.group(0) - def replace_prefined_relative_links(match, readme_location, root_folder, build_sha, repo_id): + def replace_predefined_relative_links(match, readme_location, root_folder, build_sha, repo_id): link_path = match.group(2).strip() if is_relative_link(link_path, readme_location): @@ -133,7 +133,7 @@ steps: content = re.sub( PREDEFINED_LINK_DISCOVERY_REGEX, - lambda match, readme_location=readme_location, root_folder=root_folder, build_sha=build_sha, repo_id=repo_id: replace_prefined_relative_links( + lambda match, readme_location=readme_location, root_folder=root_folder, build_sha=build_sha, repo_id=repo_id: replace_predefined_relative_links( match, readme_location, root_folder, build_sha, repo_id ), content, diff --git a/eng/common/pipelines/templates/steps/verify-agent-os.yml b/eng/common/pipelines/templates/steps/verify-agent-os.yml index b221583bc6da9..4551279e13c0d 100644 --- a/eng/common/pipelines/templates/steps/verify-agent-os.yml +++ b/eng/common/pipelines/templates/steps/verify-agent-os.yml @@ -9,7 +9,7 @@ steps: script: | # Script verifies the operating system for the platform on which it is being run # Used in build pipelines to verify the build agent os - # Variable: The friendly name or image name of the os to verfy against + # Variable: The friendly name or image name of the os to verify against from __future__ import print_function import sys import platform diff --git a/eng/common/pipelines/templates/steps/verify-changelog.yml b/eng/common/pipelines/templates/steps/verify-changelog.yml index f6005124a87f3..8173c8ec599b0 100644 --- a/eng/common/pipelines/templates/steps/verify-changelog.yml +++ b/eng/common/pipelines/templates/steps/verify-changelog.yml @@ -5,6 +5,9 @@ parameters: - name: ServiceName type: string default: 'not-specified' +- name: ServiceDirectory + type: string + default: '' - name: ForRelease type: boolean default: false @@ -15,9 +18,7 @@ steps: filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLog.ps1 arguments: > -PackageName ${{ parameters.PackageName }} - -ServiceName ${{ parameters.ServiceName }} - -RepoRoot $(Build.SourcesDirectory) - -RepoName $(Build.Repository.Name) + -ServiceDirectory ${{ coalesce(parameters.ServiceDirectory, parameters.ServiceName) }} -ForRelease $${{ parameters.ForRelease }} pwsh: true workingDirectory: $(Pipeline.Workspace) diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index a3d385becefc5..c9d76c99787e1 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -2,13 +2,18 @@ parameters: Directory: 'not-specified' IgnoreLinksFile: "$(Build.SourcesDirectory)/eng/ignore-links.txt" - steps: - - task: PowerShell@2 - displayName: Link verification check - inputs: - pwsh: true - workingDirectory: $(Build.SourcesDirectory)/${{ parameters.Directory }} - filePath: eng/common/scripts/Verify-Links.ps1 - arguments: > - -urls $(dir -r -i *.md) -rootUrl "file://$(Build.SourcesDirectory)/${{ parameters.Directory }}" -recursive:$false -ignoreLinksFile ${{ parameters.IgnoreLinksFile }} +- task: PowerShell@2 + displayName: Link verification check + inputs: + pwsh: true + workingDirectory: $(Build.SourcesDirectory)/${{ parameters.Directory }} + filePath: eng/common/scripts/Verify-Links.ps1 + arguments: > + -urls $(dir -r -i *.md) + -rootUrl "file://$(Build.SourcesDirectory)/${{ parameters.Directory }}" + -recursive: $false + -ignoreLinksFile ${{ parameters.IgnoreLinksFile }} + -branchReplaceRegex "^($env:SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI.*/(?:blob|tree)/)master(/.*)$" + -branchReplacementName $env:SYSTEM_PULLREQUEST_SOURCECOMMITID + -devOpsLogging: $true diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index cba89157a8799..2ca4aacdbef1d 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -1,66 +1,65 @@ # Helper functions for retireving useful information from azure-sdk-for-* repo -# Example Use : Import-Module .\eng\common\scripts\modules class PackageProps { - [string]$pkgName - [string]$pkgVersion - [string]$pkgDirectoryPath - [string]$pkgServiceName - [string]$pkgReadMePath - [string]$pkgChangeLogPath - [string]$pkgGroup - - PackageProps([string]$pkgName,[string]$pkgVersion,[string]$pkgDirectoryPath,[string]$pkgServiceName) + [string]$Name + [string]$Version + [string]$DirectoryPath + [string]$ServiceDirectory + [string]$ReadMePath + [string]$ChangeLogPath + [string]$Group + + PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory) { - $this.Initialize($pkgName, $pkgVersion, $pkgDirectoryPath, $pkgServiceName) + $this.Initialize($name, $version, $directoryPath, $serviceDirectory) } - PackageProps([string]$pkgName,[string]$pkgVersion,[string]$pkgDirectoryPath,[string]$pkgServiceName,[string]$pkgGroup="") + PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory, [string]$group = "") { - $this.Initialize($pkgName, $pkgVersion, $pkgDirectoryPath, $pkgServiceName, $pkgGroup) + $this.Initialize($name, $version, $directoryPath, $serviceDirectory, $group) } hidden [void]Initialize( - [string]$pkgName, - [string]$pkgVersion, - [string]$pkgDirectoryPath, - [string]$pkgServiceName + [string]$name, + [string]$version, + [string]$directoryPath, + [string]$serviceDirectory ) { - $this.pkgName = $pkgName - $this.pkgVersion = $pkgVersion - $this.pkgDirectoryPath = $pkgDirectoryPath - $this.pkgServiceName = $pkgServiceName + $this.Name = $name + $this.Version = $version + $this.DirectoryPath = $directoryPath + $this.ServiceDirectory = $serviceDirectory - if (Test-Path (Join-Path $pkgDirectoryPath "README.md")) + if (Test-Path (Join-Path $directoryPath "README.md")) { - $this.pkgReadMePath = Join-Path $pkgDirectoryPath "README.md" + $this.ReadMePath = Join-Path $directoryPath "README.md" } else { - $this.pkgReadMePath = $null + $this.ReadMePath = $null } - if (Test-Path (Join-Path $pkgDirectoryPath "CHANGELOG.md")) + if (Test-Path (Join-Path $directoryPath "CHANGELOG.md")) { - $this.pkgChangeLogPath = Join-Path $pkgDirectoryPath "CHANGELOG.md" + $this.ChangeLogPath = Join-Path $directoryPath "CHANGELOG.md" } else { - $this.pkgChangeLogPath = $null + $this.ChangeLogPath = $null } } hidden [void]Initialize( - [string]$pkgName, - [string]$pkgVersion, - [string]$pkgDirectoryPath, - [string]$pkgServiceName, - [string]$pkgGroup + [string]$name, + [string]$version, + [string]$directoryPath, + [string]$serviceDirectory, + [string]$group ) { - $this.Initialize($pkgName, $pkgVersion, $pkgDirectoryPath, $pkgServiceName) - $this.pkgGroup = $pkgGroup + $this.Initialize($name, $version, $directoryPath, $serviceDirectory) + $this.Group = $group } } @@ -72,18 +71,17 @@ function Get-PkgProperties { Param ( - [Parameter(Mandatory=$true)] + [Parameter(Mandatory = $true)] [string]$PackageName, - [Parameter(Mandatory=$true)] - [string]$ServiceName + [Parameter(Mandatory = $true)] + [string]$ServiceDirectory ) - $pkgDirectoryName = $null $pkgDirectoryPath = $null - $serviceDirectoryPath = Join-Path $RepoRoot "sdk" $ServiceName + $serviceDirectoryPath = Join-Path $RepoRoot "sdk" $ServiceDirectory if (!(Test-Path $serviceDirectoryPath)) { - Write-Error "Service Directory $ServiceName does not exist" + Write-Error "Service Directory $ServiceDirectory does not exist" exit 1 } @@ -92,13 +90,13 @@ function Get-PkgProperties foreach ($directory in $directoriesPresent) { $pkgDirectoryPath = Join-Path $serviceDirectoryPath $directory.Name - if ($ExtractPkgProps) + if ($GetPackageInfoFromRepoFn) { - $pkgProps = &$ExtractPkgProps -pkgPath $pkgDirectoryPath -serviceName $ServiceName -pkgName $PackageName + $pkgProps = &$GetPackageInfoFromRepoFn -pkgPath $pkgDirectoryPath -serviceDirectory $ServiceDirectory -pkgName $PackageName } else { - Write-Error "The function '${ExtractPkgProps}' was not found." + Write-Error "The function 'Get-${Language}-PackageInfoFromRepo' was not found." } if ($pkgProps -ne $null) @@ -112,11 +110,11 @@ function Get-PkgProperties # Takes ServiceName and Repo Root Directory # Returns important properties for each package in the specified service, or entire repo if the serviceName is not specified # Returns an Table of service key to array values of PS Object with properties @ { pkgName, pkgVersion, pkgDirectoryPath, pkgReadMePath, pkgChangeLogPath } -function Get-AllPkgProperties ([string]$ServiceName=$null) +function Get-AllPkgProperties ([string]$ServiceDirectory = $null) { $pkgPropsResult = @() - if ([string]::IsNullOrEmpty($ServiceName)) + if ([string]::IsNullOrEmpty($ServiceDirectory)) { $searchDir = Join-Path $RepoRoot "sdk" foreach ($dir in (Get-ChildItem $searchDir -Directory)) @@ -128,20 +126,20 @@ function Get-AllPkgProperties ([string]$ServiceName=$null) $activePkgList = Get-PkgListFromYml -ciYmlPath (Join-Path $serviceDir "ci.yml") if ($activePkgList -ne $null) { - $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -serviceName $dir.Name -pkgPropsResult $pkgPropsResult + $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -ServiceDirectory $dir.Name -pkgPropsResult $pkgPropsResult } } } } else { - $serviceDir = Join-Path $RepoRoot "sdk" $ServiceName + $serviceDir = Join-Path $RepoRoot "sdk" $ServiceDirectory if (Test-Path (Join-Path $serviceDir "ci.yml")) { $activePkgList = Get-PkgListFromYml -ciYmlPath (Join-Path $serviceDir "ci.yml") if ($activePkgList -ne $null) { - $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -serviceName $ServiceName -pkgPropsResult $pkgPropsResult + $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -ServiceDirectory $ServiceDirectory -pkgPropsResult $pkgPropsResult } } } @@ -149,11 +147,11 @@ function Get-AllPkgProperties ([string]$ServiceName=$null) return $pkgPropsResult } -function Operate-OnPackages ($activePkgList, $serviceName, [Array]$pkgPropsResult) +function Operate-OnPackages ($activePkgList, $ServiceDirectory, [Array]$pkgPropsResult) { foreach ($pkg in $activePkgList) { - $pkgProps = Get-PkgProperties -PackageName $pkg["name"] -ServiceName $serviceName + $pkgProps = Get-PkgProperties -PackageName $pkg["name"] -ServiceDirectory $ServiceDirectory $pkgPropsResult += $pkgProps } return $pkgPropsResult @@ -168,11 +166,11 @@ function Get-PkgListFromYml ($ciYmlPath) $ciYmlObj = ConvertFrom-Yaml $ciYmlContent -Ordered if ($ciYmlObj.Contains("stages")) { - $artifactsInCI = $ciYmlObj["stages"][0]["parameters"]["Artifacts"] + $artifactsInCI = $ciYmlObj["stages"][0]["parameters"]["Artifacts"] } elseif ($ciYmlObj.Contains("extends")) { - $artifactsInCI = $ciYmlObj["extends"]["parameters"]["Artifacts"] + $artifactsInCI = $ciYmlObj["extends"]["parameters"]["Artifacts"] } if ($artifactsInCI -eq $null) { diff --git a/eng/common/scripts/SemVer.ps1 b/eng/common/scripts/SemVer.ps1 index 402c9fb1f57da..0efdfae9cd425 100644 --- a/eng/common/scripts/SemVer.ps1 +++ b/eng/common/scripts/SemVer.ps1 @@ -4,102 +4,244 @@ Parses a semver version string into its components and supports operations aroun See https://azure.github.io/azure-sdk/policies_releases.html#package-versioning -Example: 1.2.3-preview.4 +Example: 1.2.3-beta.4 Components: Major.Minor.Patch-PrereleaseLabel.PrereleaseNumber Note: A builtin Powershell version of SemVer exists in 'System.Management.Automation'. At this time, it does not parsing of PrereleaseNumber. It's name is also type accelerated to 'SemVer'. #> class AzureEngSemanticVersion { - [int] $Major - [int] $Minor - [int] $Patch - [string] $PrereleaseLabel - [int] $PrereleaseNumber - [bool] $IsPrerelease - [string] $RawVersion - # Regex inspired but simplified from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string - static [string] $SEMVER_REGEX = "(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-?(?[a-zA-Z-]*)(?:\.?(?0|[1-9]\d*)))?" - - static [AzureEngSemanticVersion] ParseVersionString([string] $versionString) + [int] $Major + [int] $Minor + [int] $Patch + [string] $PrereleaseLabelSeparator + [string] $PrereleaseLabel + [string] $PrereleaseNumberSeparator + [int] $PrereleaseNumber + [bool] $IsPrerelease + [string] $RawVersion + [bool] $IsSemVerFormat + [string] $DefaultPrereleaseLabel + # Regex inspired but simplified from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string + static [string] $SEMVER_REGEX = "(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:(?-?)(?[a-zA-Z-]*)(?\.?)(?0|[1-9]\d*))?" + + static [AzureEngSemanticVersion] ParseVersionString([string] $versionString) + { + $version = [AzureEngSemanticVersion]::new($versionString) + + if (!$version.IsSemVerFormat) { + return $null + } + return $version + } + + static [AzureEngSemanticVersion] ParsePythonVersionString([string] $versionString) + { + $version = [AzureEngSemanticVersion]::ParseVersionString($versionString) + + if (!$version) { + return $null + } + + $version.SetupPythonConventions() + return $version + } + + AzureEngSemanticVersion([string] $versionString) + { + if ($versionString -match "^$([AzureEngSemanticVersion]::SEMVER_REGEX)$") + { + $this.IsSemVerFormat = $true + $this.RawVersion = $versionString + $this.Major = [int]$matches.Major + $this.Minor = [int]$matches.Minor + $this.Patch = [int]$matches.Patch + + $this.SetupDefaultConventions() + + if ($null -eq $matches['prelabel']) + { + # artifically provide these values for non-prereleases to enable easy sorting of them later than prereleases. + $this.PrereleaseLabel = "zzz" + $this.PrereleaseNumber = 999 + $this.IsPrerelease = $false + } + else + { + $this.PrereleaseLabel = $matches["prelabel"] + $this.PrereleaseLabelSeparator = $matches["presep"] + $this.PrereleaseNumber = [int]$matches["prenumber"] + $this.PrereleaseNumberSeparator = $matches["prenumsep"] + $this.IsPrerelease = $true + } + } + else + { + $this.RawVersion = $versionString + $this.IsSemVerFormat = $false + } + } + + # If a prerelease label exists, it must be 'beta', and similar semantics used in our release guidelines + # See https://azure.github.io/azure-sdk/policies_releases.html#package-versioning + [bool] HasValidPrereleaseLabel() + { + if ($this.IsPrerelease -eq $true) { + if ($this.PrereleaseLabel -ne $this.DefaultPrereleaseLabel) { + Write-Host "Unexpected pre-release identifier '$($this.PrereleaseLabel)', should be '$($this.DefaultPrereleaseLabel)'" + return $false; + } + if ($this.PrereleaseNumber -lt 1) + { + Write-Host "Unexpected pre-release version '$($this.PrereleaseNumber)', should be >= '1'" + return $false; + } + } + return $true; + } + + [string] ToString() + { + $versionString = "{0}.{1}.{2}" -F $this.Major, $this.Minor, $this.Patch + + if ($this.IsPrerelease) + { + $versionString += $this.PrereleaseLabelSeparator + $this.PrereleaseLabel + $this.PrereleaseNumberSeparator + $this.PrereleaseNumber + } + return $versionString; + } + + [void] IncrementAndSetToPrerelease() { + if ($this.IsPrerelease -eq $false) + { + $this.PrereleaseLabel = $this.DefaultPrereleaseLabel + $this.PrereleaseNumber = 1 + $this.Minor++ + $this.Patch = 0 + $this.IsPrerelease = $true + } + else + { + $this.PrereleaseNumber++ + } + } + + [void] SetupPythonConventions() + { + # Python uses no separators and "b" for beta so this sets up the the object to work with those conventions + $this.PrereleaseLabelSeparator = $this.PrereleaseNumberSeparator = "" + $this.DefaultPrereleaseLabel = "b" + } + + [void] SetupDefaultConventions() + { + # Use the default common conventions + $this.PrereleaseLabelSeparator = "-" + $this.PrereleaseNumberSeparator = "." + $this.DefaultPrereleaseLabel = "beta" + } + + static [string[]] SortVersionStrings([string[]] $versionStrings) + { + $versions = $versionStrings | ForEach-Object { [AzureEngSemanticVersion]::ParseVersionString($_) } + $sortedVersions = [AzureEngSemanticVersion]::SortVersions($versions) + return ($sortedVersions | ForEach-Object { $_.ToString() }) + } + + static [AzureEngSemanticVersion[]] SortVersions([AzureEngSemanticVersion[]] $versions) + { + return ($versions | Sort-Object -Property Major, Minor, Patch, PrereleaseLabel, PrereleaseNumber -Descending) + } + + static [void] QuickTests() + { + $versions = @( + "1.0.1", + "2.0.0", + "2.0.0-alpha.20200920", + "2.0.0-beta.2", + "1.0.10", + "2.0.0-beta.1", + "2.0.0-beta.10", + "1.0.0", + "1.0.0b2", + "1.0.2") + + $expectedSort = @( + "2.0.0", + "2.0.0-beta.10", + "2.0.0-beta.2", + "2.0.0-beta.1", + "2.0.0-alpha.20200920", + "1.0.10", + "1.0.2", + "1.0.1", + "1.0.0", + "1.0.0b2") + + $sort = [AzureEngSemanticVersion]::SortVersionStrings($versions) + + for ($i = 0; $i -lt $expectedSort.Count; $i++) { - try { - return [AzureEngSemanticVersion]::new($versionString) - } - catch { - return $null - } - } - - AzureEngSemanticVersion([string] $versionString){ - if ($versionString -match "^$([AzureEngSemanticVersion]::SEMVER_REGEX)$") { - if ($null -eq $matches['prelabel']) { - # artifically provide these values for non-prereleases to enable easy sorting of them later than prereleases. - $prelabel = "zzz" - $prenumber = 999; - $isPre = $false; - } - else { - $prelabel = $matches["prelabel"] - $prenumber = [int]$matches["prenumber"] - $isPre = $true; - } - - $this.Major = [int]$matches.Major - $this.Minor = [int]$matches.Minor - $this.Patch = [int]$matches.Patch - $this.PrereleaseLabel = $prelabel - $this.PrereleaseNumber = $prenumber - $this.IsPrerelease = $isPre - $this.RawVersion = $versionString - } - else - { - throw "Invalid version string: '$versionString'" - } - } - - # If a prerelease label exists, it must be 'preview', and similar semantics used in our release guidelines - # See https://azure.github.io/azure-sdk/policies_releases.html#package-versioning - [bool] HasValidPrereleaseLabel(){ - if ($this.IsPrerelease -eq $true) { - if ($this.PrereleaseLabel -ne 'preview') { - Write-Error "Unexpected pre-release identifier '$this.PrereleaseLabel', should be 'preview'" - return $false; - } - if ($this.PrereleaseNumber -lt 1) - { - Write-Error "Unexpected pre-release version '$this.PrereleaseNumber', should be >= '1'" - return $false; - } - } - return $true; - } - - [string] ToString(){ - if ($this.IsPrerelease -eq $false) - { - $versionString = "{0}.{1}.{2}" -F $this.Major, $this.Minor, $this.Patch - } - else - { - $versionString = "{0}.{1}.{2}-{3}.{4}" -F $this.Major, $this.Minor, $this.Patch, $this.PrereleaseLabel, $this.PrereleaseNumber - } - return $versionString; - } - - [void] IncrementAndSetToPrerelease(){ - if ($this.IsPrerelease -eq $false) - { - $this.PrereleaseLabel = 'preview' - $this.PrereleaseNumber = 1 - $this.Minor++ - $this.Patch = 0 - $this.IsPrerelease = $true - } - else - { - $this.PrereleaseNumber++ - } + if ($sort[$i] -ne $expectedSort[$i]) { + Write-Host "Error: Incorrect sort:" + Write-Host "Expected: " + Write-Host $expectedSort + Write-Host "Actual:" + Write-Host $sort + break + } + } + + $devVerString = "1.2.3-alpha.20200828.1" + $devVerNew = [AzureEngSemanticVersion]::new($devVerString) + if (!$devVerNew -or $devVerNew.IsSemVerFormat -ne $false) { + Write-Host "Error: Didn't expect daily dev version to match our semver regex because of the extra .r" + } + $devVerparse = [AzureEngSemanticVersion]::ParseVersionString($devVerString) + if ($devVerparse) { + Write-Host "Error: Didn't expect daily dev version to parse because of the extra .r" + } + + $gaVerString = "1.2.3" + $gaVer = [AzureEngSemanticVersion]::ParseVersionString($gaVerString) + if ($gaVer.Major -ne 1 -or $gaVer.Minor -ne 2 -or $gaVer.Patch -ne 3) { + Write-Host "Error: Didn't correctly parse ga version string $gaVerString" + } + if ($gaVerString -ne $gaVer.ToString()) { + Write-Host "Error: Ga string did not correctly round trip with ToString" + } + $gaVer.IncrementAndSetToPrerelease() + if ("1.3.0-beta.1" -ne $gaVer.ToString()) { + Write-Host "Error: Ga string did not correctly increment" + } + + $betaVerString = "1.2.3-beta.4" + $betaVer = [AzureEngSemanticVersion]::ParseVersionString($betaVerString) + if ($betaVer.Major -ne 1 -or $betaVer.Minor -ne 2 -or $betaVer.Patch -ne 3 -or $betaVer.PrereleaseLabel -ne "beta" -or $betaVer.PrereleaseNumber -ne 4) { + Write-Host "Error: Didn't correctly parse beta version string $betaVerString" + } + if ($betaVerString -ne $betaVer.ToString()) { + Write-Host "Error: beta string did not correctly round trip with ToString" } + $betaVer.IncrementAndSetToPrerelease() + if ("1.2.3-beta.5" -ne $betaVer.ToString()) { + Write-Host "Error: Beta string did not correctly increment" + } + + $pythonBetaVerString = "1.2.3b4" + $pbetaVer = [AzureEngSemanticVersion]::ParsePythonVersionString($pythonBetaVerString) + if ($pbetaVer.Major -ne 1 -or $pbetaVer.Minor -ne 2 -or $pbetaVer.Patch -ne 3 -or $pbetaVer.PrereleaseLabel -ne "b" -or $pbetaVer.PrereleaseNumber -ne 4) { + Write-Host "Error: Didn't correctly parse python beta string $pythonBetaVerString" + } + if ($pythonBetaVerString -ne $pbetaVer.ToString()) { + Write-Host "Error: python beta string did not correctly round trip with ToString" + } + $pbetaVer.IncrementAndSetToPrerelease() + if ("1.2.3b5" -ne $pbetaVer.ToString()) { + Write-Host "Error: Python beta string did not correctly increment" + } + + Write-Host "QuickTests done" + } } diff --git a/eng/common/scripts/Submit-PullRequest.ps1 b/eng/common/scripts/Submit-PullRequest.ps1 index 5edabc599a99f..7f3f0a544e9a7 100644 --- a/eng/common/scripts/Submit-PullRequest.ps1 +++ b/eng/common/scripts/Submit-PullRequest.ps1 @@ -15,30 +15,41 @@ The owner of the branch we want to create a pull request for. The branch which we want to create a pull request for. .PARAMETER AuthToken A personal access token +.PARAMETER PRTitle +The title of the pull request. +.PARAMETER PRBody +The body message for the pull request. +.PARAMETER PRLabels +The labels added to the PRs. Multple labels seperated by comma, e.g "bug, service" #> [CmdletBinding(SupportsShouldProcess = $true)] param( [Parameter(Mandatory = $true)] - $RepoOwner, + [string]$RepoOwner, [Parameter(Mandatory = $true)] - $RepoName, + [string]$RepoName, [Parameter(Mandatory = $true)] - $BaseBranch, + [string]$BaseBranch, [Parameter(Mandatory = $true)] - $PROwner, + [string]$PROwner, [Parameter(Mandatory = $true)] - $PRBranch, + [string]$PRBranch, [Parameter(Mandatory = $true)] - $AuthToken, + [string]$AuthToken, [Parameter(Mandatory = $true)] - $PRTitle, - $PRBody = $PRTitle + [string]$PRTitle, + + [Parameter(Mandatory = $false)] + [string]$PRBody = $PRTitle, + + [Parameter(Mandatory = $false)] + [string]$PRLabels ) $headers = @{ @@ -47,6 +58,31 @@ $headers = @{ $query = "state=open&head=${PROwner}:${PRBranch}&base=${BaseBranch}" +function AddLabels([int] $prNumber, [string] $prLabelString) +{ + # Adding labels to the pr. + if (-not $prLabelString) { + Write-Verbose "There are no labels added to the PR." + return + } + + # Parse the labels from string to array + $prLabelArray = @($prLabelString.Split(",") | % { $_.Trim() } | ? { return $_ }) + $prLabelUri = "https://api.github.com/repos/$RepoOwner/$RepoName/issues/$prNumber" + $labelRequestData = @{ + labels = $prLabelArray + } + try { + $resp = Invoke-RestMethod -Method PATCH -Headers $headers $prLabelUri -Body ($labelRequestData | ConvertTo-Json) + } + catch { + Write-Error "Invoke-RestMethod $prLabelUri failed with exception:`n$_" + } + + $resp | Write-Verbose + Write-Host -f green "Label(s) [$prLabelArray] added to pull request: https://github.com/$RepoOwner/$RepoName/pull/$prNumber" +} + try { $resp = Invoke-RestMethod -Headers $headers "https://api.github.com/repos/$RepoOwner/$RepoName/pulls?$query" } @@ -61,6 +97,7 @@ if ($resp.Count -gt 0) { # setting variable to reference the pull request by number Write-Host "##vso[task.setvariable variable=Submitted.PullRequest.Number]$($resp[0].number)" + AddLabels $resp[0].number $PRLabels } else { $data = @{ @@ -86,4 +123,6 @@ else { # setting variable to reference the pull request by number Write-Host "##vso[task.setvariable variable=Submitted.PullRequest.Number]$($resp.number)" + + AddLabels $resp.number $PRLabels } diff --git a/eng/common/scripts/Verify-ChangeLog.ps1 b/eng/common/scripts/Verify-ChangeLog.ps1 index 26218d988df28..e56994a30e836 100644 --- a/eng/common/scripts/Verify-ChangeLog.ps1 +++ b/eng/common/scripts/Verify-ChangeLog.ps1 @@ -3,17 +3,11 @@ param ( [String]$ChangeLogLocation, [String]$VersionString, [string]$PackageName, - [string]$ServiceName, - [string]$RepoRoot, - [ValidateSet("net", "java", "js", "python")] - [string]$Language, - [string]$RepoName, + [string]$ServiceDirectory, [boolean]$ForRelease = $False ) -$ProgressPreference = "SilentlyContinue" -. (Join-Path $PSScriptRoot SemVer.ps1) -Import-Module (Join-Path $PSScriptRoot modules ChangeLog-Operations.psm1) +. (Join-Path $PSScriptRoot common.ps1) $validChangeLog = $false if ($ChangeLogLocation -and $VersionString) @@ -22,22 +16,8 @@ if ($ChangeLogLocation -and $VersionString) } else { - Import-Module (Join-Path $PSScriptRoot modules Package-Properties.psm1) - if ([System.String]::IsNullOrEmpty($Language)) - { - if ($RepoName -match "azure-sdk-for-(?[^-]+)") - { - $Language = $matches["lang"] - } - else - { - Write-Error "Failed to set Language automatically. Please pass the appropriate Language as a parameter." - exit 1 - } - } - - $PackageProp = Get-PkgProperties -PackageName $PackageName -ServiceName $ServiceName -Language $Language -RepoRoot $RepoRoot - $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.pkgChangeLogPath -VersionString $PackageProp.pkgVersion -ForRelease $ForRelease + $PackageProp = Get-PkgProperties -PackageName $PackageName -ServiceDirectory $ServiceDirectory + $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $ForRelease } if (!$validChangeLog) diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index 5da025f9d6597..946655b3fcd9c 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -13,11 +13,17 @@ param ( [string] $rootUrl = "", # list of http status codes count as broken links. Defaults to 400, 401, 404, SocketError.HostNotFound = 11001, SocketError.NoData = 11004 [array] $errorStatusCodes = @(400, 401, 404, 11001, 11004), - # flag to allow resolving relative paths or not - [bool] $resolveRelativeLinks = $true + # regex to check if the link needs to be replaced + [string] $branchReplaceRegex = "^(https://github.com/.*/(?:blob|tree)/)master(/.*)$", + # the substitute branch name or SHA commit + [string] $branchReplacementName = "", + # flag to allow checking against azure sdk link guidance. + [bool] $checkLinkGuidance = $false ) $ProgressPreference = "SilentlyContinue"; # Disable invoke-webrequest progress dialog +# Regex of the locale keywords. +$locale = "/en-us/" function NormalizeUrl([string]$url){ if (Test-Path $url) { @@ -56,6 +62,18 @@ function LogWarning } } +function LogError +{ + if ($devOpsLogging) + { + Write-Host "##vso[task.logissue type=error]$args" + } + else + { + Write-Error "$args" + } +} + function ResolveUri ([System.Uri]$referralUri, [string]$link) { # If the link is mailto, skip it. @@ -65,11 +83,13 @@ function ResolveUri ([System.Uri]$referralUri, [string]$link) } $linkUri = [System.Uri]$link; - if($resolveRelativeLinks){ + # Our link guidelines do not allow relative links so only resolve them when we are not + # validating links against our link guidelines (i.e. !$checkLinkGuideance) + if(!$checkLinkGuidance) { if (!$linkUri.IsAbsoluteUri) { # For rooted paths resolve from the baseUrl if ($link.StartsWith("/")) { - echo "rooturl = $rootUrl" + Write-Verbose "rooturl = $rootUrl" $linkUri = new-object System.Uri([System.Uri]$rootUrl, ".$link"); } else { @@ -114,13 +134,20 @@ function ParseLinks([string]$baseUri, [string]$htmlContent) function CheckLink ([System.Uri]$linkUri) { - if ($checkedLinks.ContainsKey($linkUri)) { return } + if ($checkedLinks.ContainsKey($linkUri)) { + if (!$checkedLinks[$linkUri]) { + LogWarning "broken link $linkUri" + } + return $checkedLinks[$linkUri] + } + + $linkValid = $true + Write-Verbose "Checking link $linkUri..." - Write-Verbose "Checking link $linkUri..." if ($linkUri.IsFile) { if (!(Test-Path $linkUri.LocalPath)) { LogWarning "Link to file does not exist $($linkUri.LocalPath)" - $script:badLinks += $linkUri + $linkValid = $false } } else { @@ -152,7 +179,7 @@ function CheckLink ([System.Uri]$linkUri) if ($statusCode -in $errorStatusCodes) { LogWarning "[$statusCode] broken link $linkUri" - $script:badLinks += $linkUri + $linkValid = $false } else { if ($null -ne $statusCode) { @@ -165,7 +192,22 @@ function CheckLink ([System.Uri]$linkUri) } } } - $checkedLinks[$linkUri] = $true; + + # Check if link uri includes locale info. + if ($checkLinkGuidance -and ($linkUri -match $locale)) { + LogWarning "DO NOT include locale $locale information in links: $linkUri." + $linkValid = $false + } + $checkedLinks[$linkUri] = $linkValid + return $linkValid +} + +function ReplaceGithubLink([string]$originLink) { + if (!$branchReplacementName) { + return $originLink + } + $ReplacementPattern = "`${1}$branchReplacementName`$2" + return $originLink -replace $branchReplaceRegex, $ReplacementPattern } function GetLinks([System.Uri]$pageUri) @@ -218,8 +260,6 @@ if ($PSVersionTable.PSVersion.Major -lt 6) { LogWarning "Some web requests will not work in versions of PS earlier then 6. You are running version $($PSVersionTable.PSVersion)." } - -$badLinks = @(); $ignoreLinks = @(); if (Test-Path $ignoreLinksFile) { @@ -228,6 +268,7 @@ if (Test-Path $ignoreLinksFile) $checkedPages = @{}; $checkedLinks = @{}; +$badLinks = @{}; $pageUrisToCheck = new-object System.Collections.Queue foreach ($url in $urls) { @@ -243,18 +284,38 @@ while ($pageUrisToCheck.Count -ne 0) $linkUris = GetLinks $pageUri Write-Host "Found $($linkUris.Count) links on page $pageUri"; - + $badLinksPerPage = @(); foreach ($linkUri in $linkUris) { - CheckLink $linkUri - if ($recursive) { + $linkUri = ReplaceGithubLink $linkUri + $isLinkValid = CheckLink $linkUri + if (!$isLinkValid -and !$badLinksPerPage.Contains($linkUri)) { + $badLinksPerPage += $linkUri + } + if ($recursive -and $isLinkValid) { if ($linkUri.ToString().StartsWith($baseUrl) -and !$checkedPages.ContainsKey($linkUri)) { $pageUrisToCheck.Enqueue($linkUri); } } } + if ($badLinksPerPage.Count -gt 0) { + $badLinks[$pageUri] = $badLinksPerPage + } } -Write-Host "Found $($checkedLinks.Count) links with $($badLinks.Count) broken" -$badLinks | ForEach-Object { Write-Host " $_" } +if ($badLinks.Count -gt 0) { + Write-Host "Summary of broken links:" +} +foreach ($pageLink in $badLinks.Keys) { + Write-Host "'$pageLink' has $($badLinks[$pageLink].Count) broken link(s):" + foreach ($brokenLink in $badLinks[$pageLink]) { + Write-Host " $brokenLink" + } +} +if ($badLinks.Count -gt 0) { + LogError "Found $($checkedLinks.Count) links with $($badLinks.Count) page(s) broken." +} +else { + Write-Host "Found $($checkedLinks.Count) links. No broken links found." +} exit $badLinks.Count diff --git a/eng/common/scripts/Verify-Resource-Ref.ps1 b/eng/common/scripts/Verify-Resource-Ref.ps1 new file mode 100644 index 0000000000000..048f91c3afed0 --- /dev/null +++ b/eng/common/scripts/Verify-Resource-Ref.ps1 @@ -0,0 +1,42 @@ +. (Join-Path $PSScriptRoot common.ps1) +Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser +$ymlfiles = Get-ChildItem $RepoRoot -recurse | Where-Object {$_ -like '*.yml'} +$affectedRepos = [System.Collections.ArrayList]::new() + +foreach ($file in $ymlfiles) +{ + Write-Host "Verifying '${file}'" + $ymlContent = Get-Content $file.FullName -Raw + $ymlObject = ConvertFrom-Yaml $ymlContent -Ordered + + if ($ymlObject.Contains("resources")) + { + if ($ymlObject["resources"]["repositories"]) + { + $repositories = $ymlObject["resources"]["repositories"] + foreach ($repo in $repositories) + { + $repoName = $repo["repository"] + if (-not ($repo.Contains("ref"))) + { + $errorMessage = "File: ${file}, Repository: ${repoName}." + [void]$affectedRepos.Add($errorMessage) + } + } + } + } +} + +if ($affectedRepos.Count -gt 0) +{ + Write-Output "Ref not found in the following Repository Resources." + foreach ($errorMessage in $affectedRepos) + { + Write-Output "`t$errorMessage" + } + Write-Output "Please ensure you add a Ref: when using repository resources" + Write-Output "More Info at https://aka.ms/azsdk/engsys/tools-versioning" + exit 1 +} + +Write-Output "All repository resources in yaml files reference a valid tag" \ No newline at end of file diff --git a/eng/common/scripts/add-pullrequest-reviewers.ps1 b/eng/common/scripts/add-pullrequest-reviewers.ps1 index a80d79485f3ba..3198dcb40d2c1 100644 --- a/eng/common/scripts/add-pullrequest-reviewers.ps1 +++ b/eng/common/scripts/add-pullrequest-reviewers.ps1 @@ -18,6 +18,32 @@ param( $AuthToken ) +function AddMembers($memberName, $additionSet) { + $headers = @{ + Authorization = "bearer $AuthToken" + } + $uri = "https://api.github.com/repos/$RepoOwner/$RepoName/pulls/$PRNumber/requested_reviewers" + $errorOccurred = $false + + foreach ($id in $additionSet) { + try { + $postResp = @{} + $postResp[$memberName] = @($id) + $postResp = $postResp | ConvertTo-Json + + Write-Host $postResp + $resp = Invoke-RestMethod -Method Post -Headers $headers -Body $postResp -Uri $uri -MaximumRetryCount 3 + $resp | Write-Verbose + } + catch { + Write-Host "Error attempting to add $user `n$_" + $errorOccurred = $true + } + } + + return $errorOccurred +} + # at least one of these needs to be populated if (-not $GitHubUsers -and -not $GitHubTeams) { Write-Host "No user provided for addition, exiting." @@ -27,54 +53,9 @@ if (-not $GitHubUsers -and -not $GitHubTeams) { $userAdditions = @($GitHubUsers.Split(",") | % { $_.Trim() } | ? { return $_ }) $teamAdditions = @($GitHubTeams.Split(",") | % { $_.Trim() } | ? { return $_ }) -$headers = @{ - Authorization = "bearer $AuthToken" -} -$uri = "https://api.github.com/repos/$RepoOwner/$RepoName/pulls/$PRNumber/requested_reviewers" +$errorsOccurredAddingUsers = AddMembers -memberName "reviewers" -additionSet $userAdditions +$errorsOccurredAddingTeams = AddMembers -memberName "team_reviewers" -additionSet $teamAdditions -try { - $resp = Invoke-RestMethod -Headers $headers $uri -MaximumRetryCount 3 -} -catch { - Write-Error "Invoke-RestMethod [$uri] failed with exception:`n$_" +if ($errorsOccurredAddingUsers -or $errorsOccurredAddingTeams) { exit 1 } - -# the response object takes this form: https://developer.github.com/v3/pulls/review_requests/#response-1 -# before we can push a new reviewer, we need to pull the simple Ids out of the complex objects that came back in the response -$userReviewers = @($resp.users | % { return $_.login }) -$teamReviewers = @($resp.teams | % { return $_.slug }) - -if (!$userReviewers) { $modifiedUserReviewers = @() } else { $modifiedUserReviewers = $userReviewers.Clone() } -$modifiedUserReviewers += ($userAdditions | ? { !$modifiedUserReviewers.Contains($_) }) - -if ($teamReviewers) { $modifiedTeamReviewers = @() } else { $modifiedTeamReviewers = $teamReviewers.Clone() } -$modifiedTeamReviewers += ($teamAdditions | ? { !$modifiedTeamReviewers.Contains($_) }) - -$detectedUserDiffs = Compare-Object -ReferenceObject $userReviewers -DifferenceObject $modifiedUserReviewers -$detectedTeamDiffs = Compare-Object -ReferenceObject $teamReviewers -DifferenceObject $modifiedTeamReviewers - -# Compare-Object returns values when there is a difference between the comparied objects. -# we only want to run the update if there IS a difference. -if ($detectedUserDiffs -or $detectedTeamDiffs) { - $postResp = @{} - - if ($modifiedUserReviewers) { $postResp["reviewers"] = $modifiedUserReviewers } - if ($modifiedTeamReviewers) { $postResp["team_reviewers"] = $modifiedTeamReviewers } - - $postResp = $postResp | ConvertTo-Json - - try { - Write-Host $postResp - $resp = Invoke-RestMethod -Method Post -Headers $headers -Body $postResp -Uri $uri -MaximumRetryCount 3 - $resp | Write-Verbose - } - catch { - Write-Error "Unable to update PR reviewers. `n$_" - } -} -else { - $results = $GitHubUsers + $GitHubTeams - Write-Host "Reviewers $results already added. Exiting." - exit(0) -} diff --git a/eng/common/scripts/artifact-metadata-parsing.ps1 b/eng/common/scripts/artifact-metadata-parsing.ps1 index 93bd6ac5f2dbd..94e95ca170d2b 100644 --- a/eng/common/scripts/artifact-metadata-parsing.ps1 +++ b/eng/common/scripts/artifact-metadata-parsing.ps1 @@ -69,6 +69,7 @@ function ParseMavenPackage($pkg, $workingDirectory) { PackageId = $pkgId GroupId = $groupId PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsMavenPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion -groupId $groupId.Replace(".", "/")) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -150,6 +151,7 @@ function ParseNPMPackage($pkg, $workingDirectory) { $resultObj = New-Object PSObject -Property @{ PackageId = $pkgId PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsNPMPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -208,6 +210,7 @@ function ParseNugetPackage($pkg, $workingDirectory) { return New-Object PSObject -Property @{ PackageId = $pkgId PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsNugetPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -272,6 +275,7 @@ function ParsePyPIPackage($pkg, $workingDirectory) { return New-Object PSObject -Property @{ PackageId = $pkgId PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsPythonPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -298,8 +302,9 @@ function ParseCArtifact($pkg, $workingDirectory) { } return New-Object PSObject -Property @{ - PackageId = 'azure-sdk-for-c' + PackageId = '' PackageVersion = $pkgVersion + ReleaseTag = $pkgVersion # Artifact info is always considered deployable for C becasue it is not # deployed anywhere. Dealing with duplicate tags happens downstream in # CheckArtifactShaAgainstTagsList @@ -331,6 +336,7 @@ function ParseCppArtifact($pkg, $workingDirectory) { return New-Object PSObject -Property @{ PackageId = $pkgName PackageVersion = $pkgVersion + ReleaseTag = "$($pkgId)_$($pkgVersion)" # Artifact info is always considered deployable for now becasue it is not # deployed anywhere. Dealing with duplicate tags happens downstream in # CheckArtifactShaAgainstTagsList @@ -387,39 +393,65 @@ function GetExistingTags($apiUrl) { } } -# Walk across all build artifacts, check them against the appropriate repository, return a list of tags/releases -function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $continueOnError = $false) { - $pkgList = [array]@() - $ParsePkgInfoFn = "" +# Retrieve release tag for artiface package. If multiple packages, then output the first one. +function RetrieveReleaseTag($pkgRepository, $artifactLocation, $continueOnError = $true) { + if (!$artifactLocation) { + return "" + } + try { + $pkgs, $parsePkgInfoFn = RetrievePackages -pkgRepository $pkgRepository -artifactLocation $artifactLocation + if (!$pkgs -or !$pkgs[0]) { + Write-Host "No packages retrieved from artifact location." + return "" + } + if ($pkgs.Count -gt 1) { + Write-Host "There are more than 1 packages retieved from artifact location." + foreach ($pkg in $pkgs) { + Write-Host "The package name is $($pkg.BaseName)" + } + return "" + } + $parsedPackage = &$parsePkgInfoFn -pkg $pkgs[0] -workingDirectory $artifactLocation + return $parsedPackage.ReleaseTag + } + catch { + if ($continueOnError) { + return "" + } + Write-Error "No release tag retrieved from $artifactLocation" + } +} +function RetrievePackages($pkgRepository, $artifactLocation) { + $parsePkgInfoFn = "" $packagePattern = "" - + $pkgRepository = $pkgRepository.Trim() switch ($pkgRepository) { "Maven" { - $ParsePkgInfoFn = "ParseMavenPackage" + $parsePkgInfoFn = "ParseMavenPackage" $packagePattern = "*.pom" break } "Nuget" { - $ParsePkgInfoFn = "ParseNugetPackage" + $parsePkgInfoFn = "ParseNugetPackage" $packagePattern = "*.nupkg" break } "NPM" { - $ParsePkgInfoFn = "ParseNPMPackage" + $parsePkgInfoFn = "ParseNPMPackage" $packagePattern = "*.tgz" break } "PyPI" { - $ParsePkgInfoFn = "ParsePyPIPackage" + $parsePkgInfoFn = "ParsePyPIPackage" $packagePattern = "*.zip" break } "C" { - $ParsePkgInfoFn = "ParseCArtifact" + $parsePkgInfoFn = "ParseCArtifact" $packagePattern = "*.json" } "CPP" { - $ParsePkgInfoFn = "ParseCppArtifact" + $parsePkgInfoFn = "ParseCppArtifact" $packagePattern = "*.json" } default { @@ -427,12 +459,18 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a exit(1) } } + $pkgs = Get-ChildItem -Path $artifactLocation -Include $packagePattern -Recurse -File + return $pkgs, $parsePkgInfoFn +} - $pkgs = (Get-ChildItem -Path $artifactLocation -Include $packagePattern -Recurse -File) +# Walk across all build artifacts, check them against the appropriate repository, return a list of tags/releases +function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $continueOnError = $false) { + $pkgList = [array]@() + $pkgs, $parsePkgInfoFn = RetrievePackages -pkgRepository $pkgRepository -artifactLocation $artifactLocation foreach ($pkg in $pkgs) { try { - $parsedPackage = &$ParsePkgInfoFn -pkg $pkg -workingDirectory $workingDirectory + $parsedPackage = &$parsePkgInfoFn -pkg $pkg -workingDirectory $workingDirectory if ($parsedPackage -eq $null) { continue @@ -444,17 +482,11 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a exit(1) } - $tag = if ($parsedPackage.packageId) { - "$($parsedPackage.packageId)_$($parsedPackage.PackageVersion)" - } else { - $parsedPackage.PackageVersion - } - $pkgList += New-Object PSObject -Property @{ PackageId = $parsedPackage.PackageId PackageVersion = $parsedPackage.PackageVersion GroupId = $parsedPackage.GroupId - Tag = $tag + Tag = $parsedPackage.ReleaseTag ReleaseNotes = $parsedPackage.ReleaseNotes ReadmeContent = $parsedPackage.ReadmeContent IsPrerelease = [AzureEngSemanticVersion]::ParseVersionString($parsedPackage.PackageVersion).IsPrerelease @@ -511,4 +543,4 @@ function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $ap Write-Host "Tags already existing with different SHA versions. Exiting." exit(1) } -} \ No newline at end of file +} diff --git a/eng/common/scripts/common.ps1 b/eng/common/scripts/common.ps1 index f1677b21425fc..6a1f1487832ba 100644 --- a/eng/common/scripts/common.ps1 +++ b/eng/common/scripts/common.ps1 @@ -1,25 +1,29 @@ -$global:RepoRoot = Resolve-Path "${PSScriptRoot}..\..\..\.." -$global:EngDir = Join-Path $global:RepoRoot "eng" -$global:EngCommonDir = Join-Path $global:EngDir "common" -$global:EngCommonScriptsDir = Join-Path $global:EngCommonDir "scripts" -$global:EngScriptsDir = Join-Path $global:EngDir "scripts" +$RepoRoot = Resolve-Path "${PSScriptRoot}..\..\..\.." +$EngDir = Join-Path $RepoRoot "eng" +$EngCommonDir = Join-Path $EngDir "common" +$EngCommonScriptsDir = Join-Path $EngCommonDir "scripts" +$EngScriptsDir = Join-Path $EngDir "scripts" # Import required scripts -. (Join-Path $global:EngCommonScriptsDir SemVer.ps1) -. (Join-Path $global:EngCommonScriptsDir Changelog-Operations.ps1) -. (Join-Path $global:EngCommonScriptsDir Package-Properties.ps1) +. (Join-Path $EngCommonScriptsDir SemVer.ps1) +. (Join-Path $EngCommonScriptsDir ChangeLog-Operations.ps1) +. (Join-Path $EngCommonScriptsDir Package-Properties.ps1) # Setting expected from common languages settings -$global:Language = "Unknown" -$global:PackageRepository = "Unknown" -$global:packagePattern = "Unknown" -$global:MetadataUri = "Unknown" +$Language = "Unknown" +$PackageRepository = "Unknown" +$packagePattern = "Unknown" +$MetadataUri = "Unknown" # Import common language settings -$EngScriptsLanguageSettings = Join-path $global:EngScriptsDir "Language-Settings.ps1" +$EngScriptsLanguageSettings = Join-path $EngScriptsDir "Language-Settings.ps1" if (Test-Path $EngScriptsLanguageSettings) { . $EngScriptsLanguageSettings } +If ($LanguageShort -eq $null) +{ + $LangaugeShort = $Language +} # Transformed Functions $GetPackageInfoFromRepoFn = "Get-${Language}-PackageInfoFromRepo" diff --git a/eng/common/scripts/copy-docs-to-blobstorage.ps1 b/eng/common/scripts/copy-docs-to-blobstorage.ps1 index a0893099293a0..9b7dea48b1d5d 100644 --- a/eng/common/scripts/copy-docs-to-blobstorage.ps1 +++ b/eng/common/scripts/copy-docs-to-blobstorage.ps1 @@ -7,8 +7,11 @@ param ( $Language, $BlobName, $ExitOnError=1, - $UploadLatest=1 + $UploadLatest=1, + $PublicArtifactLocation = "", + $RepoReplaceRegex = "(https://github.com/.*/(?:blob|tree)/)master" ) +. (Join-Path $PSScriptRoot artifact-metadata-parsing.ps1) $Language = $Language.ToLower() @@ -186,7 +189,8 @@ function Upload-Blobs Param ( [Parameter(Mandatory=$true)] [String]$DocDir, [Parameter(Mandatory=$true)] [String]$PkgName, - [Parameter(Mandatory=$true)] [String]$DocVersion + [Parameter(Mandatory=$true)] [String]$DocVersion, + [Parameter(Mandatory=$false)] [String]$ReleaseTag ) #eg : $BlobName = "https://azuresdkdocs.blob.core.windows.net" $DocDest = "$($BlobName)/`$web/$($Language)" @@ -196,7 +200,23 @@ function Upload-Blobs Write-Host "DocVersion $($DocVersion)" Write-Host "DocDir $($DocDir)" Write-Host "Final Dest $($DocDest)/$($PkgName)/$($DocVersion)" + Write-Host "Release Tag $($ReleaseTag)" + # Use the step to replace master link to release tag link + if ($ReleaseTag) { + foreach ($htmlFile in (Get-ChildItem $DocDir -include *.html -r)) + { + $fileContent = Get-Content -Path $htmlFile + $updatedFileContent = $fileContent -replace $RepoReplaceRegex, "`${1}$ReleaseTag" + if ($updatedFileContent -ne $fileContent) { + Set-Content -Path $htmlFile -Value $updatedFileContent + } + } + } + else { + Write-Warning "Not able to do the master link replacement, since no release tag found for the release. Please manually check." + } + Write-Host "Uploading $($PkgName)/$($DocVersion) to $($DocDest)..." & $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/$($DocVersion)$($SASKey)" --recursive=true @@ -213,7 +233,6 @@ function Upload-Blobs } } - if ($Language -eq "javascript") { $PublishedDocs = Get-ChildItem "$($DocLocation)/documentation" | Where-Object -FilterScript {$_.Name.EndsWith(".zip")} @@ -227,7 +246,8 @@ if ($Language -eq "javascript") if($dirList.Length -eq 1){ $DocVersion = $dirList[0].Name Write-Host "Uploading Doc for $($PkgName) Version:- $($DocVersion)..." - Upload-Blobs -DocDir "$($DocLocation)/documentation/$($Item.BaseName)/$($Item.BaseName)/$($DocVersion)" -PkgName $PkgName -DocVersion $DocVersion + $releaseTag = RetrieveReleaseTag "NPM" $PublicArtifactLocation + Upload-Blobs -DocDir "$($DocLocation)/documentation/$($Item.BaseName)/$($Item.BaseName)/$($DocVersion)" -PkgName $PkgName -DocVersion $DocVersion -ReleaseTag $releaseTag } else{ Write-Host "found more than 1 folder under the documentation for package - $($Item.Name)" @@ -252,7 +272,8 @@ if ($Language -eq "dotnet") Write-Host "DocDir $($Item)" Write-Host "PkgName $($PkgName)" Write-Host "DocVersion $($DocVersion)" - Upload-Blobs -DocDir "$($Item)" -PkgName $PkgName -DocVersion $DocVersion + $releaseTag = RetrieveReleaseTag "Nuget" $PublicArtifactLocation + Upload-Blobs -DocDir "$($Item)" -PkgName $PkgName -DocVersion $DocVersion -ReleaseTag $releaseTag } else { @@ -279,8 +300,8 @@ if ($Language -eq "python") Write-Host "Discovered Package Name: $PkgName" Write-Host "Discovered Package Version: $Version" Write-Host "Directory for Upload: $UnzippedDocumentationPath" - - Upload-Blobs -DocDir $UnzippedDocumentationPath -PkgName $PkgName -DocVersion $Version + $releaseTag = RetrieveReleaseTag "PyPI" $PublicArtifactLocation + Upload-Blobs -DocDir $UnzippedDocumentationPath -PkgName $PkgName -DocVersion $Version -ReleaseTag $releaseTag } } @@ -326,8 +347,8 @@ if ($Language -eq "java") Write-Host "DocDir $($UnjarredDocumentationPath)" Write-Host "PkgName $($ArtifactId)" Write-Host "DocVersion $($Version)" - - Upload-Blobs -DocDir $UnjarredDocumentationPath -PkgName $ArtifactId -DocVersion $Version + $releaseTag = RetrieveReleaseTag "Maven" $PublicArtifactLocation + Upload-Blobs -DocDir $UnjarredDocumentationPath -PkgName $ArtifactId -DocVersion $Version -ReleaseTag $releaseTag } Finally { if (![string]::IsNullOrEmpty($UnjarredDocumentationPath)) { @@ -349,11 +370,13 @@ if ($Language -eq "c") # Those loops are left over from previous versions of this script which were # used to publish multiple docs packages in a single invocation. $pkgInfo = Get-Content $DocLocation/package-info.json | ConvertFrom-Json - Upload-Blobs -DocDir $DocLocation -PkgName 'docs' -DocVersion $pkgInfo.version + $releaseTag = RetrieveReleaseTag "C" $PublicArtifactLocation + Upload-Blobs -DocDir $DocLocation -PkgName 'docs' -DocVersion $pkgInfo.version -ReleaseTag $releaseTag } if ($Language -eq "cpp") { $packageInfo = (Get-Content (Join-Path $DocLocation 'package-info.json') | ConvertFrom-Json) - Upload-Blobs -DocDir $DocLocation -PkgName $packageInfo.name -DocVersion $packageInfo.version -} \ No newline at end of file + $releaseTag = RetrieveReleaseTag "CPP" $PublicArtifactLocation + Upload-Blobs -DocDir $DocLocation -PkgName $packageInfo.name -DocVersion $packageInfo.version -ReleaseTag $releaseTag +} diff --git a/eng/common/scripts/get-codeowners.ps1 b/eng/common/scripts/get-codeowners.ps1 index 8452f9fd650b6..f28cb3df78995 100644 --- a/eng/common/scripts/get-codeowners.ps1 +++ b/eng/common/scripts/get-codeowners.ps1 @@ -1,6 +1,7 @@ param ( $TargetDirectory, # should be in relative form from root of repo. EG: sdk/servicebus - $RootDirectory # ideally $(Build.SourcesDirectory) + $RootDirectory, # ideally $(Build.SourcesDirectory) + $VsoVariable = "" # target devops output variable ) $target = $TargetDirectory.ToLower().Trim("/") $codeOwnersLocation = Join-Path $RootDirectory -ChildPath ".github/CODEOWNERS" @@ -29,6 +30,16 @@ $results = $ownedFolders[$target] if ($results) { Write-Host "Found a folder $results to match $target" + + if ($VsoVariable) { + $alreadyPresent = [System.Environment]::GetEnvironmentVariable($VsoVariable) + + if ($alreadyPresent) { + $results += ",$alreadyPresent" + } + Write-Host "##vso[task.setvariable variable=$VsoVariable;]$results" + } + return $results } else { diff --git a/eng/common/scripts/update-docs-metadata.ps1 b/eng/common/scripts/update-docs-metadata.ps1 index 42ca30894fd6d..7cf65fa7d2a4d 100644 --- a/eng/common/scripts/update-docs-metadata.ps1 +++ b/eng/common/scripts/update-docs-metadata.ps1 @@ -17,6 +17,8 @@ param ( . (Join-Path $PSScriptRoot artifact-metadata-parsing.ps1) . (Join-Path $PSScriptRoot SemVer.ps1) +$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)master" + function GetMetaData($lang){ switch ($lang) { "java" { @@ -75,6 +77,10 @@ function GetAdjustedReadmeContent($pkgInfo, $lang){ if ($headerContentMatches) { $foundTitle = $headerContentMatches.Matches[0] $fileContent = $pkgInfo.ReadmeContent -replace $foundTitle, "$foundTitle - Version $($pkgInfo.PackageVersion) `n" + + # Replace github master link with release tag. + $ReplacementPattern = "`${1}$($pkgInfo.Tag)" + $fileContent = $fileContent -replace $releaseReplaceRegex, $ReplacementPattern } $header = "---`ntitle: $foundTitle`nkeywords: Azure, $lang, SDK, API, $($pkgInfo.PackageId), $service`nauthor: maggiepint`nms.author: magpint`nms.date: $date`nms.topic: article`nms.prod: azure`nms.technology: azure`nms.devlang: $lang`nms.service: $service`n---`n" diff --git a/eng/pipelines/aggregate-reports.yml b/eng/pipelines/aggregate-reports.yml index 629bee369cff8..2dd984362df61 100644 --- a/eng/pipelines/aggregate-reports.yml +++ b/eng/pipelines/aggregate-reports.yml @@ -1,6 +1,12 @@ trigger: none -pr: none +pr: + branches: + include: + - master + paths: + include: + - eng/pipelines/aggregate-reports.yml jobs: - job: 'ValidateDependencies' @@ -26,4 +32,11 @@ jobs: destination: AzureBlob storage: azuresdkartifacts containerName: 'azure-sdk-for-python' - blobPrefix: dependencies \ No newline at end of file + blobPrefix: dependencies + + - task: PowerShell@2 + displayName: "Verify Repository Resource Refs" + inputs: + pwsh: true + workingDirectory: $(Build.SourcesDirectory) + filePath: eng/common/scripts/Verify-Resource-Ref.ps1 \ No newline at end of file diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 04278e6ddbb67..79b9db99e263c 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -249,28 +249,28 @@ stages: displayName: Setup DevOpsFeedName - task: TwineAuthenticate@0 - displayName: 'Authenticate to feed: $(DevFeedName)' + displayName: 'Authenticate to feed' inputs: artifactFeeds: $(DevFeedName) - ${{ each artifact in parameters.Artifacts }}: - - pwsh: | Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}} New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace) $underscorePrefix = "${{artifact.name}}" $dashPrefix = "${{artifact.name}}".Replace("_", "-") - Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]*.dev* $(Pipeline.Workspace)/${{artifact.safeName}} - Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]*.dev* $(Pipeline.Workspace)/${{artifact.safeName}} + Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]*a[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}} + Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]*a[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}} Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}} + $fileCount = (Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}} | Measure-Object).Count - Write-Output "##vso[task.setvariable variable=FilesToUploadCount]$fileCount" + if ($fileCount -eq 0) { + Write-Host "No alpha packages for ${{artifact.safeName}} to publish." + exit 0 + } - - script: | - set -e - twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.dev*.whl - echo "Uploaded whl to devops feed" - twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.dev*.zip - echo "Uploaded sdist to devops feed" - displayName: 'Publish package to feed: $(DevFeedName)' - condition: gt(variables['FilesToUploadCount'], 0) \ No newline at end of file + twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*a*.whl + echo "Uploaded whl to devops feed $(DevFeedName)" + twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*a*.zip + echo "Uploaded sdist to devops feed $(DevFeedName)" + displayName: 'Publish ${{artifact.name}} alpha package' \ No newline at end of file diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 81d4f673797c6..4a71a5bc18e31 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -1,10 +1,9 @@ $Language = "python" -$Lang = "python" $PackageRepository = "PyPI" $packagePattern = "*.zip" $MetadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/python-packages.csv" -function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName) +function Get-python-PackageInfoFromRepo ($pkgPath, $serviceDirectory, $pkgName) { $pkgName = $pkgName.Replace('_', '-') if (Test-Path (Join-Path $pkgPath "setup.py")) @@ -15,7 +14,7 @@ function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName) popd if (($setupProps -ne $null) -and ($setupProps[0] -eq $pkgName)) { - return [PackageProps]::new($setupProps[0], $setupProps[1], $pkgPath, $serviceName) + return [PackageProps]::new($setupProps[0], $setupProps[1], $pkgPath, $serviceDirectory) } } return $null @@ -25,7 +24,7 @@ function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName) function IsPythonPackageVersionPublished($pkgId, $pkgVersion) { try { - $existingVersion = (Invoke-RestMethod -MaximumRetryCount 3 -Method "Get" -uri "https://pypi.org/pypi/$pkgId/$pkgVersion/json").info.version + $existingVersion = (Invoke-RestMethod -MaximumRetryCount 3 -RetryIntervalSec 10 -Method "Get" -uri "https://pypi.org/pypi/$pkgId/$pkgVersion/json").info.version # if existingVersion exists, then it's already been published return $True } @@ -47,7 +46,7 @@ function IsPythonPackageVersionPublished($pkgId, $pkgVersion) { } # Parse out package publishing information given a python sdist of ZIP format. -function Parse-python-Package($pkg, $workingDirectory) { +function Get-python-PackageInfoFromPackageFile ($pkg, $workingDirectory) { $pkg.Basename -match $SDIST_PACKAGE_REGEX | Out-Null $pkgId = $matches["package"] @@ -84,7 +83,7 @@ function Parse-python-Package($pkg, $workingDirectory) { } # Stage and Upload Docs to blob Storage -function StageAndUpload-python-Docs() +function Publish-python-GithubIODocs () { $PublishedDocs = Get-ChildItem "$DocLocation" | Where-Object -FilterScript {$_.Name.EndsWith(".zip")} diff --git a/eng/tox/allowed_pylint_failures.py b/eng/tox/allowed_pylint_failures.py index 1a7cd2a71e76c..1adcea8fcdadd 100644 --- a/eng/tox/allowed_pylint_failures.py +++ b/eng/tox/allowed_pylint_failures.py @@ -47,4 +47,5 @@ "azure-synapse-spark", "azure-synapse-accesscontrol", "azure-synapse-nspkg", + "azure-ai-anomalydetector", ] diff --git a/eng/tox/sanitize_setup.py b/eng/tox/sanitize_setup.py index baaaedaca04d4..ceeb1e85d77ad 100644 --- a/eng/tox/sanitize_setup.py +++ b/eng/tox/sanitize_setup.py @@ -42,7 +42,12 @@ def update_requires(setup_py_path, requires_dict): def is_required_version_on_pypi(package_name, spec): client = PyPIClient() - versions = [str(v) for v in client.get_ordered_versions(package_name) if str(v) in spec] + try: + pypi_results = client.get_ordered_versions(package_name) + except: + pypi_results = [] + + versions = [str(v) for v in pypi_results if str(v) in spec] return versions diff --git a/eng/versioning/version_set_dev.py b/eng/versioning/version_set_dev.py index e65feeae18dbe..fb0c7836bb14d 100644 --- a/eng/versioning/version_set_dev.py +++ b/eng/versioning/version_set_dev.py @@ -25,8 +25,7 @@ def format_build_id(build_id): def get_dev_version(current_version, build_id): parsed_version = parse(current_version) - #release = parsed_version.release - return "{0}.dev{1}".format(parsed_version, build_id) + return "{0}a{1}".format(parsed_version.base_version, build_id) def is_in_service(sdk_path, setup_py_location, service_name): sdk_prefix = path.normpath(sdk_path) diff --git a/eng/versioning/version_shared.py b/eng/versioning/version_shared.py index d5d6011f74cec..2d20727df8e18 100644 --- a/eng/versioning/version_shared.py +++ b/eng/versioning/version_shared.py @@ -34,7 +34,7 @@ logging.getLogger().setLevel(logging.INFO) def path_excluded(path): - return "-nspkg" in path or "tests" in path or "mgmt" in path or is_metapackage(path) + return "-nspkg" in path or "tests" in path or is_metapackage(path) # Metapackages do not have an 'azure' folder within them def is_metapackage(package_path): @@ -59,6 +59,7 @@ def get_packages(args, package_name = ""): target_dir = root_dir paths = get_setup_py_paths(args.glob_string, target_dir) + # Check if package is excluded if a package name param is passed if package_name and not any(filter(lambda x: package_name == os.path.basename(os.path.dirname(x)), paths)): logging.info("Package {} is excluded from version update tool".format(package_name)) diff --git a/scripts/devops_tasks/common_tasks.py b/scripts/devops_tasks/common_tasks.py index 932e9b801d05e..5c3ed4ca9fe09 100644 --- a/scripts/devops_tasks/common_tasks.py +++ b/scripts/devops_tasks/common_tasks.py @@ -48,7 +48,8 @@ "azure-servicefabric", "nspkg", "azure-keyvault", - "azure-synapse" + "azure-synapse", + "azure-ai-anomalydetector", ] META_PACKAGES = ["azure", "azure-mgmt", "azure-keyvault"] REGRESSION_EXCLUDED_PACKAGES = [ diff --git a/scripts/devops_tasks/git_helper.py b/scripts/devops_tasks/git_helper.py index d999bb4f463ae..7a613a6f0fa98 100644 --- a/scripts/devops_tasks/git_helper.py +++ b/scripts/devops_tasks/git_helper.py @@ -15,13 +15,14 @@ # Oldest release of SDK packages that should be skipped EXCLUDED_PACKAGE_VERSIONS = { - 'azure-storage-file-share': ['12.0.0', '12.0.0b5'], - 'azure-storage-queue': ['0.37.0', '1.0.0', '1.1.0', '1.2.0rc1', '1.3.0', '1.4.0', '2.0.0', '2.0.1', '2.1.0'], - 'azure-storage-file': ['0.37.0', '1.0.0', '1.1.0', '1.2.0rc1', '1.3.0', '1.3.1', '1.4.0', '2.0.0', '2.0.1', '2.1.0'], - 'azure-storage-blob': ['0.37.0', '0.37.1', '1.0.0', '1.1.0', '1.2.0rc1', '1.3.0', '1.3.1', '1.4.0', '1.5.0', '2.0.0', '2.0.1', '2.1.0',], - 'azure-eventhub': ['0.2.0', '1.0.0', '1.1.0', '1.1.1', '1.2.0rc1', '1.2.0', '1.3.0', '1.3.1', '1.3.2', '1.3.3',], - 'azure-cosmos': ['3.0.0', '3.0.1', '3.0.2', '3.1.0', '3.1.1', '3.1.2', '3.2.0'], - 'azure-servicebus': ['0.20.0rc1', '0.20.0rc2', '0.20.0', '0.20.1', '0.20.2', '0.20.3', '0.21.0', '0.21.1', '0.50.0', '0.50.1', '0.50.2', '0.50.3'] + 'azure-storage-file-share': '12.0.0', + 'azure-storage-queue': '2.1.0', + 'azure-storage-file': '2.1.0', + 'azure-storage-blob': '2.1.0', + 'azure-eventhub': '1.3.3', + 'azure-cosmos': '3.2.0', + 'azure-servicebus': '0.50.3', + 'azure-eventgrid': '1.3.0', } # This method identifies release tag for latest or oldest released version of a given package @@ -41,7 +42,7 @@ def get_release_tag(dep_pkg_name, isLatest): # filter excluded versions if dep_pkg_name in EXCLUDED_PACKAGE_VERSIONS: - versions = [v for v in versions if v not in EXCLUDED_PACKAGE_VERSIONS[dep_pkg_name]] + versions = [v for v in versions if parse(v) > parse(EXCLUDED_PACKAGE_VERSIONS[dep_pkg_name])] logging.info("Filtered versions for {0} is: {1}".format(dep_pkg_name, versions)) if not versions: diff --git a/scripts/devops_tasks/test_regression.py b/scripts/devops_tasks/test_regression.py index b0722ea39db44..ea56872c7d419 100644 --- a/scripts/devops_tasks/test_regression.py +++ b/scripts/devops_tasks/test_regression.py @@ -260,10 +260,10 @@ def _is_package_installed(self, package, version): installed_pkgs = get_installed_packages(site_packages) logging.info("Installed packages: {}".format(installed_pkgs)) # Verify installed package version - # Search for exact version or dev build version of current version. + # Search for exact version or alpha build version of current version. pkg_search_string = "{0}=={1}".format(package, version) - dev_build_search_string = "{0}=={1}.dev".format(package, version) - return any(p == pkg_search_string or p.startswith(dev_build_search_string) for p in installed_pkgs) + alpha_build_search_string = "{0}=={1}a".format(package, version) + return any(p == pkg_search_string or p.startswith(alpha_build_search_string) for p in installed_pkgs) # This method identifies package dependency map for all packages in azure sdk diff --git a/sdk/advisor/ci.yml b/sdk/advisor/ci.yml index 73a61c30332b9..1de69ccfc4213 100644 --- a/sdk/advisor/ci.yml +++ b/sdk/advisor/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: advisor Artifacts: - name: azure_mgmt_advisor - safeName: azuremgmtadvisor \ No newline at end of file + safeName: azuremgmtadvisor diff --git a/sdk/aks/ci.yml b/sdk/aks/ci.yml index f5b46456d9333..c5860d4b0b709 100644 --- a/sdk/aks/ci.yml +++ b/sdk/aks/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: aks Artifacts: - name: azure_mgmt_devspaces - safeName: azuremgmtdevspaces \ No newline at end of file + safeName: azuremgmtdevspaces diff --git a/sdk/alertsmanagement/ci.yml b/sdk/alertsmanagement/ci.yml index 4e437dbbd693b..f5982f943675b 100644 --- a/sdk/alertsmanagement/ci.yml +++ b/sdk/alertsmanagement/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: alertsmanagement Artifacts: - name: azure_mgmt_alertsmanagement - safeName: azuremgmtalertsmanagement \ No newline at end of file + safeName: azuremgmtalertsmanagement diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md b/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md new file mode 100644 index 0000000000000..5f0898b937c30 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md @@ -0,0 +1,21 @@ +# Release History + +## 3.0.0b2 (2020-08-27) + + **Bug Fixes** + - Fixed an issue with ChangePointDetect + + **Breaking Changes** + - Renamed `entire_detect` to `detect_entire_series` + - Renamed `APIError` to `AnomalyDetectorError` + - Renamed `Request` to `DetectRequest` + - Renamed `LastDetect` to `DetectLastPoint` + - Renamed `ChangePointDetect` to `DetectChangePoint` + - Renamed `Granularity` to `TimeGranularity` + - Renamed `minutely` and `secondly` to `per_minute` and `per_second` + - Renamed `Point` to `TimeSeriesPoint` + + +## 3.0.0b1 (2020-08-17) + + - Initial Release diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/MANIFEST.in b/sdk/anomalydetector/azure-ai-anomalydetector/MANIFEST.in new file mode 100644 index 0000000000000..622490cdae53b --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/MANIFEST.in @@ -0,0 +1,6 @@ +recursive-include tests *.py *.yaml +recursive-include samples *.py *.md +include *.md +include azure/__init__.py +include azure/ai/__init__.py + diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/README.md b/sdk/anomalydetector/azure-ai-anomalydetector/README.md new file mode 100644 index 0000000000000..277d153b82563 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/README.md @@ -0,0 +1,22 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Cognitive Services Anomaly Detector Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. + +For a more complete set of Azure libraries, see the +[azure sdk python release](https://aka.ms/azsdk/python/all). + +# Usage + +For code examples, see [Cognitive Services Anomaly Detector](https://docs.microsoft.com/python/api/overview/azure/cognitive-services) +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) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-cognitiveservices-anomalydetector%2FREADME.png) diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/__init__.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/__init__.py new file mode 100644 index 0000000000000..0260537a02bb9 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/__init__.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/__init__.py new file mode 100644 index 0000000000000..0260537a02bb9 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/__init__.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/__init__.py new file mode 100644 index 0000000000000..a55b787999fc8 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/__init__.py @@ -0,0 +1,19 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._anomaly_detector_client import AnomalyDetectorClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['AnomalyDetectorClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_anomaly_detector_client.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_anomaly_detector_client.py new file mode 100644 index 0000000000000..08818e25a3660 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_anomaly_detector_client.py @@ -0,0 +1,61 @@ +# 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. +# -------------------------------------------------------------------------- + +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 azure.core.credentials import AzureKeyCredential + +from ._configuration import AnomalyDetectorClientConfiguration +from .operations import AnomalyDetectorClientOperationsMixin +from . import models + + +class AnomalyDetectorClient(AnomalyDetectorClientOperationsMixin): + """The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.AzureKeyCredential + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :type endpoint: str + """ + + def __init__( + self, + credential, # type: AzureKeyCredential + endpoint, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + base_url = '{Endpoint}/anomalydetector/v1.0' + self._config = AnomalyDetectorClientConfiguration(credential, endpoint, **kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> AnomalyDetectorClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_configuration.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_configuration.py new file mode 100644 index 0000000000000..1db866bdb6268 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_configuration.py @@ -0,0 +1,68 @@ +# 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. +# -------------------------------------------------------------------------- + +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 AzureKeyCredential + + +class AnomalyDetectorClientConfiguration(Configuration): + """Configuration for AnomalyDetectorClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.AzureKeyCredential + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :type endpoint: str + """ + + def __init__( + self, + credential, # type: AzureKeyCredential + endpoint, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + super(AnomalyDetectorClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.endpoint = endpoint + kwargs.setdefault('sdk_moniker', 'ai-anomalydetector/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AzureKeyCredentialPolicy(self.credential, 'Ocp-Apim-Subscription-Key', **kwargs) diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_metadata.json b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_metadata.json new file mode 100644 index 0000000000000..3092456454e21 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_metadata.json @@ -0,0 +1,95 @@ +{ + "chosen_version": "1.0", + "total_api_version_list": ["1.0"], + "client": { + "name": "AnomalyDetectorClient", + "filename": "_anomaly_detector_client", + "description": "The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis.", + "base_url": null, + "custom_base_url": "\u0027{Endpoint}/anomalydetector/v1.0\u0027", + "azure_arm": false, + "has_lro_operations": false + }, + "global_parameters": { + "sync_method": { + "credential": { + "method_signature": "credential, # type: AzureKeyCredential", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.AzureKeyCredential", + "required": true + }, + "endpoint": { + "method_signature": "endpoint, # type: str", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).", + "docstring_type": "str", + "required": true + } + }, + "async_method": { + "credential": { + "method_signature": "credential, # type: AzureKeyCredential", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.AzureKeyCredential", + "required": true + }, + "endpoint": { + "method_signature": "endpoint, # type: str", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, endpoint" + }, + "config": { + "credential": true, + "credential_scopes": null, + "credential_default_policy_type": "AzureKeyCredentialPolicy", + "credential_default_policy_type_has_async_version": false, + "credential_key_header_name": "Ocp-Apim-Subscription-Key" + }, + "operation_groups": { + }, + "operation_mixins": { + "entire_detect" : { + "sync": { + "signature": "def entire_detect(\n self,\n body, # type: \"models.Request\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Detect anomalies for the entire series in batch.\n\nThis operation generates a model using an entire series, each point is detected with the same\nmodel. With this method, points before and after a certain point are used to determine whether\nit is an anomaly. The entire detection can give user an overall status of the time series.\n\n:param body: Time series points and period if needed. Advanced model parameters can also be set\n in the request.\n:type body: ~azure.ai.anomalydetector.models.Request\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntireDetectResponse, or the result of cls(response)\n:rtype: ~azure.ai.anomalydetector.models.EntireDetectResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def entire_detect(\n self,\n body: \"models.Request\",\n **kwargs\n) -\u003e \"models.EntireDetectResponse\":\n", + "doc": "\"\"\"Detect anomalies for the entire series in batch.\n\nThis operation generates a model using an entire series, each point is detected with the same\nmodel. With this method, points before and after a certain point are used to determine whether\nit is an anomaly. The entire detection can give user an overall status of the time series.\n\n:param body: Time series points and period if needed. Advanced model parameters can also be set\n in the request.\n:type body: ~azure.ai.anomalydetector.models.Request\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntireDetectResponse, or the result of cls(response)\n:rtype: ~azure.ai.anomalydetector.models.EntireDetectResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "body" + }, + "last_detect" : { + "sync": { + "signature": "def last_detect(\n self,\n body, # type: \"models.Request\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Detect anomaly status of the latest point in time series.\n\nThis operation generates a model using points before the latest one. With this method, only\nhistorical points are used to determine whether the target point is an anomaly. The latest\npoint detecting operation matches the scenario of real-time monitoring of business metrics.\n\n:param body: Time series points and period if needed. Advanced model parameters can also be set\n in the request.\n:type body: ~azure.ai.anomalydetector.models.Request\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LastDetectResponse, or the result of cls(response)\n:rtype: ~azure.ai.anomalydetector.models.LastDetectResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def last_detect(\n self,\n body: \"models.Request\",\n **kwargs\n) -\u003e \"models.LastDetectResponse\":\n", + "doc": "\"\"\"Detect anomaly status of the latest point in time series.\n\nThis operation generates a model using points before the latest one. With this method, only\nhistorical points are used to determine whether the target point is an anomaly. The latest\npoint detecting operation matches the scenario of real-time monitoring of business metrics.\n\n:param body: Time series points and period if needed. Advanced model parameters can also be set\n in the request.\n:type body: ~azure.ai.anomalydetector.models.Request\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LastDetectResponse, or the result of cls(response)\n:rtype: ~azure.ai.anomalydetector.models.LastDetectResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "body" + }, + "change_point_detect" : { + "sync": { + "signature": "def change_point_detect(\n self,\n body, # type: \"models.ChangePointDetectRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Detect change point for the entire series.\n\nEvaluate change point score of every series point.\n\n:param body: Time series points and granularity is needed. Advanced model parameters can also\n be set in the request if needed.\n:type body: ~azure.ai.anomalydetector.models.ChangePointDetectRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ChangePointDetectResponse, or the result of cls(response)\n:rtype: ~azure.ai.anomalydetector.models.ChangePointDetectResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def change_point_detect(\n self,\n body: \"models.ChangePointDetectRequest\",\n **kwargs\n) -\u003e \"models.ChangePointDetectResponse\":\n", + "doc": "\"\"\"Detect change point for the entire series.\n\nEvaluate change point score of every series point.\n\n:param body: Time series points and granularity is needed. Advanced model parameters can also\n be set in the request if needed.\n:type body: ~azure.ai.anomalydetector.models.ChangePointDetectRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ChangePointDetectResponse, or the result of cls(response)\n:rtype: ~azure.ai.anomalydetector.models.ChangePointDetectResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "body" + } + }, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}" +} \ No newline at end of file diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_version.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_version.py new file mode 100644 index 0000000000000..976446718bdd8 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0b2" diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/__init__.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/__init__.py new file mode 100644 index 0000000000000..9dac254ddfbd6 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/__init__.py @@ -0,0 +1,10 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._anomaly_detector_client_async import AnomalyDetectorClient +__all__ = ['AnomalyDetectorClient'] diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_anomaly_detector_client_async.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_anomaly_detector_client_async.py new file mode 100644 index 0000000000000..be6f209c6abf4 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_anomaly_detector_client_async.py @@ -0,0 +1,52 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core import AsyncPipelineClient +from azure.core.credentials import AzureKeyCredential +from msrest import Deserializer, Serializer + +from ._configuration_async import AnomalyDetectorClientConfiguration +from .operations_async import AnomalyDetectorClientOperationsMixin +from .. import models + + +class AnomalyDetectorClient(AnomalyDetectorClientOperationsMixin): + """The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.AzureKeyCredential + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :type endpoint: str + """ + + def __init__( + self, + credential: AzureKeyCredential, + endpoint: str, + **kwargs: Any + ) -> None: + base_url = '{Endpoint}/anomalydetector/v1.0' + self._config = AnomalyDetectorClientConfiguration(credential, endpoint, **kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AnomalyDetectorClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_configuration_async.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_configuration_async.py new file mode 100644 index 0000000000000..1554cc3e4cc67 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_configuration_async.py @@ -0,0 +1,61 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies + +from .._version import VERSION + + +class AnomalyDetectorClientConfiguration(Configuration): + """Configuration for AnomalyDetectorClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.AzureKeyCredential + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :type endpoint: str + """ + + def __init__( + self, + credential: AzureKeyCredential, + endpoint: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + super(AnomalyDetectorClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.endpoint = endpoint + kwargs.setdefault('sdk_moniker', 'ai-anomalydetector/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AzureKeyCredentialPolicy(self.credential, 'Ocp-Apim-Subscription-Key', **kwargs) diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/operations_async/__init__.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/operations_async/__init__.py new file mode 100644 index 0000000000000..228b2fe26d48f --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/operations_async/__init__.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._anomaly_detector_client_operations_async import AnomalyDetectorClientOperationsMixin + +__all__ = [ + 'AnomalyDetectorClientOperationsMixin', +] diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/operations_async/_anomaly_detector_client_operations_async.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/operations_async/_anomaly_detector_client_operations_async.py new file mode 100644 index 0000000000000..cdc004782055f --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/operations_async/_anomaly_detector_client_operations_async.py @@ -0,0 +1,198 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AnomalyDetectorClientOperationsMixin: + + async def detect_entire_series( + self, + body: "models.DetectRequest", + **kwargs + ) -> "models.EntireDetectResponse": + """Detect anomalies for the entire series in batch. + + This operation generates a model using an entire series, each point is detected with the same + model. With this method, points before and after a certain point are used to determine whether + it is an anomaly. The entire detection can give user an overall status of the time series. + + :param body: Time series points and period if needed. Advanced model parameters can also be set + in the request. + :type body: ~azure.ai.anomalydetector.models.DetectRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EntireDetectResponse, or the result of cls(response) + :rtype: ~azure.ai.anomalydetector.models.EntireDetectResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.EntireDetectResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.detect_entire_series.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'DetectRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.AnomalyDetectorError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('EntireDetectResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + detect_entire_series.metadata = {'url': '/timeseries/entire/detect'} # type: ignore + + async def detect_last_point( + self, + body: "models.DetectRequest", + **kwargs + ) -> "models.LastDetectResponse": + """Detect anomaly status of the latest point in time series. + + This operation generates a model using points before the latest one. With this method, only + historical points are used to determine whether the target point is an anomaly. The latest + point detecting operation matches the scenario of real-time monitoring of business metrics. + + :param body: Time series points and period if needed. Advanced model parameters can also be set + in the request. + :type body: ~azure.ai.anomalydetector.models.DetectRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LastDetectResponse, or the result of cls(response) + :rtype: ~azure.ai.anomalydetector.models.LastDetectResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.LastDetectResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.detect_last_point.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'DetectRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.AnomalyDetectorError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('LastDetectResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + detect_last_point.metadata = {'url': '/timeseries/last/detect'} # type: ignore + + async def detect_change_point( + self, + body: "models.ChangePointDetectRequest", + **kwargs + ) -> "models.ChangePointDetectResponse": + """Detect change point for the entire series. + + Evaluate change point score of every series point. + + :param body: Time series points and granularity is needed. Advanced model parameters can also + be set in the request if needed. + :type body: ~azure.ai.anomalydetector.models.ChangePointDetectRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChangePointDetectResponse, or the result of cls(response) + :rtype: ~azure.ai.anomalydetector.models.ChangePointDetectResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ChangePointDetectResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.detect_change_point.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'ChangePointDetectRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.AnomalyDetectorError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ChangePointDetectResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + detect_change_point.metadata = {'url': '/timeseries/changepoint/detect'} # type: ignore diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/__init__.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/__init__.py new file mode 100644 index 0000000000000..f81f16ff8cb10 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/__init__.py @@ -0,0 +1,41 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AnomalyDetectorError + from ._models_py3 import ChangePointDetectRequest + from ._models_py3 import ChangePointDetectResponse + from ._models_py3 import DetectRequest + from ._models_py3 import EntireDetectResponse + from ._models_py3 import LastDetectResponse + from ._models_py3 import TimeSeriesPoint +except (SyntaxError, ImportError): + from ._models import AnomalyDetectorError # type: ignore + from ._models import ChangePointDetectRequest # type: ignore + from ._models import ChangePointDetectResponse # type: ignore + from ._models import DetectRequest # type: ignore + from ._models import EntireDetectResponse # type: ignore + from ._models import LastDetectResponse # type: ignore + from ._models import TimeSeriesPoint # type: ignore + +from ._anomaly_detector_client_enums import ( + AnomalyDetectorErrorCodes, + TimeGranularity, +) + +__all__ = [ + 'AnomalyDetectorError', + 'ChangePointDetectRequest', + 'ChangePointDetectResponse', + 'DetectRequest', + 'EntireDetectResponse', + 'LastDetectResponse', + 'TimeSeriesPoint', + 'AnomalyDetectorErrorCodes', + 'TimeGranularity', +] diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_anomaly_detector_client_enums.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_anomaly_detector_client_enums.py new file mode 100644 index 0000000000000..5dc5bbf98800a --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_anomaly_detector_client_enums.py @@ -0,0 +1,54 @@ +# 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. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AnomalyDetectorErrorCodes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The error code. + """ + + INVALID_CUSTOM_INTERVAL = "InvalidCustomInterval" + BAD_ARGUMENT = "BadArgument" + INVALID_GRANULARITY = "InvalidGranularity" + INVALID_PERIOD = "InvalidPeriod" + INVALID_MODEL_ARGUMENT = "InvalidModelArgument" + INVALID_SERIES = "InvalidSeries" + INVALID_JSON_FORMAT = "InvalidJsonFormat" + REQUIRED_GRANULARITY = "RequiredGranularity" + REQUIRED_SERIES = "RequiredSeries" + +class TimeGranularity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Can only be one of yearly, monthly, weekly, daily, hourly, minutely or secondly. Granularity is + used for verify whether input series is valid. + """ + + YEARLY = "yearly" + MONTHLY = "monthly" + WEEKLY = "weekly" + DAILY = "daily" + HOURLY = "hourly" + PER_MINUTE = "minutely" + PER_SECOND = "secondly" diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models.py new file mode 100644 index 0000000000000..e2eec215a1892 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models.py @@ -0,0 +1,354 @@ +# 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. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AnomalyDetectorError(msrest.serialization.Model): + """Error information returned by the API. + + :param code: The error code. Possible values include: "InvalidCustomInterval", "BadArgument", + "InvalidGranularity", "InvalidPeriod", "InvalidModelArgument", "InvalidSeries", + "InvalidJsonFormat", "RequiredGranularity", "RequiredSeries". + :type code: str or ~azure.ai.anomalydetector.models.AnomalyDetectorErrorCodes + :param message: A message explaining the error reported by the service. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AnomalyDetectorError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ChangePointDetectRequest(msrest.serialization.Model): + """ChangePointDetectRequest. + + All required parameters must be populated in order to send to Azure. + + :param series: Required. Time series data points. Points should be sorted by timestamp in + ascending order to match the change point detection result. + :type series: list[~azure.ai.anomalydetector.models.TimeSeriesPoint] + :param granularity: Required. Can only be one of yearly, monthly, weekly, daily, hourly, + minutely or secondly. Granularity is used for verify whether input series is valid. Possible + values include: "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly". + :type granularity: str or ~azure.ai.anomalydetector.models.TimeGranularity + :param custom_interval: Custom Interval is used to set non-standard time interval, for example, + if the series is 5 minutes, request can be set as {"granularity":"minutely", + "customInterval":5}. + :type custom_interval: int + :param period: Optional argument, periodic value of a time series. If the value is null or does + not present, the API will determine the period automatically. + :type period: int + :param stable_trend_window: Optional argument, advanced model parameter, a default + stableTrendWindow will be used in detection. + :type stable_trend_window: int + :param threshold: Optional argument, advanced model parameter, between 0.0-1.0, the lower the + value is, the larger the trend error will be which means less change point will be accepted. + :type threshold: float + """ + + _validation = { + 'series': {'required': True}, + 'granularity': {'required': True}, + } + + _attribute_map = { + 'series': {'key': 'series', 'type': '[TimeSeriesPoint]'}, + 'granularity': {'key': 'granularity', 'type': 'str'}, + 'custom_interval': {'key': 'customInterval', 'type': 'int'}, + 'period': {'key': 'period', 'type': 'int'}, + 'stable_trend_window': {'key': 'stableTrendWindow', 'type': 'int'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(ChangePointDetectRequest, self).__init__(**kwargs) + self.series = kwargs['series'] + self.granularity = kwargs['granularity'] + self.custom_interval = kwargs.get('custom_interval', None) + self.period = kwargs.get('period', None) + self.stable_trend_window = kwargs.get('stable_trend_window', None) + self.threshold = kwargs.get('threshold', None) + + +class ChangePointDetectResponse(msrest.serialization.Model): + """ChangePointDetectResponse. + + All required parameters must be populated in order to send to Azure. + + :param period: Required. Frequency extracted from the series, zero means no recurrent pattern + has been found. + :type period: int + :param is_change_point: Required. isChangePoint contains change point properties for each input + point. True means an anomaly either negative or positive has been detected. The index of the + array is consistent with the input series. + :type is_change_point: list[bool] + :param confidence_scores: Required. the change point confidence of each point. + :type confidence_scores: list[float] + """ + + _validation = { + 'period': {'required': True}, + 'is_change_point': {'required': True}, + 'confidence_scores': {'required': True}, + } + + _attribute_map = { + 'period': {'key': 'period', 'type': 'int'}, + 'is_change_point': {'key': 'isChangePoint', 'type': '[bool]'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': '[float]'}, + } + + def __init__( + self, + **kwargs + ): + super(ChangePointDetectResponse, self).__init__(**kwargs) + self.period = kwargs['period'] + self.is_change_point = kwargs['is_change_point'] + self.confidence_scores = kwargs['confidence_scores'] + + +class DetectRequest(msrest.serialization.Model): + """DetectRequest. + + All required parameters must be populated in order to send to Azure. + + :param series: Required. Time series data points. Points should be sorted by timestamp in + ascending order to match the anomaly detection result. If the data is not sorted correctly or + there is duplicated timestamp, the API will not work. In such case, an error message will be + returned. + :type series: list[~azure.ai.anomalydetector.models.TimeSeriesPoint] + :param granularity: Required. Can only be one of yearly, monthly, weekly, daily, hourly, + minutely or secondly. Granularity is used for verify whether input series is valid. Possible + values include: "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly". + :type granularity: str or ~azure.ai.anomalydetector.models.TimeGranularity + :param custom_interval: Custom Interval is used to set non-standard time interval, for example, + if the series is 5 minutes, request can be set as {"granularity":"minutely", + "customInterval":5}. + :type custom_interval: int + :param period: Optional argument, periodic value of a time series. If the value is null or does + not present, the API will determine the period automatically. + :type period: int + :param max_anomaly_ratio: Optional argument, advanced model parameter, max anomaly ratio in a + time series. + :type max_anomaly_ratio: float + :param sensitivity: Optional argument, advanced model parameter, between 0-99, the lower the + value is, the larger the margin value will be which means less anomalies will be accepted. + :type sensitivity: int + """ + + _validation = { + 'series': {'required': True}, + 'granularity': {'required': True}, + } + + _attribute_map = { + 'series': {'key': 'series', 'type': '[TimeSeriesPoint]'}, + 'granularity': {'key': 'granularity', 'type': 'str'}, + 'custom_interval': {'key': 'customInterval', 'type': 'int'}, + 'period': {'key': 'period', 'type': 'int'}, + 'max_anomaly_ratio': {'key': 'maxAnomalyRatio', 'type': 'float'}, + 'sensitivity': {'key': 'sensitivity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(DetectRequest, self).__init__(**kwargs) + self.series = kwargs['series'] + self.granularity = kwargs['granularity'] + self.custom_interval = kwargs.get('custom_interval', None) + self.period = kwargs.get('period', None) + self.max_anomaly_ratio = kwargs.get('max_anomaly_ratio', None) + self.sensitivity = kwargs.get('sensitivity', None) + + +class EntireDetectResponse(msrest.serialization.Model): + """EntireDetectResponse. + + All required parameters must be populated in order to send to Azure. + + :param period: Required. Frequency extracted from the series, zero means no recurrent pattern + has been found. + :type period: int + :param expected_values: Required. ExpectedValues contain expected value for each input point. + The index of the array is consistent with the input series. + :type expected_values: list[float] + :param upper_margins: Required. UpperMargins contain upper margin of each input point. + UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - + marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and + lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in + client side. The index of the array is consistent with the input series. + :type upper_margins: list[float] + :param lower_margins: Required. LowerMargins contain lower margin of each input point. + LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - + marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client + side. The index of the array is consistent with the input series. + :type lower_margins: list[float] + :param is_anomaly: Required. IsAnomaly contains anomaly properties for each input point. True + means an anomaly either negative or positive has been detected. The index of the array is + consistent with the input series. + :type is_anomaly: list[bool] + :param is_negative_anomaly: Required. IsNegativeAnomaly contains anomaly status in negative + direction for each input point. True means a negative anomaly has been detected. A negative + anomaly means the point is detected as an anomaly and its real value is smaller than the + expected one. The index of the array is consistent with the input series. + :type is_negative_anomaly: list[bool] + :param is_positive_anomaly: Required. IsPositiveAnomaly contain anomaly status in positive + direction for each input point. True means a positive anomaly has been detected. A positive + anomaly means the point is detected as an anomaly and its real value is larger than the + expected one. The index of the array is consistent with the input series. + :type is_positive_anomaly: list[bool] + """ + + _validation = { + 'period': {'required': True}, + 'expected_values': {'required': True}, + 'upper_margins': {'required': True}, + 'lower_margins': {'required': True}, + 'is_anomaly': {'required': True}, + 'is_negative_anomaly': {'required': True}, + 'is_positive_anomaly': {'required': True}, + } + + _attribute_map = { + 'period': {'key': 'period', 'type': 'int'}, + 'expected_values': {'key': 'expectedValues', 'type': '[float]'}, + 'upper_margins': {'key': 'upperMargins', 'type': '[float]'}, + 'lower_margins': {'key': 'lowerMargins', 'type': '[float]'}, + 'is_anomaly': {'key': 'isAnomaly', 'type': '[bool]'}, + 'is_negative_anomaly': {'key': 'isNegativeAnomaly', 'type': '[bool]'}, + 'is_positive_anomaly': {'key': 'isPositiveAnomaly', 'type': '[bool]'}, + } + + def __init__( + self, + **kwargs + ): + super(EntireDetectResponse, self).__init__(**kwargs) + self.period = kwargs['period'] + self.expected_values = kwargs['expected_values'] + self.upper_margins = kwargs['upper_margins'] + self.lower_margins = kwargs['lower_margins'] + self.is_anomaly = kwargs['is_anomaly'] + self.is_negative_anomaly = kwargs['is_negative_anomaly'] + self.is_positive_anomaly = kwargs['is_positive_anomaly'] + + +class LastDetectResponse(msrest.serialization.Model): + """LastDetectResponse. + + All required parameters must be populated in order to send to Azure. + + :param period: Required. Frequency extracted from the series, zero means no recurrent pattern + has been found. + :type period: int + :param suggested_window: Required. Suggested input series points needed for detecting the + latest point. + :type suggested_window: int + :param expected_value: Required. Expected value of the latest point. + :type expected_value: float + :param upper_margin: Required. Upper margin of the latest point. UpperMargin is used to + calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If + the value of latest point is between upperBoundary and lowerBoundary, it should be treated as + normal value. By adjusting marginScale value, anomaly status of latest point can be changed. + :type upper_margin: float + :param lower_margin: Required. Lower margin of the latest point. LowerMargin is used to + calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. + :type lower_margin: float + :param is_anomaly: Required. Anomaly status of the latest point, true means the latest point is + an anomaly either in negative direction or positive direction. + :type is_anomaly: bool + :param is_negative_anomaly: Required. Anomaly status in negative direction of the latest point. + True means the latest point is an anomaly and its real value is smaller than the expected one. + :type is_negative_anomaly: bool + :param is_positive_anomaly: Required. Anomaly status in positive direction of the latest point. + True means the latest point is an anomaly and its real value is larger than the expected one. + :type is_positive_anomaly: bool + """ + + _validation = { + 'period': {'required': True}, + 'suggested_window': {'required': True}, + 'expected_value': {'required': True}, + 'upper_margin': {'required': True}, + 'lower_margin': {'required': True}, + 'is_anomaly': {'required': True}, + 'is_negative_anomaly': {'required': True}, + 'is_positive_anomaly': {'required': True}, + } + + _attribute_map = { + 'period': {'key': 'period', 'type': 'int'}, + 'suggested_window': {'key': 'suggestedWindow', 'type': 'int'}, + 'expected_value': {'key': 'expectedValue', 'type': 'float'}, + 'upper_margin': {'key': 'upperMargin', 'type': 'float'}, + 'lower_margin': {'key': 'lowerMargin', 'type': 'float'}, + 'is_anomaly': {'key': 'isAnomaly', 'type': 'bool'}, + 'is_negative_anomaly': {'key': 'isNegativeAnomaly', 'type': 'bool'}, + 'is_positive_anomaly': {'key': 'isPositiveAnomaly', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(LastDetectResponse, self).__init__(**kwargs) + self.period = kwargs['period'] + self.suggested_window = kwargs['suggested_window'] + self.expected_value = kwargs['expected_value'] + self.upper_margin = kwargs['upper_margin'] + self.lower_margin = kwargs['lower_margin'] + self.is_anomaly = kwargs['is_anomaly'] + self.is_negative_anomaly = kwargs['is_negative_anomaly'] + self.is_positive_anomaly = kwargs['is_positive_anomaly'] + + +class TimeSeriesPoint(msrest.serialization.Model): + """TimeSeriesPoint. + + All required parameters must be populated in order to send to Azure. + + :param timestamp: Required. Timestamp of a data point (ISO8601 format). + :type timestamp: ~datetime.datetime + :param value: Required. The measurement of that point, should be float. + :type value: float + """ + + _validation = { + 'timestamp': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(TimeSeriesPoint, self).__init__(**kwargs) + self.timestamp = kwargs['timestamp'] + self.value = kwargs['value'] diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models_py3.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models_py3.py new file mode 100644 index 0000000000000..4b149229f2a07 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models_py3.py @@ -0,0 +1,400 @@ +# 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 datetime +from typing import List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._anomaly_detector_client_enums import * + + +class AnomalyDetectorError(msrest.serialization.Model): + """Error information returned by the API. + + :param code: The error code. Possible values include: "InvalidCustomInterval", "BadArgument", + "InvalidGranularity", "InvalidPeriod", "InvalidModelArgument", "InvalidSeries", + "InvalidJsonFormat", "RequiredGranularity", "RequiredSeries". + :type code: str or ~azure.ai.anomalydetector.models.AnomalyDetectorErrorCodes + :param message: A message explaining the error reported by the service. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[Union[str, "AnomalyDetectorErrorCodes"]] = None, + message: Optional[str] = None, + **kwargs + ): + super(AnomalyDetectorError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ChangePointDetectRequest(msrest.serialization.Model): + """ChangePointDetectRequest. + + All required parameters must be populated in order to send to Azure. + + :param series: Required. Time series data points. Points should be sorted by timestamp in + ascending order to match the change point detection result. + :type series: list[~azure.ai.anomalydetector.models.TimeSeriesPoint] + :param granularity: Required. Can only be one of yearly, monthly, weekly, daily, hourly, + minutely or secondly. Granularity is used for verify whether input series is valid. Possible + values include: "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly". + :type granularity: str or ~azure.ai.anomalydetector.models.TimeGranularity + :param custom_interval: Custom Interval is used to set non-standard time interval, for example, + if the series is 5 minutes, request can be set as {"granularity":"minutely", + "customInterval":5}. + :type custom_interval: int + :param period: Optional argument, periodic value of a time series. If the value is null or does + not present, the API will determine the period automatically. + :type period: int + :param stable_trend_window: Optional argument, advanced model parameter, a default + stableTrendWindow will be used in detection. + :type stable_trend_window: int + :param threshold: Optional argument, advanced model parameter, between 0.0-1.0, the lower the + value is, the larger the trend error will be which means less change point will be accepted. + :type threshold: float + """ + + _validation = { + 'series': {'required': True}, + 'granularity': {'required': True}, + } + + _attribute_map = { + 'series': {'key': 'series', 'type': '[TimeSeriesPoint]'}, + 'granularity': {'key': 'granularity', 'type': 'str'}, + 'custom_interval': {'key': 'customInterval', 'type': 'int'}, + 'period': {'key': 'period', 'type': 'int'}, + 'stable_trend_window': {'key': 'stableTrendWindow', 'type': 'int'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + } + + def __init__( + self, + *, + series: List["TimeSeriesPoint"], + granularity: Union[str, "TimeGranularity"], + custom_interval: Optional[int] = None, + period: Optional[int] = None, + stable_trend_window: Optional[int] = None, + threshold: Optional[float] = None, + **kwargs + ): + super(ChangePointDetectRequest, self).__init__(**kwargs) + self.series = series + self.granularity = granularity + self.custom_interval = custom_interval + self.period = period + self.stable_trend_window = stable_trend_window + self.threshold = threshold + + +class ChangePointDetectResponse(msrest.serialization.Model): + """ChangePointDetectResponse. + + All required parameters must be populated in order to send to Azure. + + :param period: Required. Frequency extracted from the series, zero means no recurrent pattern + has been found. + :type period: int + :param is_change_point: Required. isChangePoint contains change point properties for each input + point. True means an anomaly either negative or positive has been detected. The index of the + array is consistent with the input series. + :type is_change_point: list[bool] + :param confidence_scores: Required. the change point confidence of each point. + :type confidence_scores: list[float] + """ + + _validation = { + 'period': {'required': True}, + 'is_change_point': {'required': True}, + 'confidence_scores': {'required': True}, + } + + _attribute_map = { + 'period': {'key': 'period', 'type': 'int'}, + 'is_change_point': {'key': 'isChangePoint', 'type': '[bool]'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': '[float]'}, + } + + def __init__( + self, + *, + period: int, + is_change_point: List[bool], + confidence_scores: List[float], + **kwargs + ): + super(ChangePointDetectResponse, self).__init__(**kwargs) + self.period = period + self.is_change_point = is_change_point + self.confidence_scores = confidence_scores + + +class DetectRequest(msrest.serialization.Model): + """DetectRequest. + + All required parameters must be populated in order to send to Azure. + + :param series: Required. Time series data points. Points should be sorted by timestamp in + ascending order to match the anomaly detection result. If the data is not sorted correctly or + there is duplicated timestamp, the API will not work. In such case, an error message will be + returned. + :type series: list[~azure.ai.anomalydetector.models.TimeSeriesPoint] + :param granularity: Required. Can only be one of yearly, monthly, weekly, daily, hourly, + minutely or secondly. Granularity is used for verify whether input series is valid. Possible + values include: "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly". + :type granularity: str or ~azure.ai.anomalydetector.models.TimeGranularity + :param custom_interval: Custom Interval is used to set non-standard time interval, for example, + if the series is 5 minutes, request can be set as {"granularity":"minutely", + "customInterval":5}. + :type custom_interval: int + :param period: Optional argument, periodic value of a time series. If the value is null or does + not present, the API will determine the period automatically. + :type period: int + :param max_anomaly_ratio: Optional argument, advanced model parameter, max anomaly ratio in a + time series. + :type max_anomaly_ratio: float + :param sensitivity: Optional argument, advanced model parameter, between 0-99, the lower the + value is, the larger the margin value will be which means less anomalies will be accepted. + :type sensitivity: int + """ + + _validation = { + 'series': {'required': True}, + 'granularity': {'required': True}, + } + + _attribute_map = { + 'series': {'key': 'series', 'type': '[TimeSeriesPoint]'}, + 'granularity': {'key': 'granularity', 'type': 'str'}, + 'custom_interval': {'key': 'customInterval', 'type': 'int'}, + 'period': {'key': 'period', 'type': 'int'}, + 'max_anomaly_ratio': {'key': 'maxAnomalyRatio', 'type': 'float'}, + 'sensitivity': {'key': 'sensitivity', 'type': 'int'}, + } + + def __init__( + self, + *, + series: List["TimeSeriesPoint"], + granularity: Union[str, "TimeGranularity"], + custom_interval: Optional[int] = None, + period: Optional[int] = None, + max_anomaly_ratio: Optional[float] = None, + sensitivity: Optional[int] = None, + **kwargs + ): + super(DetectRequest, self).__init__(**kwargs) + self.series = series + self.granularity = granularity + self.custom_interval = custom_interval + self.period = period + self.max_anomaly_ratio = max_anomaly_ratio + self.sensitivity = sensitivity + + +class EntireDetectResponse(msrest.serialization.Model): + """EntireDetectResponse. + + All required parameters must be populated in order to send to Azure. + + :param period: Required. Frequency extracted from the series, zero means no recurrent pattern + has been found. + :type period: int + :param expected_values: Required. ExpectedValues contain expected value for each input point. + The index of the array is consistent with the input series. + :type expected_values: list[float] + :param upper_margins: Required. UpperMargins contain upper margin of each input point. + UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - + marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and + lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in + client side. The index of the array is consistent with the input series. + :type upper_margins: list[float] + :param lower_margins: Required. LowerMargins contain lower margin of each input point. + LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - + marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client + side. The index of the array is consistent with the input series. + :type lower_margins: list[float] + :param is_anomaly: Required. IsAnomaly contains anomaly properties for each input point. True + means an anomaly either negative or positive has been detected. The index of the array is + consistent with the input series. + :type is_anomaly: list[bool] + :param is_negative_anomaly: Required. IsNegativeAnomaly contains anomaly status in negative + direction for each input point. True means a negative anomaly has been detected. A negative + anomaly means the point is detected as an anomaly and its real value is smaller than the + expected one. The index of the array is consistent with the input series. + :type is_negative_anomaly: list[bool] + :param is_positive_anomaly: Required. IsPositiveAnomaly contain anomaly status in positive + direction for each input point. True means a positive anomaly has been detected. A positive + anomaly means the point is detected as an anomaly and its real value is larger than the + expected one. The index of the array is consistent with the input series. + :type is_positive_anomaly: list[bool] + """ + + _validation = { + 'period': {'required': True}, + 'expected_values': {'required': True}, + 'upper_margins': {'required': True}, + 'lower_margins': {'required': True}, + 'is_anomaly': {'required': True}, + 'is_negative_anomaly': {'required': True}, + 'is_positive_anomaly': {'required': True}, + } + + _attribute_map = { + 'period': {'key': 'period', 'type': 'int'}, + 'expected_values': {'key': 'expectedValues', 'type': '[float]'}, + 'upper_margins': {'key': 'upperMargins', 'type': '[float]'}, + 'lower_margins': {'key': 'lowerMargins', 'type': '[float]'}, + 'is_anomaly': {'key': 'isAnomaly', 'type': '[bool]'}, + 'is_negative_anomaly': {'key': 'isNegativeAnomaly', 'type': '[bool]'}, + 'is_positive_anomaly': {'key': 'isPositiveAnomaly', 'type': '[bool]'}, + } + + def __init__( + self, + *, + period: int, + expected_values: List[float], + upper_margins: List[float], + lower_margins: List[float], + is_anomaly: List[bool], + is_negative_anomaly: List[bool], + is_positive_anomaly: List[bool], + **kwargs + ): + super(EntireDetectResponse, self).__init__(**kwargs) + self.period = period + self.expected_values = expected_values + self.upper_margins = upper_margins + self.lower_margins = lower_margins + self.is_anomaly = is_anomaly + self.is_negative_anomaly = is_negative_anomaly + self.is_positive_anomaly = is_positive_anomaly + + +class LastDetectResponse(msrest.serialization.Model): + """LastDetectResponse. + + All required parameters must be populated in order to send to Azure. + + :param period: Required. Frequency extracted from the series, zero means no recurrent pattern + has been found. + :type period: int + :param suggested_window: Required. Suggested input series points needed for detecting the + latest point. + :type suggested_window: int + :param expected_value: Required. Expected value of the latest point. + :type expected_value: float + :param upper_margin: Required. Upper margin of the latest point. UpperMargin is used to + calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If + the value of latest point is between upperBoundary and lowerBoundary, it should be treated as + normal value. By adjusting marginScale value, anomaly status of latest point can be changed. + :type upper_margin: float + :param lower_margin: Required. Lower margin of the latest point. LowerMargin is used to + calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. + :type lower_margin: float + :param is_anomaly: Required. Anomaly status of the latest point, true means the latest point is + an anomaly either in negative direction or positive direction. + :type is_anomaly: bool + :param is_negative_anomaly: Required. Anomaly status in negative direction of the latest point. + True means the latest point is an anomaly and its real value is smaller than the expected one. + :type is_negative_anomaly: bool + :param is_positive_anomaly: Required. Anomaly status in positive direction of the latest point. + True means the latest point is an anomaly and its real value is larger than the expected one. + :type is_positive_anomaly: bool + """ + + _validation = { + 'period': {'required': True}, + 'suggested_window': {'required': True}, + 'expected_value': {'required': True}, + 'upper_margin': {'required': True}, + 'lower_margin': {'required': True}, + 'is_anomaly': {'required': True}, + 'is_negative_anomaly': {'required': True}, + 'is_positive_anomaly': {'required': True}, + } + + _attribute_map = { + 'period': {'key': 'period', 'type': 'int'}, + 'suggested_window': {'key': 'suggestedWindow', 'type': 'int'}, + 'expected_value': {'key': 'expectedValue', 'type': 'float'}, + 'upper_margin': {'key': 'upperMargin', 'type': 'float'}, + 'lower_margin': {'key': 'lowerMargin', 'type': 'float'}, + 'is_anomaly': {'key': 'isAnomaly', 'type': 'bool'}, + 'is_negative_anomaly': {'key': 'isNegativeAnomaly', 'type': 'bool'}, + 'is_positive_anomaly': {'key': 'isPositiveAnomaly', 'type': 'bool'}, + } + + def __init__( + self, + *, + period: int, + suggested_window: int, + expected_value: float, + upper_margin: float, + lower_margin: float, + is_anomaly: bool, + is_negative_anomaly: bool, + is_positive_anomaly: bool, + **kwargs + ): + super(LastDetectResponse, self).__init__(**kwargs) + self.period = period + self.suggested_window = suggested_window + self.expected_value = expected_value + self.upper_margin = upper_margin + self.lower_margin = lower_margin + self.is_anomaly = is_anomaly + self.is_negative_anomaly = is_negative_anomaly + self.is_positive_anomaly = is_positive_anomaly + + +class TimeSeriesPoint(msrest.serialization.Model): + """TimeSeriesPoint. + + All required parameters must be populated in order to send to Azure. + + :param timestamp: Required. Timestamp of a data point (ISO8601 format). + :type timestamp: ~datetime.datetime + :param value: Required. The measurement of that point, should be float. + :type value: float + """ + + _validation = { + 'timestamp': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__( + self, + *, + timestamp: datetime.datetime, + value: float, + **kwargs + ): + super(TimeSeriesPoint, self).__init__(**kwargs) + self.timestamp = timestamp + self.value = value diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/operations/__init__.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/operations/__init__.py new file mode 100644 index 0000000000000..00fccdc398f92 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/operations/__init__.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._anomaly_detector_client_operations import AnomalyDetectorClientOperationsMixin + +__all__ = [ + 'AnomalyDetectorClientOperationsMixin', +] diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/operations/_anomaly_detector_client_operations.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/operations/_anomaly_detector_client_operations.py new file mode 100644 index 0000000000000..faacc3f97119a --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/operations/_anomaly_detector_client_operations.py @@ -0,0 +1,205 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AnomalyDetectorClientOperationsMixin(object): + + def detect_entire_series( + self, + body, # type: "models.DetectRequest" + **kwargs # type: Any + ): + # type: (...) -> "models.EntireDetectResponse" + """Detect anomalies for the entire series in batch. + + This operation generates a model using an entire series, each point is detected with the same + model. With this method, points before and after a certain point are used to determine whether + it is an anomaly. The entire detection can give user an overall status of the time series. + + :param body: Time series points and period if needed. Advanced model parameters can also be set + in the request. + :type body: ~azure.ai.anomalydetector.models.DetectRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EntireDetectResponse, or the result of cls(response) + :rtype: ~azure.ai.anomalydetector.models.EntireDetectResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.EntireDetectResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.detect_entire_series.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'DetectRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.AnomalyDetectorError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('EntireDetectResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + detect_entire_series.metadata = {'url': '/timeseries/entire/detect'} # type: ignore + + def detect_last_point( + self, + body, # type: "models.DetectRequest" + **kwargs # type: Any + ): + # type: (...) -> "models.LastDetectResponse" + """Detect anomaly status of the latest point in time series. + + This operation generates a model using points before the latest one. With this method, only + historical points are used to determine whether the target point is an anomaly. The latest + point detecting operation matches the scenario of real-time monitoring of business metrics. + + :param body: Time series points and period if needed. Advanced model parameters can also be set + in the request. + :type body: ~azure.ai.anomalydetector.models.DetectRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LastDetectResponse, or the result of cls(response) + :rtype: ~azure.ai.anomalydetector.models.LastDetectResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.LastDetectResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.detect_last_point.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'DetectRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.AnomalyDetectorError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('LastDetectResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + detect_last_point.metadata = {'url': '/timeseries/last/detect'} # type: ignore + + def detect_change_point( + self, + body, # type: "models.ChangePointDetectRequest" + **kwargs # type: Any + ): + # type: (...) -> "models.ChangePointDetectResponse" + """Detect change point for the entire series. + + Evaluate change point score of every series point. + + :param body: Time series points and granularity is needed. Advanced model parameters can also + be set in the request if needed. + :type body: ~azure.ai.anomalydetector.models.ChangePointDetectRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChangePointDetectResponse, or the result of cls(response) + :rtype: ~azure.ai.anomalydetector.models.ChangePointDetectResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ChangePointDetectResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.detect_change_point.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'ChangePointDetectRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.AnomalyDetectorError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ChangePointDetectResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + detect_change_point.metadata = {'url': '/timeseries/changepoint/detect'} # type: ignore diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/py.typed b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/samples/README.md b/sdk/anomalydetector/azure-ai-anomalydetector/samples/README.md new file mode 100644 index 0000000000000..d3cbeb03df82d --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/samples/README.md @@ -0,0 +1,59 @@ +--- +page_type: sample +languages: + - python +products: + - azure + - azure-cognitive-services + - azure-anomaly-detector +urlFragment: anomalydetector-samples +--- + +# Samples for Azure Anomaly Detector client library for Python + +These code samples show common scenario operations with the Anomaly Detector client library. + +These sample programs show common scenarios for the Anomaly Detector client's offerings. + +|**File Name**|**Description**| +|----------------|-------------| +|[sample_detect_entire_series_anomaly.py][sample_detect_entire_series_anomaly] |Detecting anomalies in the entire time series.| +|[sample_detect_last_point_anomaly.py][sample_detect_last_point_anomaly] |Detecting the anomaly status of the latest data point.| +|[sample_detect_change_point.py][sample_detect_change_point] |Detecting change points in the entire time series.| + +## Prerequisites +* Python 2.7 or 3.5 or higher is required to use this package. +* The Pandas data analysis library. +* You must have an [Azure subscription][azure_subscription] and an +[Azure Anomaly Detector account][azure_anomaly_detector_account] to run these samples. + +## Setup + +1. Install the Azure Anomaly Detector client library for Python with [pip][pip]: + +```bash +pip install azure-ai-anomalydetector +``` + +2. Clone or download this sample repository +3. Open the sample folder in Visual Studio Code or your IDE of choice. + +## Running the samples + +1. Open a terminal window and `cd` to the directory that the samples are saved in. +2. Set the environment variables specified in the sample file you wish to run. +3. Follow the usage described in the file, e.g. `python sample_detect_entire_series_anomaly.py` + +## Next steps + +Check out the [API reference documentation][python-fr-ref-docs] to learn more about +what you can do with the Azure Anomaly Detector client library. + +[pip]: https://pypi.org/project/pip/ +[azure_subscription]: https://azure.microsoft.com/free/cognitive-services +[azure_anomaly_detector_account]: https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesAnomalyDetector +[python-fr-ref-docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-cognitiveservices-anomalydetector/0.3.0/index.html + +[sample_detect_entire_series_anomaly]: ./sample_detect_entire_series_anomaly.py +[sample_detect_last_point_anomaly]: ./sample_detect_last_point_anomaly.py +[sample_detect_change_point]: ./sample_detect_change_point.py diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_data/request-data.csv b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_data/request-data.csv new file mode 100644 index 0000000000000..7f242c3712c1e --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_data/request-data.csv @@ -0,0 +1,47 @@ +2018-03-01T00:00:00Z,32858923 +2018-03-02T00:00:00Z,29615278 +2018-03-03T00:00:00Z,22839355 +2018-03-04T00:00:00Z,25948736 +2018-03-05T00:00:00Z,34139159 +2018-03-06T00:00:00Z,33843985 +2018-03-07T00:00:00Z,33637661 +2018-03-08T00:00:00Z,32627350 +2018-03-09T00:00:00Z,29881076 +2018-03-10T00:00:00Z,22681575 +2018-03-11T00:00:00Z,24629393 +2018-03-12T00:00:00Z,34010679 +2018-03-13T00:00:00Z,33893888 +2018-03-14T00:00:00Z,33760076 +2018-03-15T00:00:00Z,33093515 +2018-03-16T00:00:00Z,29945555 +2018-03-17T00:00:00Z,22676212 +2018-03-18T00:00:00Z,25262514 +2018-03-19T00:00:00Z,33631649 +2018-03-20T00:00:00Z,34468310 +2018-03-21T00:00:00Z,34212281 +2018-03-22T00:00:00Z,38144434 +2018-03-23T00:00:00Z,34662949 +2018-03-24T00:00:00Z,24623684 +2018-03-25T00:00:00Z,26530491 +2018-03-26T00:00:00Z,35445003 +2018-03-27T00:00:00Z,34250789 +2018-03-28T00:00:00Z,33423012 +2018-03-29T00:00:00Z,30744783 +2018-03-30T00:00:00Z,25825128 +2018-03-31T00:00:00Z,21244209 +2018-04-01T00:00:00Z,22576956 +2018-04-02T00:00:00Z,31957221 +2018-04-03T00:00:00Z,33841228 +2018-04-04T00:00:00Z,33554483 +2018-04-05T00:00:00Z,32383350 +2018-04-06T00:00:00Z,29494850 +2018-04-07T00:00:00Z,22815534 +2018-04-08T00:00:00Z,25557267 +2018-04-09T00:00:00Z,34858252 +2018-04-10T00:00:00Z,34750597 +2018-04-11T00:00:00Z,34717956 +2018-04-12T00:00:00Z,34132534 +2018-04-13T00:00:00Z,30762236 +2018-04-14T00:00:00Z,22504059 +2018-04-15T00:00:00Z,26149060 +2018-04-16T00:00:00Z,35250105 \ No newline at end of file diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_change_point.py b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_change_point.py new file mode 100644 index 0000000000000..f2f0eb64e6d35 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_change_point.py @@ -0,0 +1,84 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +""" +FILE: sample_detect_change_point.py + +DESCRIPTION: + This sample demonstrates how to detect entire series change points. + +Prerequisites: + * The Anomaly Detector client library for Python + * A .csv file containing a time-series data set with + UTC-timestamp and numerical values pairings. + Example data is included in this repo. + +USAGE: + python sample_detect_change_point.py + + Set the environment variables with your own values before running the sample: + 1) ANOMALY_DETECTOR_KEY - your source Form Anomaly Detector API key. + 2) ANOMALY_DETECTOR_ENDPOINT - the endpoint to your source Anomaly Detector resource. +""" + +import os +from azure.ai.anomalydetector import AnomalyDetectorClient +from azure.ai.anomalydetector.models import DetectRequest, TimeSeriesPoint, TimeGranularity, \ + AnomalyDetectorError +from azure.core.credentials import AzureKeyCredential +import pandas as pd + + +class DetectChangePointsSample(object): + + def detect_change_point(self): + SUBSCRIPTION_KEY = os.environ["ANOMALY_DETECTOR_KEY"] + ANOMALY_DETECTOR_ENDPOINT = os.environ["ANOMALY_DETECTOR_ENDPOINT"] + TIME_SERIES_DATA_PATH = os.path.join("./sample_data", "request-data.csv") + + # Create an Anomaly Detector client + + # + client = AnomalyDetectorClient(AzureKeyCredential(SUBSCRIPTION_KEY), ANOMALY_DETECTOR_ENDPOINT) + # + + # Load in the time series data file + + # + series = [] + data_file = pd.read_csv(TIME_SERIES_DATA_PATH, header=None, encoding='utf-8', parse_dates=[0]) + for index, row in data_file.iterrows(): + series.append(TimeSeriesPoint(timestamp=row[0], value=row[1])) + # + + # Create a request from the data file + + # + request = DetectRequest(series=series, granularity=TimeGranularity.daily) + # + + # detect change points throughout the entire time series + + # + print('Detecting change points in the entire time series.') + + try: + response = client.detect_change_point(request) + except AnomalyDetectorError as e: + print('Error code: {}'.format(e.error.code), 'Error message: {}'.format(e.error.message)) + except Exception as e: + print(e) + + if any(response.is_change_point): + print('An change point was detected at index:') + for i, value in enumerate(response.is_change_point): + if value: + print(i) + else: + print('No change point were detected in the time series.') + # + + +if __name__ == '__main__': + sample = DetectChangePointsSample() + sample.detect_change_point() diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_entire_series_anomaly.py b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_entire_series_anomaly.py new file mode 100644 index 0000000000000..941e381d9cd0e --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_entire_series_anomaly.py @@ -0,0 +1,84 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +""" +FILE: sample_detect_entire_series_anomaly.py + +DESCRIPTION: + This sample demonstrates how to detect entire series anomalies. + +Prerequisites: + * The Anomaly Detector client library for Python + * A .csv file containing a time-series data set with + UTC-timestamp and numerical values pairings. + Example data is included in this repo. + +USAGE: + python sample_detect_entire_series_anomaly.py + + Set the environment variables with your own values before running the sample: + 1) ANOMALY_DETECTOR_KEY - your source Form Anomaly Detector API key. + 2) ANOMALY_DETECTOR_ENDPOINT - the endpoint to your source Anomaly Detector resource. +""" + +import os +from azure.ai.anomalydetector import AnomalyDetectorClient +from azure.ai.anomalydetector.models import DetectRequest, TimeSeriesPoint, TimeGranularity, \ + AnomalyDetectorError +from azure.core.credentials import AzureKeyCredential +import pandas as pd + + +class DetectEntireAnomalySample(object): + + def detect_entire_series(self): + SUBSCRIPTION_KEY = os.environ["ANOMALY_DETECTOR_KEY"] + ANOMALY_DETECTOR_ENDPOINT = os.environ["ANOMALY_DETECTOR_ENDPOINT"] + TIME_SERIES_DATA_PATH = os.path.join("./sample_data", "request-data.csv") + + # Create an Anomaly Detector client + + # + client = AnomalyDetectorClient(AzureKeyCredential(SUBSCRIPTION_KEY), ANOMALY_DETECTOR_ENDPOINT) + # + + # Load in the time series data file + + # + series = [] + data_file = pd.read_csv(TIME_SERIES_DATA_PATH, header=None, encoding='utf-8', parse_dates=[0]) + for index, row in data_file.iterrows(): + series.append(TimeSeriesPoint(timestamp=row[0], value=row[1])) + # + + # Create a request from the data file + + # + request = DetectRequest(series=series, granularity=TimeGranularity.daily) + # + + # detect anomalies throughout the entire time series, as a batch + + # + print('Detecting anomalies in the entire time series.') + + try: + response = client.detect_entire_series(request) + except AnomalyDetectorError as e: + print('Error code: {}'.format(e.error.code), 'Error message: {}'.format(e.error.message)) + except Exception as e: + print(e) + + if any(response.is_anomaly): + print('An anomaly was detected at index:') + for i, value in enumerate(response.is_anomaly): + if value: + print(i) + else: + print('No anomalies were detected in the time series.') + # + + +if __name__ == '__main__': + sample = DetectEntireAnomalySample() + sample.detect_entire_series() diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_last_point_anomaly.py b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_last_point_anomaly.py new file mode 100644 index 0000000000000..d8557583396c0 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_detect_last_point_anomaly.py @@ -0,0 +1,81 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +""" +FILE: sample_detect_last_point_anomaly.py + +DESCRIPTION: + This sample demonstrates how to detect last series point whether is anomaly. + +Prerequisites: + * The Anomaly Detector client library for Python + * A .csv file containing a time-series data set with + UTC-timestamp and numerical values pairings. + Example data is included in this repo. + +USAGE: + python sample_detect_last_point_anomaly.py + + Set the environment variables with your own values before running the sample: + 1) ANOMALY_DETECTOR_KEY - your source Form Anomaly Detector API key. + 2) ANOMALY_DETECTOR_ENDPOINT - the endpoint to your source Anomaly Detector resource. +""" + +import os +from azure.ai.anomalydetector import AnomalyDetectorClient +from azure.ai.anomalydetector.models import DetectRequest, TimeSeriesPoint, TimeGranularity, \ + AnomalyDetectorError +from azure.core.credentials import AzureKeyCredential +import pandas as pd + + +class DetectLastAnomalySample(object): + + def detect_last_point(self): + SUBSCRIPTION_KEY = os.environ["ANOMALY_DETECTOR_KEY"] + ANOMALY_DETECTOR_ENDPOINT = os.environ["ANOMALY_DETECTOR_ENDPOINT"] + TIME_SERIES_DATA_PATH = os.path.join("./sample_data", "request-data.csv") + + # Create an Anomaly Detector client + + # + client = AnomalyDetectorClient(AzureKeyCredential(SUBSCRIPTION_KEY), ANOMALY_DETECTOR_ENDPOINT) + # + + # Load in the time series data file + + # + series = [] + data_file = pd.read_csv(TIME_SERIES_DATA_PATH, header=None, encoding='utf-8', parse_dates=[0]) + for index, row in data_file.iterrows(): + series.append(TimeSeriesPoint(timestamp=row[0], value=row[1])) + # + + # Create a request from the data file + + # + request = DetectRequest(series=series, granularity=TimeGranularity.daily) + # + + # Detect the anomaly status of the latest data point + + # + print('Detecting the anomaly status of the latest data point.') + + try: + response = client.detect_last_point(request) + except AnomalyDetectorError as e: + print('Error code: {}'.format(e.error.code), 'Error message: {}'.format(e.error.message)) + except Exception as e: + print(e) + + if response.is_anomaly: + print('The latest point is detected as anomaly.') + else: + print('The latest point is not detected as anomaly.') + # + + +if __name__ == '__main__': + sample = DetectLastAnomalySample() + sample.detect_last_point() diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/sdk_packaging.toml b/sdk/anomalydetector/azure-ai-anomalydetector/sdk_packaging.toml new file mode 100644 index 0000000000000..76d3e53f4beda --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/sdk_packaging.toml @@ -0,0 +1,9 @@ +[packaging] +package_name = "azure-ai-anomalydetector" +package_nspkg = "azure-ai-nspkg" +package_pprint_name = "Cognitive Services Anomaly Detector" +package_doc_id = "cognitive-services" +is_stable = false +is_arm = false +need_msrestazure = false +auto_update = false diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/setup.cfg b/sdk/anomalydetector/azure-ai-anomalydetector/setup.cfg new file mode 100644 index 0000000000000..3c6e79cf31da1 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/setup.py b/sdk/anomalydetector/azure-ai-anomalydetector/setup.py new file mode 100644 index 0000000000000..c89f333207578 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/setup.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-ai-anomalydetector" +PACKAGE_PPRINT_NAME = "Cognitive Services Anomaly Detector" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + "Development Status :: 4 - Beta", + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + '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, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.ai', + ]), + install_requires=[ + 'msrest>=0.5.0', + 'azure-common~=1.1', + 'azure-core>=1.6.0,<2.0.0', + ], + extras_require={ + ":python_version<'3.0'": ['azure-ai-nspkg'], + } +) diff --git a/sdk/anomalydetector/ci.yml b/sdk/anomalydetector/ci.yml new file mode 100644 index 0000000000000..fc5aa41ede7fd --- /dev/null +++ b/sdk/anomalydetector/ci.yml @@ -0,0 +1,36 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - master + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/anomalydetector/ + - sdk/core/ + +pr: + branches: + include: + - master + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/anomalydetector/ + - sdk/core/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: anomalydetector + Artifacts: + - name: azure_ai_anomalydetector + safeName: azureaianomalydetector + diff --git a/sdk/apimanagement/ci.yml b/sdk/apimanagement/ci.yml index 3f652728468b3..d98441ab4c6f6 100644 --- a/sdk/apimanagement/ci.yml +++ b/sdk/apimanagement/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: apimanagement Artifacts: - name: azure_mgmt_apimanagement - safeName: azuremgmtapimanagement \ No newline at end of file + safeName: azuremgmtapimanagement diff --git a/sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md b/sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md index 0396231127f02..ce14f7db001f4 100644 --- a/sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md @@ -3,8 +3,11 @@ ------------------- -## 1.0.2 (Unreleased) +## 1.1.0 (2020-09-08) +### Features + +- Added match condition support for `set_read_only` method #13276 ## 1.0.1 (2020-08-10) diff --git a/sdk/appconfiguration/azure-appconfiguration/README.md b/sdk/appconfiguration/azure-appconfiguration/README.md index b2777d0ca84b8..6a243e12d753d 100644 --- a/sdk/appconfiguration/azure-appconfiguration/README.md +++ b/sdk/appconfiguration/azure-appconfiguration/README.md @@ -294,12 +294,12 @@ see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[appconfig_docs]: https://docs.microsoft.com/en-us/azure/azure-app-configuration/ +[appconfig_docs]: https://docs.microsoft.com/azure/azure-app-configuration/ [appconfig_rest]: https://github.com/Azure/AppConfiguration#rest-api-reference [azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ [configuration_client_class]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py [package]: https://pypi.org/project/azure-appconfiguration/ -[configuration_store]: https://azure.microsoft.com/en-us/services/app-configuration/ +[configuration_store]: https://azure.microsoft.com/services/app-configuration/ [default_cred_ref]: https://aka.ms/azsdk-python-identity-default-cred-ref [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py index f31a837189a27..94b11741b0497 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py @@ -508,6 +508,7 @@ def set_read_only( :type configuration_setting: :class:`ConfigurationSetting` :param read_only: set the read only setting if true, else clear the read only setting :type read_only: bool + :keyword ~azure.core.MatchConditions match_condition: the match condition to use upon the etag :keyword dict headers: if "headers" exists, its value (a dict) will be added to the http request header :return: The ConfigurationSetting returned from the service :rtype: :class:`ConfigurationSetting` @@ -529,11 +530,23 @@ def set_read_only( 404: ResourceNotFoundError } + match_condition = kwargs.pop("match_condition", MatchConditions.Unconditionally) + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + if match_condition == MatchConditions.IfModified: + error_map[412] = ResourceNotModifiedError + if match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + if match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + try: if read_only: key_value = self._impl.put_lock( key=configuration_setting.key, label=configuration_setting.label, + if_match=prep_if_match(configuration_setting.etag, match_condition), + if_none_match=prep_if_none_match(configuration_setting.etag, match_condition), error_map=error_map, **kwargs ) @@ -541,6 +554,8 @@ def set_read_only( key_value = self._impl.delete_lock( key=configuration_setting.key, label=configuration_setting.label, + if_match=prep_if_match(configuration_setting.etag, match_condition), + if_none_match=prep_if_none_match(configuration_setting.etag, match_condition), error_map=error_map, **kwargs ) diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py index 64ee8f561b740..315754a5f1c3f 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "1.0.2" +VERSION = "1.1.0" diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/aio/_azure_configuration_client_async.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/aio/_azure_configuration_client_async.py index 258c9bc2cb9db..26e7dacf4f5cc 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/aio/_azure_configuration_client_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/aio/_azure_configuration_client_async.py @@ -526,6 +526,7 @@ async def set_read_only( :type configuration_setting: :class:`ConfigurationSetting` :param read_only: set the read only setting if true, else clear the read only setting :type read_only: bool + :keyword ~azure.core.MatchConditions match_condition: the match condition to use upon the etag :keyword dict headers: if "headers" exists, its value (a dict) will be added to the http request header :return: The ConfigurationSetting returned from the service :rtype: :class:`ConfigurationSetting` @@ -547,11 +548,23 @@ async def set_read_only( 404: ResourceNotFoundError } + match_condition = kwargs.pop("match_condition", MatchConditions.Unconditionally) + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + if match_condition == MatchConditions.IfModified: + error_map[412] = ResourceNotModifiedError + if match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + if match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + try: if read_only: key_value = await self._impl.put_lock( key=configuration_setting.key, label=configuration_setting.label, + if_match=prep_if_match(configuration_setting.etag, match_condition), + if_none_match=prep_if_none_match(configuration_setting.etag, match_condition), error_map=error_map, **kwargs ) @@ -559,6 +572,8 @@ async def set_read_only( key_value = await self._impl.delete_lock( key=configuration_setting.key, label=configuration_setting.label, + if_match=prep_if_match(configuration_setting.etag, match_condition), + if_none_match=prep_if_none_match(configuration_setting.etag, match_condition), error_map=error_map, **kwargs ) diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/README.md b/sdk/appconfiguration/azure-appconfiguration/samples/README.md index 86d549dc16e44..f9bac00f7c606 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/README.md +++ b/sdk/appconfiguration/azure-appconfiguration/samples/README.md @@ -40,4 +40,4 @@ pip install azure-appconfiguration [azure_sub]: https://azure.microsoft.com/free/ [azure_cli]: https://docs.microsoft.com/cli/azure -[configuration_store]: https://azure.microsoft.com/en-us/services/app-configuration/ +[configuration_store]: https://azure.microsoft.com/services/app-configuration/ diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_set_read_only.yaml b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_set_read_only.yaml index 5584b9b72cd55..6e4aaab121d89 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_set_read_only.yaml +++ b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_set_read_only.yaml @@ -9,11 +9,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:14 GMT method: GET uri: https://xyazconfig.azconfig.io/kv?key=PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309&label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: @@ -22,32 +22,26 @@ interactions: headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kvset+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:54 GMT + - Mon, 24 Aug 2020 20:28:13 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains + sync-token: + - zAJw6V16=MDotMSM0MTEzOTQy;sn=4113942 transfer-encoding: - chunked status: @@ -70,53 +64,47 @@ interactions: - application/json; charset=utf-8 If-None-Match: - '*' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQy User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 5b/E4qQlXHTRod+n+f+xjK6c/tRVR8uxoC62FjvGJPw= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:14 GMT method: PUT uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"GwoNrtK8XJSFiKR2sXgUGsYOLoE","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:47:55+00:00"}' + string: '{"etag":"3awKCOULT0Tf5tAMJxoSEpUJD4c","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:28:14+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:54 GMT + - Mon, 24 Aug 2020 20:28:13 GMT etag: - - '"GwoNrtK8XJSFiKR2sXgUGsYOLoE"' + - '"3awKCOULT0Tf5tAMJxoSEpUJD4c"' last-modified: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA0OTk=;sn=830499 + - zAJw6V16=MDotMSM0MTEzOTQz;sn=4113943 transfer-encoding: - chunked status: @@ -131,49 +119,43 @@ interactions: - gzip, deflate Connection: - keep-alive + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQz User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:14 GMT method: GET uri: https://xyazconfig.azconfig.io/kv?key=PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309&api-version=1.0 response: body: - string: '{"items":[{"etag":"GwoNrtK8XJSFiKR2sXgUGsYOLoE","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:47:55+00:00"}]}' + string: '{"items":[{"etag":"3awKCOULT0Tf5tAMJxoSEpUJD4c","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:28:14+00:00"}]}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kvset+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:54 GMT + - Mon, 24 Aug 2020 20:28:13 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA0OTk=;sn=830499 + - zAJw6V16=MDotMSM0MTEzOTQz;sn=4113943 transfer-encoding: - chunked status: @@ -190,12 +172,14 @@ interactions: - keep-alive Content-Length: - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQz User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:14 GMT method: DELETE uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?api-version=1.0 response: @@ -204,30 +188,22 @@ interactions: headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:54 GMT + - Mon, 24 Aug 2020 20:28:13 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains status: @@ -250,53 +226,47 @@ interactions: - application/json; charset=utf-8 If-None-Match: - '*' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQz User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 4rt07HteiPg5NxofrgzMmlQPTVbo1no7aKxDSI5uUU4= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:14 GMT method: PUT uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?api-version=1.0 response: body: - string: '{"etag":"Aixyb0uz0AfBZmLryMpee4C21BM","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":null,"content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:47:55+00:00"}' + string: '{"etag":"yP8m5bW2C86HNfWBHEJM48BH765","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":null,"content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:28:14+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:54 GMT + - Mon, 24 Aug 2020 20:28:13 GMT etag: - - '"Aixyb0uz0AfBZmLryMpee4C21BM"' + - '"yP8m5bW2C86HNfWBHEJM48BH765"' last-modified: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA1MDA=;sn=830500 + - zAJw6V16=MDotMSM0MTEzOTQ0;sn=4113944 transfer-encoding: - chunked status: @@ -313,53 +283,47 @@ interactions: - keep-alive Content-Length: - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQ0 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:14 GMT method: PUT uri: https://xyazconfig.azconfig.io/locks/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"bHjLJPX6bIK2JZx4K7WCjKqLrGo","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":true,"last_modified":"2019-11-15T17:47:55+00:00"}' + string: '{"etag":"1vUGBsW1tNJQU0Pe6uHkPFT5GbA","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":true,"last_modified":"2020-08-24T20:28:14+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:54 GMT + - Mon, 24 Aug 2020 20:28:13 GMT etag: - - '"bHjLJPX6bIK2JZx4K7WCjKqLrGo"' + - '"1vUGBsW1tNJQU0Pe6uHkPFT5GbA"' last-modified: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA1MDE=;sn=830501 + - zAJw6V16=MDotMSM0MTEzOTQ1;sn=4113945 transfer-encoding: - chunked status: @@ -380,12 +344,14 @@ interactions: - '231' Content-Type: - application/json; charset=utf-8 + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQ1 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 5b/E4qQlXHTRod+n+f+xjK6c/tRVR8uxoC62FjvGJPw= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:14 GMT method: PUT uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: @@ -396,30 +362,22 @@ interactions: headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 + - application/problem+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:54 GMT + - Mon, 24 Aug 2020 20:28:13 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains transfer-encoding: @@ -438,53 +396,47 @@ interactions: - keep-alive Content-Length: - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQ1 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:15 GMT method: DELETE uri: https://xyazconfig.azconfig.io/locks/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"Unhhk3FStUyc81XVYLybHTEf53z","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:47:55+00:00"}' + string: '{"etag":"v1unOEFarIspwC0hm6oYvETegsS","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:28:14+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:54 GMT + - Mon, 24 Aug 2020 20:28:13 GMT etag: - - '"Unhhk3FStUyc81XVYLybHTEf53z"' + - '"v1unOEFarIspwC0hm6oYvETegsS"' last-modified: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA1MDI=;sn=830502 + - zAJw6V16=MDotMSM0MTEzOTQ2;sn=4113946 transfer-encoding: - chunked status: @@ -505,53 +457,47 @@ interactions: - '220' Content-Type: - application/json; charset=utf-8 + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQ2 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - QZZY+ppIiwncsqXIARuR/wqO+l4LBXrkxE9dX6TVcBY= x-ms-date: - - Nov, 15 2019 17:47:54 GMT + - Aug, 24 2020 20:28:15 GMT method: PUT uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"DemZb4S3a112PnIDwvWv32KmgnH","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test valuea","tags":{"a":"b","c":"d"},"locked":false,"last_modified":"2019-11-15T17:47:55+00:00"}' + string: '{"etag":"4Rrb29DtYEGjVCIowJThhUukAaj","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test valuea","tags":{"a":"b","c":"d"},"locked":false,"last_modified":"2020-08-24T20:28:14+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT etag: - - '"DemZb4S3a112PnIDwvWv32KmgnH"' + - '"4Rrb29DtYEGjVCIowJThhUukAaj"' last-modified: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA1MDM=;sn=830503 + - zAJw6V16=MDotMSM0MTEzOTQ3;sn=4113947 transfer-encoding: - chunked status: @@ -568,53 +514,97 @@ interactions: - keep-alive Content-Length: - '0' + If-Match: + - '"bad"' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQ3 + User-Agent: + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-date: + - Aug, 24 2020 20:28:15 GMT + method: PUT + uri: https://xyazconfig.azconfig.io/locks/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 + response: + body: + string: '' + headers: + access-control-allow-credentials: + - 'true' + access-control-allow-origin: + - '*' + access-control-expose-headers: + - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate + connection: + - keep-alive + content-length: + - '0' + date: + - Mon, 24 Aug 2020 20:28:14 GMT + server: + - openresty/1.15.8.3 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +- request: + body: null + headers: + Accept: + - application/vnd.microsoft.appconfig.kv+json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQ3 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:47:55 GMT + - Aug, 24 2020 20:28:15 GMT method: DELETE uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"DemZb4S3a112PnIDwvWv32KmgnH","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test valuea","tags":{"a":"b","c":"d"},"locked":false,"last_modified":"2019-11-15T17:47:55+00:00"}' + string: '{"etag":"4Rrb29DtYEGjVCIowJThhUukAaj","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test valuea","tags":{"a":"b","c":"d"},"locked":false,"last_modified":"2020-08-24T20:28:14+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT etag: - - '"DemZb4S3a112PnIDwvWv32KmgnH"' + - '"4Rrb29DtYEGjVCIowJThhUukAaj"' last-modified: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA1MDQ=;sn=830504 + - zAJw6V16=MDotMSM0MTEzOTQ4;sn=4113948 transfer-encoding: - chunked status: @@ -631,53 +621,47 @@ interactions: - keep-alive Content-Length: - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQ4 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:47:55 GMT + - Aug, 24 2020 20:28:15 GMT method: DELETE uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?api-version=1.0 response: body: - string: '{"etag":"Aixyb0uz0AfBZmLryMpee4C21BM","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":null,"content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:47:55+00:00"}' + string: '{"etag":"yP8m5bW2C86HNfWBHEJM48BH765","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":null,"content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:28:14+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT etag: - - '"Aixyb0uz0AfBZmLryMpee4C21BM"' + - '"yP8m5bW2C86HNfWBHEJM48BH765"' last-modified: - - Fri, 15 Nov 2019 17:47:55 GMT + - Mon, 24 Aug 2020 20:28:14 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA1MDU=;sn=830505 + - zAJw6V16=MDotMSM0MTEzOTQ5;sn=4113949 transfer-encoding: - chunked status: diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_async.test_set_read_only.yaml b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_async.test_set_read_only.yaml index 23c4a4d8996a2..a8259cabe57b0 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_async.test_set_read_only.yaml +++ b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_async.test_set_read_only.yaml @@ -9,11 +9,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:03 GMT method: GET uri: https://xyazconfig.azconfig.io/kv?key=PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309&label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: @@ -22,32 +22,26 @@ interactions: headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kvset+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:02 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains + sync-token: + - zAJw6V16=MDotMSM0MTEzOTQ5;sn=4113949 transfer-encoding: - chunked status: @@ -70,53 +64,47 @@ interactions: - application/json; charset=utf-8 If-None-Match: - '*' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTQ5 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 5b/E4qQlXHTRod+n+f+xjK6c/tRVR8uxoC62FjvGJPw= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:03 GMT method: PUT uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"dS62ba68nUi7uqHKtLghEGVd7Ht","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:48:34+00:00"}' + string: '{"etag":"bXvp2yUJkFR4KsM8fxxk4KMe4bf","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:29:03+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:02 GMT etag: - - '"dS62ba68nUi7uqHKtLghEGVd7Ht"' + - '"bXvp2yUJkFR4KsM8fxxk4KMe4bf"' last-modified: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA4NDM=;sn=830843 + - zAJw6V16=MDotMSM0MTEzOTUw;sn=4113950 transfer-encoding: - chunked status: @@ -131,49 +119,43 @@ interactions: - gzip, deflate Connection: - keep-alive + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTUw User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: GET uri: https://xyazconfig.azconfig.io/kv?key=PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309&api-version=1.0 response: body: - string: '{"items":[{"etag":"dS62ba68nUi7uqHKtLghEGVd7Ht","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:48:34+00:00"}]}' + string: '{"items":[{"etag":"bXvp2yUJkFR4KsM8fxxk4KMe4bf","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:29:03+00:00"}]}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kvset+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:02 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA4NDM=;sn=830843 + - zAJw6V16=MDotMSM0MTEzOTUw;sn=4113950 transfer-encoding: - chunked status: @@ -190,12 +172,14 @@ interactions: - keep-alive Content-Length: - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTUw User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: DELETE uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?api-version=1.0 response: @@ -204,30 +188,22 @@ interactions: headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains status: @@ -250,53 +226,47 @@ interactions: - application/json; charset=utf-8 If-None-Match: - '*' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTUw User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 4rt07HteiPg5NxofrgzMmlQPTVbo1no7aKxDSI5uUU4= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: PUT uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?api-version=1.0 response: body: - string: '{"etag":"DwNe4RpfbjaxNEa6WD1ddj45GOV","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":null,"content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:48:35+00:00"}' + string: '{"etag":"SQd419TV4a5emfz67CSVeYtOP11","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":null,"content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:29:03+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:03 GMT etag: - - '"DwNe4RpfbjaxNEa6WD1ddj45GOV"' + - '"SQd419TV4a5emfz67CSVeYtOP11"' last-modified: - - Fri, 15 Nov 2019 17:48:35 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA4NDQ=;sn=830844 + - zAJw6V16=MDotMSM0MTEzOTUx;sn=4113951 transfer-encoding: - chunked status: @@ -313,53 +283,47 @@ interactions: - keep-alive Content-Length: - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTUx User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: PUT uri: https://xyazconfig.azconfig.io/locks/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"pCvjoheTMhynAhalKLpVrecq4AR","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":true,"last_modified":"2019-11-15T17:48:35+00:00"}' + string: '{"etag":"dBhD1mISw0XY3Q3OZ5KqekEJfWm","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":true,"last_modified":"2020-08-24T20:29:03+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:03 GMT etag: - - '"pCvjoheTMhynAhalKLpVrecq4AR"' + - '"dBhD1mISw0XY3Q3OZ5KqekEJfWm"' last-modified: - - Fri, 15 Nov 2019 17:48:35 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA4NDU=;sn=830845 + - zAJw6V16=MDotMSM0MTEzOTUy;sn=4113952 transfer-encoding: - chunked status: @@ -380,12 +344,14 @@ interactions: - '231' Content-Type: - application/json; charset=utf-8 + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTUy User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 5b/E4qQlXHTRod+n+f+xjK6c/tRVR8uxoC62FjvGJPw= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: PUT uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: @@ -396,30 +362,22 @@ interactions: headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 + - application/problem+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains transfer-encoding: @@ -438,53 +396,47 @@ interactions: - keep-alive Content-Length: - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTUy User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: DELETE uri: https://xyazconfig.azconfig.io/locks/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"BAHQUNyWlM3VtwEa61ZH06qnwbf","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:48:35+00:00"}' + string: '{"etag":"nY2ur1YHi21fmCDfzI9PKK7vRhX","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:29:03+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:03 GMT etag: - - '"BAHQUNyWlM3VtwEa61ZH06qnwbf"' + - '"nY2ur1YHi21fmCDfzI9PKK7vRhX"' last-modified: - - Fri, 15 Nov 2019 17:48:35 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA4NDY=;sn=830846 + - zAJw6V16=MDotMSM0MTEzOTUz;sn=4113953 transfer-encoding: - chunked status: @@ -505,53 +457,47 @@ interactions: - '220' Content-Type: - application/json; charset=utf-8 + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTUz User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - QZZY+ppIiwncsqXIARuR/wqO+l4LBXrkxE9dX6TVcBY= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: PUT uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"QMhUidwSWYTULNTKu8jzwWrRaSs","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test valuea","tags":{"a":"b","c":"d"},"locked":false,"last_modified":"2019-11-15T17:48:35+00:00"}' + string: '{"etag":"QdqXnMam72tIJg1aubrmPyJ8abJ","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test valuea","tags":{"a":"b","c":"d"},"locked":false,"last_modified":"2020-08-24T20:29:03+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:03 GMT etag: - - '"QMhUidwSWYTULNTKu8jzwWrRaSs"' + - '"QdqXnMam72tIJg1aubrmPyJ8abJ"' last-modified: - - Fri, 15 Nov 2019 17:48:35 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA4NDc=;sn=830847 + - zAJw6V16=MDotMSM0MTEzOTU0;sn=4113954 transfer-encoding: - chunked status: @@ -568,53 +514,97 @@ interactions: - keep-alive Content-Length: - '0' + If-Match: + - '"bad"' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTU0 + User-Agent: + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-date: + - Aug, 24 2020 20:29:04 GMT + method: PUT + uri: https://xyazconfig.azconfig.io/locks/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 + response: + body: + string: '' + headers: + access-control-allow-credentials: + - 'true' + access-control-allow-origin: + - '*' + access-control-expose-headers: + - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate + connection: + - keep-alive + content-length: + - '0' + date: + - Mon, 24 Aug 2020 20:29:03 GMT + server: + - openresty/1.15.8.3 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +- request: + body: null + headers: + Accept: + - application/vnd.microsoft.appconfig.kv+json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTU0 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: DELETE uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?label=test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309&api-version=1.0 response: body: - string: '{"etag":"QMhUidwSWYTULNTKu8jzwWrRaSs","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test - content type","value":"test valuea","tags":{"a":"b","c":"d"},"locked":false,"last_modified":"2019-11-15T17:48:35+00:00"}' + string: '{"etag":"QdqXnMam72tIJg1aubrmPyJ8abJ","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":"test_label1_1d7b2b28-549e-11e9-b51c-2816a84d0309","content_type":"test + content type","value":"test valuea","tags":{"a":"b","c":"d"},"locked":false,"last_modified":"2020-08-24T20:29:03+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:34 GMT + - Mon, 24 Aug 2020 20:29:03 GMT etag: - - '"QMhUidwSWYTULNTKu8jzwWrRaSs"' + - '"QdqXnMam72tIJg1aubrmPyJ8abJ"' last-modified: - - Fri, 15 Nov 2019 17:48:35 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA4NDg=;sn=830848 + - zAJw6V16=MDotMSM0MTEzOTU1;sn=4113955 transfer-encoding: - chunked status: @@ -631,53 +621,47 @@ interactions: - keep-alive Content-Length: - '0' + Sync-Token: + - zAJw6V16=MDotMSM0MTEzOTU1 User-Agent: - - azsdk-python-appconfiguration/1.0.0b5 Python/3.7.2 (Windows-10-10.0.18362-SP0) + - azsdk-python-appconfiguration/1.0.2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-date: - - Nov, 15 2019 17:48:34 GMT + - Aug, 24 2020 20:29:04 GMT method: DELETE uri: https://xyazconfig.azconfig.io/kv/PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309?api-version=1.0 response: body: - string: '{"etag":"DwNe4RpfbjaxNEa6WD1ddj45GOV","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":null,"content_type":"test - content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2019-11-15T17:48:35+00:00"}' + string: '{"etag":"SQd419TV4a5emfz67CSVeYtOP11","key":"PYTHON_UNIT_test_key_a6af8952-54a6-11e9-b600-2816a84d0309","label":null,"content_type":"test + content type","value":"test value","tags":{"tag1":"tag1","tag2":"tag2"},"locked":false,"last_modified":"2020-08-24T20:29:03+00:00"}' headers: access-control-allow-credentials: - 'true' - access-control-allow-headers: - - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate - access-control-allow-methods: - - GET, PUT, POST, DELETE, PATCH, OPTIONS access-control-allow-origin: - '*' access-control-expose-headers: - DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, - Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, - x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, - x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, - x-ms-retry-after, x-ms-request-id, WWW-Authenticate + Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, + x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, + If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, + Link, Memento-Datetime, retry-after-ms, x-ms-request-id, WWW-Authenticate connection: - keep-alive content-type: - application/vnd.microsoft.appconfig.kv+json; charset=utf-8 date: - - Fri, 15 Nov 2019 17:48:35 GMT + - Mon, 24 Aug 2020 20:29:03 GMT etag: - - '"DwNe4RpfbjaxNEa6WD1ddj45GOV"' + - '"SQd419TV4a5emfz67CSVeYtOP11"' last-modified: - - Fri, 15 Nov 2019 17:48:35 GMT + - Mon, 24 Aug 2020 20:29:03 GMT server: - - openresty/1.15.8.1 + - openresty/1.15.8.3 strict-transport-security: - max-age=15724800; includeSubDomains sync-token: - - zAJw6V16=MzotMSM4MzA4NDk=;sn=830849 + - zAJw6V16=MDotMSM0MTEzOTU2;sn=4113956 transfer-encoding: - chunked status: diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client.py b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client.py index 15c592bdb10ea..dd9bdd3efc859 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client.py +++ b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client.py @@ -418,3 +418,6 @@ def test_set_read_only(self): and to_set_kv.tags == set_kv.tags and to_set_kv.etag != set_kv.etag ) + set_kv.etag = "bad" + with pytest.raises(ResourceModifiedError): + self.app_config_client.set_read_only(set_kv, True, match_condition=MatchConditions.IfNotModified) diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_async.py b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_async.py index 6af24c584e580..bda8b865080f3 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_async.py @@ -420,3 +420,6 @@ def test_set_read_only(self): and to_set_kv.tags == set_kv.tags and to_set_kv.etag != set_kv.etag ) + set_kv.etag = "bad" + with pytest.raises(ResourceModifiedError): + self.app_config_client.set_read_only(set_kv, True, match_condition=MatchConditions.IfNotModified) diff --git a/sdk/appconfiguration/ci.yml b/sdk/appconfiguration/ci.yml index 722225334380c..ec644e8ce1cd9 100644 --- a/sdk/appconfiguration/ci.yml +++ b/sdk/appconfiguration/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -38,4 +37,4 @@ extends: - name: azure_appconfiguration safeName: azureappconfiguration - name: azure_mgmt_appconfiguration - safeName: azuremgmtappconfiguration \ No newline at end of file + safeName: azuremgmtappconfiguration diff --git a/sdk/applicationinsights/ci.yml b/sdk/applicationinsights/ci.yml index 1ebba80507a10..5c8988902bd44 100644 --- a/sdk/applicationinsights/ci.yml +++ b/sdk/applicationinsights/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/appplatform/ci.yml b/sdk/appplatform/ci.yml new file mode 100644 index 0000000000000..666e9e8d4129b --- /dev/null +++ b/sdk/appplatform/ci.yml @@ -0,0 +1,33 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - master + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/appplatform/ + +pr: + branches: + include: + - master + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/appplatform/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: appplatform + Artifacts: + - name: azure_mgmt_appplatform + safeName: azuremgmtappplatform \ No newline at end of file diff --git a/sdk/appservice/ci.yml b/sdk/appservice/ci.yml index 42e7dfd6b4a24..8d2568465d5c2 100644 --- a/sdk/appservice/ci.yml +++ b/sdk/appservice/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: appservice Artifacts: - name: azure_mgmt_web - safeName: azuremgmtweb \ No newline at end of file + safeName: azuremgmtweb diff --git a/sdk/attestation/ci.yml b/sdk/attestation/ci.yml index 3874e7c9259c0..d33cc031f4204 100644 --- a/sdk/attestation/ci.yml +++ b/sdk/attestation/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: attestation Artifacts: - name: azure_mgmt_attestation - safeName: azuremgmtattestation \ No newline at end of file + safeName: azuremgmtattestation diff --git a/sdk/authorization/ci.yml b/sdk/authorization/ci.yml index 86362cc85281e..2e8996d3decc0 100644 --- a/sdk/authorization/ci.yml +++ b/sdk/authorization/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: authorization Artifacts: - name: azure_mgmt_authorization - safeName: azuremgmtauthorization \ No newline at end of file + safeName: azuremgmtauthorization diff --git a/sdk/automation/ci.yml b/sdk/automation/ci.yml index 1d46dbb541dcd..8c62497d1e2a9 100644 --- a/sdk/automation/ci.yml +++ b/sdk/automation/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: automation Artifacts: - name: azure_mgmt_automation - safeName: azuremgmtautomation \ No newline at end of file + safeName: azuremgmtautomation diff --git a/sdk/azurestack/ci.yml b/sdk/azurestack/ci.yml index f34d3623f88c4..52e74fb7d926b 100644 --- a/sdk/azurestack/ci.yml +++ b/sdk/azurestack/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: azurestack Artifacts: - name: azure_mgmt_azurestack - safeName: azuremgmtazurestack \ No newline at end of file + safeName: azuremgmtazurestack diff --git a/sdk/azurestackhci/ci.yml b/sdk/azurestackhci/ci.yml index 5a135ee88b539..cc5492e9c3ec3 100644 --- a/sdk/azurestackhci/ci.yml +++ b/sdk/azurestackhci/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: azurestackhci Artifacts: - name: azure_mgmt_azurestackhci - safeName: azuremgmtazurestackhci \ No newline at end of file + safeName: azuremgmtazurestackhci diff --git a/sdk/batch/ci.yml b/sdk/batch/ci.yml index 64c476bad2d67..7a866d35397e3 100644 --- a/sdk/batch/ci.yml +++ b/sdk/batch/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -32,4 +31,4 @@ extends: - name: azure_mgmt_batch safeName: azuremgmtbatch - name: azure_batch - safeName: azurebatch \ No newline at end of file + safeName: azurebatch diff --git a/sdk/billing/ci.yml b/sdk/billing/ci.yml index eb74f53a5d52e..75649b447fc74 100644 --- a/sdk/billing/ci.yml +++ b/sdk/billing/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: billing Artifacts: - name: azure_mgmt_billing - safeName: azuremgmtbilling \ No newline at end of file + safeName: azuremgmtbilling diff --git a/sdk/botservice/ci.yml b/sdk/botservice/ci.yml index a6f4b76d83891..ebd2e25367979 100644 --- a/sdk/botservice/ci.yml +++ b/sdk/botservice/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: botservice Artifacts: - name: azure_mgmt_botservice - safeName: azuremgmtbotservice \ No newline at end of file + safeName: azuremgmtbotservice diff --git a/sdk/cdn/ci.yml b/sdk/cdn/ci.yml index 0ba4721f286ec..a65de72c4c67d 100644 --- a/sdk/cdn/ci.yml +++ b/sdk/cdn/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: cdn Artifacts: - name: azure_mgmt_cdn - safeName: azuremgmtcdn \ No newline at end of file + safeName: azuremgmtcdn diff --git a/sdk/cognitiveservices/ci.yml b/sdk/cognitiveservices/ci.yml index ed18c333acbaa..0834f7467519b 100644 --- a/sdk/cognitiveservices/ci.yml +++ b/sdk/cognitiveservices/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -76,4 +75,4 @@ extends: - name: azure_cognitiveservices_vision_face safeName: azurecognitiveservicesvisionface - name: azure_mgmt_cognitiveservices - safeName: azuremgmtcognitiveservices \ No newline at end of file + safeName: azuremgmtcognitiveservices diff --git a/sdk/commerce/ci.yml b/sdk/commerce/ci.yml index 359652cd14ee8..cb92fe6131a74 100644 --- a/sdk/commerce/ci.yml +++ b/sdk/commerce/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: commerce Artifacts: - name: azure_mgmt_commerce - safeName: azuremgmtcommerce \ No newline at end of file + safeName: azuremgmtcommerce diff --git a/sdk/compute/ci.yml b/sdk/compute/ci.yml index 152fbcd9f428c..a5b673b3109e0 100644 --- a/sdk/compute/ci.yml +++ b/sdk/compute/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -32,4 +31,4 @@ extends: - name: azure_mgmt_compute safeName: azuremgmtcompute - name: azure_mgmt_imagebuilder - safeName: azuremgmtimagebuilder \ No newline at end of file + safeName: azuremgmtimagebuilder diff --git a/sdk/consumption/ci.yml b/sdk/consumption/ci.yml index 9dbf6fee08d87..9910c5223246a 100644 --- a/sdk/consumption/ci.yml +++ b/sdk/consumption/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: consumption Artifacts: - name: azure_mgmt_consumption - safeName: azuremgmtconsumption \ No newline at end of file + safeName: azuremgmtconsumption diff --git a/sdk/containerinstance/ci.yml b/sdk/containerinstance/ci.yml index 22cf24aa21742..e0f0f191484be 100644 --- a/sdk/containerinstance/ci.yml +++ b/sdk/containerinstance/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: containerinstance Artifacts: - name: azure_mgmt_containerinstance - safeName: azuremgmtcontainerinstance \ No newline at end of file + safeName: azuremgmtcontainerinstance diff --git a/sdk/containerregistry/ci.yml b/sdk/containerregistry/ci.yml index e842532e182bc..34a0699c0b116 100644 --- a/sdk/containerregistry/ci.yml +++ b/sdk/containerregistry/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: containerregistry Artifacts: - name: azure_mgmt_containerregistry - safeName: azuremgmtcontainerregistry \ No newline at end of file + safeName: azuremgmtcontainerregistry diff --git a/sdk/containerservice/ci.yml b/sdk/containerservice/ci.yml index c8de7f67cf30c..d9d920d2882af 100644 --- a/sdk/containerservice/ci.yml +++ b/sdk/containerservice/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: containerservice Artifacts: - name: azure_mgmt_containerservice - safeName: azuremgmtcontainerservice \ No newline at end of file + safeName: azuremgmtcontainerservice diff --git a/sdk/core/azure-core-tracing-opencensus/README.md b/sdk/core/azure-core-tracing-opencensus/README.md index 173b4ecf4bfad..11676f2d1c9ea 100644 --- a/sdk/core/azure-core-tracing-opencensus/README.md +++ b/sdk/core/azure-core-tracing-opencensus/README.md @@ -45,7 +45,7 @@ with tracer.span(name="MyApplication") as span: ## Troubleshooting -This client raises exceptions defined in [Azure Core](https://docs.microsoft.com/en-us/python/api/azure-core/azure.core.exceptions?view=azure-python). +This client raises exceptions defined in [Azure Core](https://docs.microsoft.com/python/api/azure-core/azure.core.exceptions?view=azure-python). ## Next steps diff --git a/sdk/core/azure-core-tracing-opentelemetry/README.md b/sdk/core/azure-core-tracing-opentelemetry/README.md index ac2a0722bda7c..d30f6f19f02c7 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/README.md +++ b/sdk/core/azure-core-tracing-opentelemetry/README.md @@ -78,7 +78,7 @@ Azure Exporter can be found in the [package](https://pypi.org/project/openteleme ## Troubleshooting -This client raises exceptions defined in [Azure Core](https://docs.microsoft.com/en-us/python/api/azure-core/azure.core.exceptions?view=azure-python). +This client raises exceptions defined in [Azure Core](https://docs.microsoft.com/python/api/azure-core/azure.core.exceptions?view=azure-python). ## Next steps diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 45ec3dc07f5b3..0e0ffcba14345 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,8 +1,11 @@ # Release History -## 1.8.1 (Unreleased) +## 1.8.1 (2020-09-08) +### Bug fixes + +- SAS credential replicated "/" fix #13159 ## 1.8.0 (2020-08-10) diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_base.py b/sdk/core/azure-core/azure/core/pipeline/transport/_base.py index eee08d7fa8595..4aca84c7ae2b8 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_base.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_base.py @@ -147,7 +147,7 @@ def _urljoin(base_url, stub_url): :rtype: str """ parsed = urlparse(base_url) - parsed = parsed._replace(path=parsed.path + "/" + stub_url) + parsed = parsed._replace(path=parsed.path.rstrip("/") + "/" + stub_url) return parsed.geturl() diff --git a/sdk/core/azure-core/tests/test_basic_transport.py b/sdk/core/azure-core/tests/test_basic_transport.py index 6ccbb4125a664..647828ee53d1d 100644 --- a/sdk/core/azure-core/tests/test_basic_transport.py +++ b/sdk/core/azure-core/tests/test_basic_transport.py @@ -14,7 +14,7 @@ import mock from azure.core.pipeline.transport import HttpRequest, HttpResponse, RequestsTransport -from azure.core.pipeline.transport._base import HttpClientTransportResponse, HttpTransport, _deserialize_response +from azure.core.pipeline.transport._base import HttpClientTransportResponse, HttpTransport, _deserialize_response, _urljoin from azure.core.pipeline.policies import HeadersPolicy from azure.core.pipeline import Pipeline import logging @@ -88,6 +88,13 @@ def test_http_request_serialization(): assert serialized == expected +def test_url_join(): + assert _urljoin('devstoreaccount1', '') == 'devstoreaccount1/' + assert _urljoin('devstoreaccount1', 'testdir/') == 'devstoreaccount1/testdir/' + assert _urljoin('devstoreaccount1/', '') == 'devstoreaccount1/' + assert _urljoin('devstoreaccount1/', 'testdir/') == 'devstoreaccount1/testdir/' + + def test_http_client_response(): # Create a core request request = HttpRequest("GET", "www.httpbin.org") diff --git a/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py b/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py index 18502db70977b..ce671e5725161 100644 --- a/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py +++ b/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py @@ -30,13 +30,13 @@ _LOGGER = logging.getLogger(__name__) _ARMID_RE = re.compile( - "(?i)/subscriptions/(?P[^/]*)(/resourceGroups/(?P[^/]*))?" - "(/providers/(?P[^/]*)/(?P[^/]*)/(?P[^/]*)(?P.*))?" + "(?i)/subscriptions/(?P[^/]+)(/resourceGroups/(?P[^/]+))?" + "(/providers/(?P[^/]+)/(?P[^/]*)/(?P[^/]+)(?P.*))?" ) _CHILDREN_RE = re.compile( - "(?i)(/providers/(?P[^/]*))?/" - "(?P[^/]*)/(?P[^/]*)" + "(?i)(/providers/(?P[^/]+))?/" + "(?P[^/]*)/(?P[^/]+)" ) _ARMNAME_RE = re.compile("^[^<>%&:\\?/]{1,260}$") diff --git a/sdk/core/azure-mgmt-core/tests/test_tools.py b/sdk/core/azure-mgmt-core/tests/test_tools.py index 871b78bd754f9..831bf9b4835ce 100644 --- a/sdk/core/azure-mgmt-core/tests/test_tools.py +++ b/sdk/core/azure-mgmt-core/tests/test_tools.py @@ -239,7 +239,9 @@ def test_resource_parse(self): invalid_ids = [ '/subscriptions/fakesub/resourceGroups/myRg/type1/name1', '/subscriptions/fakesub/resourceGroups/myRg/providers/Microsoft.Provider/foo', - '/subscriptions/fakesub/resourceGroups/myRg/providers/namespace/type/name/type1' + '/subscriptions/fakesub/resourceGroups/myRg/providers/namespace/type/name/type1', + '/subscriptions/fakesub/resourceGroups/', + '/subscriptions//resourceGroups/' ] for invalid_id in invalid_ids: self.assertFalse(is_valid_resource_id(invalid_id)) diff --git a/sdk/core/azure-servicemanagement-legacy/README.md b/sdk/core/azure-servicemanagement-legacy/README.md index bb3a8445abf2b..586ab2f5f6148 100644 --- a/sdk/core/azure-servicemanagement-legacy/README.md +++ b/sdk/core/azure-servicemanagement-legacy/README.md @@ -231,7 +231,7 @@ section of the project. # Learn More [Microsoft Azure Python Developer -Center](http://azure.microsoft.com/en-us/develop/python/) +Center](http://azure.microsoft.com/develop/python/) ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-servicemanagement-legacy%2FREADME.png) diff --git a/sdk/core/azure/CHANGELOG.md b/sdk/core/azure/CHANGELOG.md index 4295ce1e8de3f..e91b8608b75b3 100644 --- a/sdk/core/azure/CHANGELOG.md +++ b/sdk/core/azure/CHANGELOG.md @@ -28,9 +28,9 @@ Example:: Configuration from the CLI is: -- [az login](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli): access to credentials -- [az account set --subscriptions](https://docs.microsoft.com/en-us/cli/azure/manage-azure-subscriptions-azure-cli): access to subscription_id -- [az cloud set --name](https://docs.microsoft.com/en-us/cli/azure/cloud#set): access to base_url (sovereign cloud, Government, Germany, etc.) +- [az login](https://docs.microsoft.com/cli/azure/authenticate-azure-cli): access to credentials +- [az account set --subscriptions](https://docs.microsoft.com/cli/azure/manage-azure-subscriptions-azure-cli): access to subscription_id +- [az cloud set --name](https://docs.microsoft.com/cli/azure/cloud#set): access to base_url (sovereign cloud, Government, Germany, etc.) Note: CLI and SDK are versioned separately. We do recommend using two different virtual environments. Information will be shared automatically since the CLI saves it in the $HOME folder. You do need the `azure-cli-core` package in your SDK environment to use this feature. @@ -648,8 +648,8 @@ The upgrade to this new version causes some breaking changes for Python SDK user See MSDN documentation for details on REST API changes: -* in '2013-08-15': https://msdn.microsoft.com/en-us/library/azure/dn592124.aspx -* in '2014-02-14': https://msdn.microsoft.com/en-us/library/azure/dd894041.aspx +* in '2013-08-15': https://msdn.microsoft.com/library/azure/dn592124.aspx +* in '2014-02-14': https://msdn.microsoft.com/library/azure/dd894041.aspx The other changes in this release are: diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index 3ae71b2b6598b..01d0d5665b94b 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -42,4 +41,4 @@ extends: - name: azure_core_tracing_opentelemetry safeName: azurecorecoretracingtelemetry - name: azure_common - safeName: azurecommon \ No newline at end of file + safeName: azurecommon diff --git a/sdk/cosmos/README.md b/sdk/cosmos/README.md index 78238458b1683..f6cd10f7be07b 100644 --- a/sdk/cosmos/README.md +++ b/sdk/cosmos/README.md @@ -2,11 +2,11 @@ Azure Cosmos DB is a globally distributed, multi-model database service that supports document, key-value, wide-column, and graph databases. For more information, go to [https://www.gotcosmos.com/](https://www.gotcosmos.com/) . -Use the Azure Cosmos DB SQL API SDKs for application development and database management. For all other APIs, please check the [documentation](https://docs.microsoft.com/en-us/azure/cosmos-db/introduction) to evaluate the best SDK for your project. +Use the Azure Cosmos DB SQL API SDKs for application development and database management. For all other APIs, please check the [documentation](https://docs.microsoft.com/azure/cosmos-db/introduction) to evaluate the best SDK for your project. ## Contents of this folder -### azure-cosmos +### [azure-cosmos](./azure-cosmos) This is the Azure Cosmos DB SQL API SDK for Python to manage databases and the JSON documents they contain in this NoSQL database service. High level capabilities are: @@ -17,7 +17,7 @@ This is the Azure Cosmos DB SQL API SDK for Python to manage databases and the J Use this package if you are creating an application or exploring data. -### azure-mgmt-cosmosdb +### [azure-mgmt-cosmosdb](./azure-mgmt-cosmosdb) This is the Microsoft Azure Cosmos DB Management Client Library. High level capabilities are: @@ -34,7 +34,7 @@ This is the Microsoft Azure Cosmos DB Management Client Library. High level capa Use this package if you are creating an account level management application. -### azure-mgmt-documentdb +### [azure-mgmt-documentdb](./azure-mgmt-documentdb) Legacy DocumentDB SDK. diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index e2940d239b725..90015159104c1 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -1,3 +1,9 @@ +## 4.1.1 (unreleased) + +**Bug fixes** +- Fixed bug where continuation token is not honored when query_iterable is used to get results by page. Issue #13265. + + ## 4.1.0 (2020-08-10) - Added deprecation warning for "lazy" indexing mode. The backend no longer allows creating containers with this mode and will set them to consistent instead. diff --git a/sdk/cosmos/azure-cosmos/Contributing.md b/sdk/cosmos/azure-cosmos/Contributing.md index cf989a63218f5..f195f755d8d29 100644 --- a/sdk/cosmos/azure-cosmos/Contributing.md +++ b/sdk/cosmos/azure-cosmos/Contributing.md @@ -1 +1 @@ -Please read the contributing guidelines from the [Azure Team](https://azure.microsoft.com/en-us/blog/simple-contribution-to-azure-documentation-and-sdk/) \ No newline at end of file +Please read the contributing guidelines from the [Azure Team](https://azure.microsoft.com/blog/simple-contribution-to-azure-documentation-and-sdk/) \ No newline at end of file diff --git a/sdk/cosmos/azure-cosmos/README.md b/sdk/cosmos/azure-cosmos/README.md index 82506d3112e52..cbe4a8ae2651c 100644 --- a/sdk/cosmos/azure-cosmos/README.md +++ b/sdk/cosmos/azure-cosmos/README.md @@ -11,14 +11,16 @@ Use the Azure Cosmos DB SQL API SDK for Python to manage databases and the JSON [SDK source code][source_code] | [Package (PyPI)][cosmos_pypi] | [API reference documentation][ref_cosmos_sdk] | [Product documentation][cosmos_docs] | [Samples][cosmos_samples] +> This SDK is used for the [SQL API](https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-getting-started). For all other APIs, please check the [Azure Cosmos DB documentation](https://docs.microsoft.com/en-us/azure/cosmos-db/introduction) to evaluate the best SDK for your project. ## Getting started + ### Prerequisites + * Azure subscription - [Create a free account][azure_sub] * Azure [Cosmos DB account][cosmos_account] - SQL API * [Python 2.7 or 3.5.3+][python] - If you need a Cosmos DB SQL API account, you can create one with this [Azure CLI][azure_cli] command: ```Bash @@ -39,6 +41,7 @@ Although not required, you can keep your base system and Azure SDK environments python3 -m venv azure-cosmosdb-sdk-environment source azure-cosmosdb-sdk-environment/bin/activate ``` + ### Authenticate the client Interaction with Cosmos DB starts with an instance of the [CosmosClient][ref_cosmosclient] class. You need an **account**, its **URI**, and one of its **account keys** to instantiate the client object. @@ -52,6 +55,7 @@ ACCT_NAME= export ACCOUNT_URI=$(az cosmosdb show --resource-group $RES_GROUP --name $ACCT_NAME --query documentEndpoint --output tsv) export ACCOUNT_KEY=$(az cosmosdb list-keys --resource-group $RES_GROUP --name $ACCT_NAME --query primaryMasterKey --output tsv) ``` + ### Create the client Once you've populated the `ACCOUNT_URI` and `ACCOUNT_KEY` environment variables, you can create the [CosmosClient][ref_cosmosclient]. @@ -77,12 +81,26 @@ Once you've initialized a [CosmosClient][ref_cosmosclient], you can interact wit For more information about these resources, see [Working with Azure Cosmos databases, containers and items][cosmos_resources]. +## Limitations + +As of August 2020 the features below are not yet supported. + +* Bulk/Batch processing +* Group By queries +* Direct TCP Mode access +* Language Native async i/o + +## Limitations Workaround + +If you want to use Python SDK to perform bulk inserts to Cosmos DB, the best alternative is to use [stored procedures](https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-write-stored-procedures-triggers-udfs) to write multiple items with the same partition key. + ## Examples The following sections provide several code snippets covering some of the most common Cosmos DB tasks, including: * [Create a database](#create-a-database "Create a database") * [Create a container](#create-a-container "Create a container") +* [Create an analytical store enabled container](#create-an-analytical-store-enabled-container "Create a container") * [Get an existing container](#get-an-existing-container "Get an existing container") * [Insert data](#insert-data "Insert data") * [Delete data](#delete-data "Delete data") @@ -131,6 +149,29 @@ except exceptions.CosmosHttpResponseError: raise ``` +### Create an analytical store enabled container + +This example creates a container with [Analytical Store](https://docs.microsoft.com/en-us/azure/cosmos-db/analytical-store-introduction) enabled, for reporting, BI, AI, and Advanced Analytics with [Azure Synapse Link](https://docs.microsoft.com/en-us/azure/cosmos-db/synapse-link). + +The options for analytical_storage_ttl are: + ++ 0 or Null or not informed: Not enabled. ++ -1: The data will be stored infinitely. ++ Any other number: the actual ttl, in seconds. + + +```Python +container_name = 'products' +try: + container = database.create_container(id=container_name, partition_key=PartitionKey(path="/productName"),analytical_storage_ttl=-1) +except exceptions.CosmosResourceExistsError: + container = database.get_container_client(container_name) +except exceptions.CosmosHttpResponseError: + raise +``` + +The preceding snippet also handles the [CosmosHttpResponseError][ref_httpfailure] exception if the container creation failed. For more information on error handling and troubleshooting, see the [Troubleshooting](#troubleshooting "Troubleshooting") section. + The preceding snippet also handles the [CosmosHttpResponseError][ref_httpfailure] exception if the container creation failed. For more information on error handling and troubleshooting, see the [Troubleshooting](#troubleshooting "Troubleshooting") section. ### Get an existing container diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py index c125e870b3a41..3897e5a8a6b17 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py @@ -24,6 +24,7 @@ """ from collections import deque +import copy from .. import _retry_utility from .. import http_constants @@ -43,13 +44,18 @@ def __init__(self, client, options): self._client = client self._options = options self._is_change_feed = "changeFeed" in options and options["changeFeed"] is True - self._continuation = None - if "continuation" in options and self._is_change_feed: - self._continuation = options["continuation"] + self._continuation = self._get_initial_continuation() self._has_started = False self._has_finished = False self._buffer = deque() + def _get_initial_continuation(self): + if "continuation" in self._options: + if "enableCrossPartitionQuery" in self._options: + raise ValueError("continuation tokens are not supported for cross-partition queries.") + return self._options["continuation"] + return None + def _has_more_pages(self): return not self._has_started or self._continuation @@ -112,8 +118,9 @@ def _fetch_items_helper_no_retries(self, fetch_function): while self._continuation or not self._has_started: if not self._has_started: self._has_started = True - self._options["continuation"] = self._continuation - (fetched_items, response_headers) = fetch_function(self._options) + new_options = copy.deepcopy(self._options) + new_options["continuation"] = self._continuation + (fetched_items, response_headers) = fetch_function(new_options) continuation_key = http_constants.HttpHeaders.Continuation # Use Etag as continuation token for change feed queries. if self._is_change_feed: diff --git a/sdk/cosmos/azure-cosmos/samples/README.md b/sdk/cosmos/azure-cosmos/samples/README.md index 82a25c029b2e7..b6ed3f5db83e9 100644 --- a/sdk/cosmos/azure-cosmos/samples/README.md +++ b/sdk/cosmos/azure-cosmos/samples/README.md @@ -48,7 +48,7 @@ The following are code samples that show common scenario operations with the Azu ## Prerequisites * Python 2.7 or 3.5.3+ * You must have an [Azure subscription](https://azure.microsoft.com/free/) and an -[Azure Cosmos DB account](https://docs.microsoft.com/en-us/azure/cosmos-db/create-sql-api-python#create-a-database-account) to run these samples. +[Azure Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account) to run these samples. ## Setup diff --git a/sdk/cosmos/azure-cosmos/samples/container_management.py b/sdk/cosmos/azure-cosmos/samples/container_management.py index 9f0177f82b146..ff29c8b3e454a 100644 --- a/sdk/cosmos/azure-cosmos/samples/container_management.py +++ b/sdk/cosmos/azure-cosmos/samples/container_management.py @@ -24,6 +24,7 @@ # 2.4 - Create container with unique key # 2.5 - Create Container with partition key V2 # 2.6 - Create Container with partition key V1 +# 2.7 - Create Container with analytical store enabled # # 3. Manage Container Provisioned Throughput # 3.1 - Get Container provisioned throughput (RU/s) @@ -67,8 +68,8 @@ def find_container(db, id): def create_container(db, id): - """ Execute the most basic Create of container. - This will create a container with 400 RUs throughput and default indexing policy """ + """ Execute basic container creation. + This will create containers with 400 RUs with different indexing, partitioning, and storage options """ partition_key = PartitionKey(path='/id', kind='Hash') print("\n2.1 Create Container - Basic") @@ -84,9 +85,8 @@ def create_container(db, id): try: coll = { - "id": "container_custom_index_policy", + "id": id+"_container_custom_index_policy", "indexingPolicy": { - "indexingMode": "lazy", "automatic": False } } @@ -107,9 +107,8 @@ def create_container(db, id): print("\n2.3 Create Container - With custom provisioned throughput") try: - coll = {"id": "container_custom_throughput"} container = db.create_container( - id=coll['id'], + id=id+"_container_custom_throughput", partition_key=partition_key, offer_throughput=400 ) @@ -122,7 +121,7 @@ def create_container(db, id): try: container = db.create_container( - id="container_unique_keys", + id= id+"_container_unique_keys", partition_key=partition_key, unique_key_policy={'uniqueKeys': [{'paths': ['/field1/field2', '/field3']}]} ) @@ -138,7 +137,7 @@ def create_container(db, id): try: container = db.create_container( - id="container_partition_key_v2", + id=id+"_container_partition_key_v2", partition_key=PartitionKey(path='/id', kind='Hash') ) properties = container.read() @@ -152,7 +151,7 @@ def create_container(db, id): try: container = db.create_container( - id="container_partition_key_v1", + id=id+"_container_partition_key_v1", partition_key=PartitionKey(path='/id', kind='Hash', version=1) ) properties = container.read() @@ -162,6 +161,22 @@ def create_container(db, id): except exceptions.CosmosResourceExistsError: print('A container with id \'container_partition_key_v1\' already exists') + print("\n2.7 Create Container - With analytical store enabled") + + try: + container = db.create_container( + id=id+"_container_analytical_store", + partition_key=PartitionKey(path='/id', kind='Hash'),analytical_storage_ttl=-1 + + ) + properties = container.read() + print('Container with id \'{0}\' created'.format(container.id)) + print('Partition Key - \'{0}\''.format(properties['partitionKey'])) + + except exceptions.CosmosResourceExistsError: + print('A container with id \'_container_analytical_store\' already exists') + + def manage_provisioned_throughput(db, id): print("\n3.1 Get Container provisioned throughput (RU/s)") diff --git a/sdk/cosmos/azure-cosmos/samples/index_management.py b/sdk/cosmos/azure-cosmos/samples/index_management.py index 169b2410d7f1e..810c312beecb6 100644 --- a/sdk/cosmos/azure-cosmos/samples/index_management.py +++ b/sdk/cosmos/azure-cosmos/samples/index_management.py @@ -22,7 +22,6 @@ # excludedPaths # # We can toggle 'automatic' to eiher be True or False depending upon whether we want to have indexing over all columns by default or not. -# indexingMode can be either of consistent, lazy or none # # We can provide options while creating documents. indexingDirective is one such, # by which we can tell whether it should be included or excluded in the index of the parent container. diff --git a/sdk/cosmos/azure-cosmos/test/test_query.py b/sdk/cosmos/azure-cosmos/test/test_query.py index 59204ef863eaa..44d59975c46c4 100644 --- a/sdk/cosmos/azure-cosmos/test/test_query.py +++ b/sdk/cosmos/azure-cosmos/test/test_query.py @@ -522,6 +522,42 @@ def test_distinct_on_different_types_and_field_orders(self): _QueryExecutionContextBase.__next__ = self.OriginalExecuteFunction _QueryExecutionContextBase.next = self.OriginalExecuteFunction + def test_paging_with_continuation_token(self): + created_collection = self.config.create_multi_partition_collection_with_custom_pk_if_not_exist(self.client) + + document_definition = {'pk': 'pk', 'id': '1'} + created_collection.create_item(body=document_definition) + document_definition = {'pk': 'pk', 'id': '2'} + created_collection.create_item(body=document_definition) + + query = 'SELECT * from c' + query_iterable = created_collection.query_items( + query=query, + partition_key='pk', + max_item_count=1 + ) + pager = query_iterable.by_page() + pager.next() + token = pager.continuation_token + second_page = list(pager.next())[0] + + pager = query_iterable.by_page(token) + second_page_fetched_with_continuation_token = list(pager.next())[0] + + self.assertEqual(second_page['id'], second_page_fetched_with_continuation_token['id']) + + def test_cross_partition_query_with_continuation_token_fails(self): + created_collection = self.config.create_multi_partition_collection_with_custom_pk_if_not_exist(self.client) + query = 'SELECT * from c' + query_iterable = created_collection.query_items( + query=query, + enable_cross_partition_query=True, + max_item_count=1, + ) + + with self.assertRaises(ValueError): + pager = query_iterable.by_page("fake_continuation_token") + def _validate_distinct_on_different_types_and_field_orders(self, collection, query, expected_results, get_mock_result): self.count = 0 self.get_mock_result = get_mock_result diff --git a/sdk/cosmos/ci.yml b/sdk/cosmos/ci.yml index 9bf34906107e5..e1ab974e44f7f 100644 --- a/sdk/cosmos/ci.yml +++ b/sdk/cosmos/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: include: @@ -33,4 +32,4 @@ extends: - name: azure_cosmos safeName: azurecosmos - name: azure_mgmt_cosmosdb - safeName: azuremgmtcosmosdb \ No newline at end of file + safeName: azuremgmtcosmosdb diff --git a/sdk/costmanagement/ci.yml b/sdk/costmanagement/ci.yml index dfdc78353159d..b20de777438a2 100644 --- a/sdk/costmanagement/ci.yml +++ b/sdk/costmanagement/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/customproviders/ci.yml b/sdk/customproviders/ci.yml index fcc43213231ce..76f8fa58dcb18 100644 --- a/sdk/customproviders/ci.yml +++ b/sdk/customproviders/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: customproviders Artifacts: - name: azure_mgmt_customproviders - safeName: azuremgmtcustomproviders \ No newline at end of file + safeName: azuremgmtcustomproviders diff --git a/sdk/databox/ci.yml b/sdk/databox/ci.yml index 732c6fa933fd9..bea9658daf211 100644 --- a/sdk/databox/ci.yml +++ b/sdk/databox/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: databox Artifacts: - name: azure_mgmt_databox - safeName: azuremgmtdatabox \ No newline at end of file + safeName: azuremgmtdatabox diff --git a/sdk/databoxedge/ci.yml b/sdk/databoxedge/ci.yml index 3f2a4d183443f..b2d2c8d042d67 100644 --- a/sdk/databoxedge/ci.yml +++ b/sdk/databoxedge/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: databoxedge Artifacts: - name: azure_mgmt_databoxedge - safeName: azuremgmtdataboxedge \ No newline at end of file + safeName: azuremgmtdataboxedge diff --git a/sdk/databricks/ci.yml b/sdk/databricks/ci.yml index 8384153fa15ee..07aba7052b0a3 100644 --- a/sdk/databricks/ci.yml +++ b/sdk/databricks/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: include: @@ -29,4 +28,4 @@ extends: ServiceDirectory: databricks Artifacts: - name: azure_mgmt_databricks - safeName: azuremgmtdatabricks \ No newline at end of file + safeName: azuremgmtdatabricks diff --git a/sdk/datafactory/ci.yml b/sdk/datafactory/ci.yml index 038a4c70027be..b836d5151858a 100644 --- a/sdk/datafactory/ci.yml +++ b/sdk/datafactory/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: datafactory Artifacts: - name: azure_mgmt_datafactory - safeName: azuremgmtdatafactory \ No newline at end of file + safeName: azuremgmtdatafactory diff --git a/sdk/datalake/ci.yml b/sdk/datalake/ci.yml index eb41659fc32af..7660e35173b24 100644 --- a/sdk/datalake/ci.yml +++ b/sdk/datalake/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -32,4 +31,4 @@ extends: - name: azure_mgmt_datalake_analytics safeName: azuremgmtdatalakeanalytics - name: azure_mgmt_datalake_store - safeName: azuremgmtdatalakestore \ No newline at end of file + safeName: azuremgmtdatalakestore diff --git a/sdk/datamigration/ci.yml b/sdk/datamigration/ci.yml index 6fac5f9a92222..577288b3fbe2d 100644 --- a/sdk/datamigration/ci.yml +++ b/sdk/datamigration/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: datamigration Artifacts: - name: azure_mgmt_datamigration - safeName: azuremgmtdatamigration \ No newline at end of file + safeName: azuremgmtdatamigration diff --git a/sdk/datashare/ci.yml b/sdk/datashare/ci.yml index ffef09f9c3283..d0e741c9352f6 100644 --- a/sdk/datashare/ci.yml +++ b/sdk/datashare/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: datashare Artifacts: - name: azure_mgmt_datashare - safeName: azuremgmtdatashare \ No newline at end of file + safeName: azuremgmtdatashare diff --git a/sdk/deploymentmanager/ci.yml b/sdk/deploymentmanager/ci.yml index 6c84822f71765..44efee8085c55 100644 --- a/sdk/deploymentmanager/ci.yml +++ b/sdk/deploymentmanager/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: deploymentmanager Artifacts: - name: azure_mgmt_deploymentmanager - safeName: azuremgmtdeploymentmanager \ No newline at end of file + safeName: azuremgmtdeploymentmanager diff --git a/sdk/devtestlabs/ci.yml b/sdk/devtestlabs/ci.yml index 7ab1586304e08..4b42e00a1d683 100644 --- a/sdk/devtestlabs/ci.yml +++ b/sdk/devtestlabs/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: devtestlabs Artifacts: - name: azure_mgmt_devtestlabs - safeName: azuremgmtdevtestlabs \ No newline at end of file + safeName: azuremgmtdevtestlabs diff --git a/sdk/digitaltwins/ci.yml b/sdk/digitaltwins/ci.yml index 0b73eac0d8ff5..4b62b08e67313 100644 --- a/sdk/digitaltwins/ci.yml +++ b/sdk/digitaltwins/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/edgegateway/ci.yml b/sdk/edgegateway/ci.yml index c0c43c3b9edb3..02e13e3d82f3b 100644 --- a/sdk/edgegateway/ci.yml +++ b/sdk/edgegateway/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: edgegateway Artifacts: - name: azure_mgmt_edgegateway - safeName: azuremgmtedgegateway \ No newline at end of file + safeName: azuremgmtedgegateway diff --git a/sdk/eventgrid/azure-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-eventgrid/CHANGELOG.md index 2fc7fda8852b1..d44b57ff8e4bf 100644 --- a/sdk/eventgrid/azure-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-eventgrid/CHANGELOG.md @@ -1,5 +1,13 @@ # Release History +## 2.0.0b1 (2020-09-08) + + **Features** + - Version (2.0.0b1) is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure EventGrid. + For more information about this, and preview releases of other Azure SDK libraries, please visit https://azure.github.io/azure-sdk/releases/latest/python.html. + - Implements the `EventGridPublisherClient` for the publish flow for EventGrid Events, CloudEvents and CustomEvents. + - Implements the `EventGridConsumer` for the consume flow of the events. + ## 1.3.0 (2019-05-20) - Event Schemas for new event types from IotHub, Media Services, diff --git a/sdk/eventgrid/azure-eventgrid/MANIFEST.in b/sdk/eventgrid/azure-eventgrid/MANIFEST.in index cad40fe06b5fe..abba13db8db22 100644 --- a/sdk/eventgrid/azure-eventgrid/MANIFEST.in +++ b/sdk/eventgrid/azure-eventgrid/MANIFEST.in @@ -1,4 +1,5 @@ recursive-include tests *.py *.yaml +recursive-include samples *.py include *.md include azure/__init__.py diff --git a/sdk/eventgrid/azure-eventgrid/README.md b/sdk/eventgrid/azure-eventgrid/README.md index 5aa35412bfe1a..ec7816e8e918a 100644 --- a/sdk/eventgrid/azure-eventgrid/README.md +++ b/sdk/eventgrid/azure-eventgrid/README.md @@ -1,22 +1,245 @@ -## Microsoft Azure SDK for Python +# Azure Event Grid client library for Python -This is the Microsoft Azure Event Grid Client Library. +Azure Event Grid is a fully-managed intelligent event routing service that allows for uniform event consumption using a publish-subscribe model. -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +[Source code][python-eg-src] | [Package (PyPI)][python-eg-pypi] | [API reference documentation][python-eg-ref-docs]| [Product documentation][python-eg-product-docs] | [Samples][python-eg-samples]| [Changelog][python-eg-changelog] -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). +## Getting started -## Usage +### Prerequisites +* Python 2.7, or 3.5 or later is required to use this package. +* You must have an [Azure subscription][azure_subscription] and an Event Grid Topic resource to use this package. -For code examples, see [Event -Grid](https://docs.microsoft.com/python/api/overview/azure/event-grid) -on docs.microsoft.com. +### Install the package +Install the Azure Event Grid client library for Python with [pip][pip]: -## Provide Feedback +```bash +pip install azure-eventgrid +``` -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. +#### Create an Event Grid Topic +You can create the resource using [Azure Portal][azure_portal_create_EG_resource] -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-eventgrid%2FREADME.png) +### Authenticate the client +In order to interact with the Event Grid service, you will need to create an instance of a client. +A **topic_hostname** and **credential** are necessary to instantiate the client object. + +#### Looking up the endpoint +You can find the endpoint and the hostname on the Azure portal. + +#### Create the client with AzureKeyCredential + +To use an API key as the `credential` parameter, +pass the key as a string into an instance of [AzureKeyCredential][azure-key-credential]. + +```python +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import EventGridPublisherClient + +topic_hostname = "https://..eventgrid.azure.net" +credential = AzureKeyCredential("") +eg_publisher_client = EventGridPublisherClient(topic_hostname, credential) +``` + +## Key concepts + +Information about the key concepts on Event Grid, see [Concepts in Azure Event Grid][publisher-service-doc] + +### EventGridPublisherClient +`EventGridPublisherClient` provides operations to send event data to topic hostname specified during client initialization. +Either a list or a single instance of CloudEvent/EventGridEvent/CustomEvent can be sent. + +### EventGridConsumer +`EventGridConsumer` is used to desrialize an event received. + +## Examples + +The following sections provide several code snippets covering some of the most common Event Grid tasks, including: + +* [Send an Event Grid Event](#send-an-eventgrid-event) +* [Send a Cloud Event](#send-a-cloud-event) +* [Consume an eventgrid Event](#consume-an-eventgrid-event) +* [Consume a cloud Event](#consume-a-cloud-event) + +### Send an Event Grid Event + +This example publishes an Event Grid event. + +```Python +import os +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import EventGridPublisherClient, EventGridEvent + +key = os.environ["EG_ACCESS_KEY"] +topic_hostname = os.environ["EG_TOPIC_HOSTNAME"] + +event = EventGridEvent( + subject="Door1", + data={"team": "azure-sdk"}, + event_type="Azure.Sdk.Demo", + data_version="2.0" +) + +credential = AzureKeyCredential(key) +client = EventGridPublisherClient(topic_hostname, credential) + +client.send(event) +``` + +### Send a Cloud Event + +This example publishes a Cloud event. + +```Python +import os +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import EventGridPublisherClient, CloudEvent + +key = os.environ["CLOUD_ACCESS_KEY"] +topic_hostname = os.environ["CLOUD_TOPIC_HOSTNAME"] + +event = CloudEvent( + type="Azure.Sdk.Sample", + source="https://egsample.dev/sampleevent", + data={"team": "azure-sdk"} +) + +credential = AzureKeyCredential(key) +client = EventGridPublisherClient(topic_hostname, credential) + +client.send(event) +``` + +### Consume an Event Grid Event + +This example demonstrates consuming and deserializing an eventgrid event. + +```Python +import os +from azure.eventgrid import EventGridConsumer + +consumer = EventGridConsumer() + +eg_storage_dict = { + "id":"bbab625-dc56-4b22-abeb-afcc72e5290c", + "subject":"/blobServices/default/containers/oc2d2817345i200097container/blobs/oc2d2817345i20002296blob", + "data":{ + "api":"PutBlockList", + }, + "eventType":"Microsoft.Storage.BlobCreated", + "dataVersion":"2.0", + "metadataVersion":"1", + "eventTime":"2020-08-07T02:28:23.867525Z", + "topic":"/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/topics/eventgridegsub" +} + +deserialized_event = consumer.decode_eventgrid_event(eg_storage_dict) + +# both allow access to raw properties as strings +time_string = deserialized_event.time +time_string = deserialized_event["time"] +``` + +### Consume a Cloud Event + +This example demonstrates consuming and deserializing a cloud event. + +```Python +import os +from azure.eventgrid import EventGridConsumer + +consumer = EventGridConsumer() + +cloud_storage_dict = { + "id":"a0517898-9fa4-4e70-b4a3-afda1dd68672", + "source":"/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}", + "data":{ + "api":"PutBlockList", + }, + "type":"Microsoft.Storage.BlobCreated", + "time":"2020-08-07T01:11:49.765846Z", + "specversion":"1.0" +} + +deserialized_event = consumer.decode_cloud_event(cloud_storage_dict) + +# both allow access to raw properties as strings +time_string = deserialized_event.time +time_string = deserialized_event["time"] +``` + +## Troubleshooting + +- Enable `azure.eventgrid` logger to collect traces from the library. + +### General +Event Grid client library will raise exceptions defined in [Azure Core][azure_core_exceptions]. + +### Logging +This library uses the standard +[logging][python_logging] library for logging. +Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO +level. + +### Optional Configuration + +Optional keyword arguments can be passed in at the client and per-operation level. +The azure-core [reference documentation][azure_core_ref_docs] +describes available configurations for retries, logging, transport protocols, and more. + +## Next steps + +The following section provides several code snippets illustrating common patterns used in the Event Grid Python API. + +### More sample code + +These code samples show common champion scenario operations with the Azure Event Grid client library. + +* Publish Custom Events to a topic: [cs1_publish_custom_events_to_a_topic.py][python-eg-sample-customevent] +* Publish Custom events to a domain topic: [cs2_publish_custom_events_to_a_domain_topic.py][python-eg-sample-customevent-to-domain] +* Deserialize a System Event: [cs3_consume_system_events.py][python-eg-sample-consume-systemevent] +* Deserialize a Custom Event: [cs4_consume_custom_events.py][python-eg-sample-consume-customevent] +* Deserialize a Cloud Event: [cs5_consume_events_using_cloud_events_1.0_schema.py][python-eg-sample-consume-cloudevent] +* Publish a Cloud Event: [cs6_publish_events_using_cloud_events_1.0_schema.py][python-eg-sample-send-cloudevent] + +More samples can be found [here][python-eg-samples]. + +### Additional documentation + +For more extensive documentation on Azure Event Grid, see the [Event Grid documentation][python-eg-product-docs] on docs.microsoft.com. + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla]. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + + +[python-eg-src]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/ +[python-eg-pypi]: https://pypi.org/project/azure-eventgrid +[python-eg-product-docs]: https://docs.microsoft.com/en-us/azure/event-grid/overview +[python-eg-ref-docs]: https://aka.ms/azsdk/python/eventgrid/docs +[python-eg-samples]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventgrid/azure-eventgrid/samples +[python-eg-changelog]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventgrid/azure-eventgrid/CHANGELOG.md + +[azure_portal_create_EG_resource]: https://ms.portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.EventGrid%2Ftopics +[azure-key-credential]: https://aka.ms/azsdk/python/core/azurekeycredential +[azure_core_exceptions]: https://aka.ms/azsdk/python/core/docs#module-azure.core.exceptions +[python_logging]: https://docs.python.org/3/library/logging.html +[azure_core_ref_docs]: https://aka.ms/azsdk/python/core/docs +[azure_subscription]: https://azure.microsoft.com/free/ + +[python-eg-sample-customevent]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs1_publish_custom_events_to_a_topic.py +[python-eg-sample-customevent-to-domain]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs2_publish_custom_events_to_a_domain_topic.py +[python-eg-sample-consume-systemevent]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_consume_system_events.py +[python-eg-sample-consume-customevent]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs4_consume_custom_events.py +[python-eg-sample-send-cloudevent]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs5_publish_events_using_cloud_events_1.0_schema.py +[python-eg-sample-consume-cloudevent]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_consume_events_using_cloud_events_1.0_schema.py +[publisher-service-doc]: https://docs.microsoft.com/en-us/azure/event-grid/concepts + +[cla]: https://cla.microsoft.com +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py index 336c61d76ffd7..0b0357a1f50de 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py @@ -1,18 +1,17 @@ # 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. +# Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- -from .event_grid_client import EventGridClient -from .version import VERSION - -__all__ = ['EventGridClient'] +from ._publisher_client import EventGridPublisherClient +from ._consumer import EventGridConsumer +from ._helpers import generate_shared_access_signature +from ._models import CloudEvent, CustomEvent, EventGridEvent, StorageBlobCreatedEventData +from ._shared_access_signature_credential import EventGridSharedAccessSignatureCredential +from ._version import VERSION +__all__ = ['EventGridPublisherClient', 'EventGridConsumer', + 'CloudEvent', 'CustomEvent', 'EventGridEvent', 'StorageBlobCreatedEventData', + 'generate_shared_access_signature', 'EventGridSharedAccessSignatureCredential'] __version__ = VERSION - diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_constants.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_constants.py new file mode 100644 index 0000000000000..e762ff44804a0 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_constants.py @@ -0,0 +1,9 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +EVENTGRID_KEY_HEADER = 'aeg-sas-key' +EVENTGRID_TOKEN_HEADER = 'aeg-sas-token' +DEFAULT_API_VERSION = "2018-01-01" +SAFE_ENCODE = '~()*!.\'' diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_consumer.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_consumer.py new file mode 100644 index 0000000000000..ae2d8a2aa9d9d --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_consumer.py @@ -0,0 +1,69 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING +import json +import six +import logging + +from azure.core import PipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + +_LOGGER = logging.getLogger(__name__) + +from ._models import CloudEvent, EventGridEvent + +class EventGridConsumer(object): + """ + A consumer responsible for deserializing event handler messages, to allow for access to strongly typed Event objects. + """ + def decode_cloud_event(self, cloud_event, **kwargs): + # type: (Union[str, dict, bytes], Any) -> CloudEvent + """Single event following CloudEvent schema will be parsed and returned as Deserialized Event. + :param cloud_event: The event to be deserialized. + :type cloud_event: Union[str, dict, bytes] + :rtype: CloudEvent + + :raise: :class:`ValueError`, when events do not follow CloudEvent schema. + """ + encode = kwargs.pop('encoding', 'utf-8') + try: + cloud_event = CloudEvent._from_json(cloud_event, encode) + deserialized_event = CloudEvent._from_generated(cloud_event) + CloudEvent._deserialize_data(deserialized_event, deserialized_event.type) + return deserialized_event + except Exception as err: + _LOGGER.error('Error: cannot deserialize event. Event does not have a valid format. Event must be a string, dict, or bytes following the CloudEvent schema.') + _LOGGER.error('Your event: {}'.format(cloud_event)) + _LOGGER.error(err) + raise ValueError('Error: cannot deserialize event. Event does not have a valid format. Event must be a string, dict, or bytes following the CloudEvent schema.') + + def decode_eventgrid_event(self, eventgrid_event, **kwargs): + # type: (Union[str, dict, bytes], Any) -> EventGridEvent + """Single event following EventGridEvent schema will be parsed and returned as Deserialized Event. + :param eventgrid_event: The event to be deserialized. + :type eventgrid_event: Union[str, dict, bytes] + :rtype: EventGridEvent + + :raise: :class:`ValueError`, when events do not follow EventGridEvent schema. + """ + encode = kwargs.pop('encoding', 'utf-8') + try: + eventgrid_event = EventGridEvent._from_json(eventgrid_event, encode) + deserialized_event = EventGridEvent.deserialize(eventgrid_event) + EventGridEvent._deserialize_data(deserialized_event, deserialized_event.event_type) + return deserialized_event + except Exception as err: + _LOGGER.error('Error: cannot deserialize event. Event does not have a valid format. Event must be a string, dict, or bytes following the CloudEvent schema.') + _LOGGER.error('Your event: {}'.format(eventgrid_event)) + _LOGGER.error(err) + raise ValueError('Error: cannot deserialize event. Event does not have a valid format. Event must be a string, dict, or bytes following the CloudEvent schema.') diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_mappings.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_mappings.py new file mode 100644 index 0000000000000..dc14a40bfacc8 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_mappings.py @@ -0,0 +1,85 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +from ._generated import models + +_event_mappings = { + "Microsoft.AppConfiguration.KeyValueDeleted": models.AppConfigurationKeyValueDeletedEventData, + "Microsoft.AppConfiguration.KeyValueModified": models.AppConfigurationKeyValueModifiedEventData, + "Microsoft.ContainerRegistry.ImagePushed": models.ContainerRegistryImagePushedEventData, + "Microsoft.ContainerRegistry.ImageDeleted": models.ContainerRegistryImageDeletedEventData, + "Microsoft.ContainerRegistry.ChartDeleted": models.ContainerRegistryChartDeletedEventData, + "Microsoft.ContainerRegistry.ChartPushed": models.ContainerRegistryChartPushedEventData, + "Microsoft.Devices.DeviceCreated": models.IotHubDeviceCreatedEventData, + "Microsoft.Devices.DeviceDeleted": models.IotHubDeviceDeletedEventData, + "Microsoft.Devices.DeviceConnected": models.IotHubDeviceConnectedEventData, + "Microsoft.Devices.DeviceDisconnected": models.IotHubDeviceDisconnectedEventData, + "Microsoft.Devices.DeviceTelemetry": models.IotHubDeviceTelemetryEventData, + "Microsoft.EventGrid.SubscriptionValidationEvent": models.SubscriptionValidationEventData, + "Microsoft.EventGrid.SubscriptionDeletedEvent": models.SubscriptionDeletedEventData, + "Microsoft.EventHub.CaptureFileCreated": models.EventHubCaptureFileCreatedEventData, + "Microsoft.MachineLearningServices.DatasetDriftDetected": models.MachineLearningServicesDatasetDriftDetectedEventData, + "Microsoft.MachineLearningServices.ModelDeployed": models.MachineLearningServicesModelDeployedEventData, + "Microsoft.MachineLearningServices.ModelRegistered": models.MachineLearningServicesModelRegisteredEventData, + "Microsoft.MachineLearningServices.RunCompleted": models.MachineLearningServicesRunCompletedEventData, + "Microsoft.MachineLearningServices.RunStatusChanged": models.MachineLearningServicesRunStatusChangedEventData, + "Microsoft.Maps.GeofenceEntered": models.MapsGeofenceEnteredEventData, + "Microsoft.Maps.GeofenceExited": models.MapsGeofenceExitedEventData, + "Microsoft.Maps.GeofenceResult": models.MapsGeofenceResultEventData, + "Microsoft.Media.JobStateChange": models.MediaJobStateChangeEventData, + "Microsoft.Media.JobOutputStateChange": models.MediaJobOutputStateChangeEventData, + "Microsoft.Media.JobScheduled": models.MediaJobScheduledEventData, + "Microsoft.Media.JobProcessing": models.MediaJobProcessingEventData, + "Microsoft.Media.JobCanceling": models.MediaJobCancelingEventData, + "Microsoft.Media.JobFinished": models.MediaJobFinishedEventData, + "Microsoft.Media.JobCanceled": models.MediaJobCanceledEventData, + "Microsoft.Media.JobErrored": models.MediaJobErroredEventData, + "Microsoft.Media.JobOutputCanceled": models.MediaJobOutputCanceledEventData, + "Microsoft.Media.JobOutputCanceling": models.MediaJobOutputCancelingEventData, + "Microsoft.Media.JobOutputErrored": models.MediaJobOutputErroredEventData, + "Microsoft.Media.JobOutputFinished": models.MediaJobOutputFinishedEventData, + "Microsoft.Media.JobOutputProcessing": models.MediaJobOutputProcessingEventData, + "Microsoft.Media.JobOutputScheduled": models.MediaJobOutputScheduledEventData, + "Microsoft.Media.JobOutputProgress": models.MediaJobOutputProgressEventData, + "Microsoft.Media.LiveEventEncoderConnected": models.MediaLiveEventEncoderConnectedEventData, + "Microsoft.Media.LiveEventConnectionRejected": models.MediaLiveEventConnectionRejectedEventData, + "Microsoft.Media.LiveEventEncoderDisconnected": models.MediaLiveEventEncoderDisconnectedEventData, + "Microsoft.Media.LiveEventIncomingStreamReceived": models.MediaLiveEventIncomingStreamReceivedEventData, + "Microsoft.Media.LiveEventIncomingStreamsOutOfSync": models.MediaLiveEventIncomingStreamsOutOfSyncEventData, + "Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync": models.MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, + "Microsoft.Media.LiveEventIncomingDataChunkDropped": models.MediaLiveEventIncomingDataChunkDroppedEventData, + "Microsoft.Media.LiveEventIngestHeartbeat": models.MediaLiveEventIngestHeartbeatEventData, + "Microsoft.Media.LiveEventTrackDiscontinuityDetected": models.MediaLiveEventTrackDiscontinuityDetectedEventData, + "Microsoft.Resources.ResourceWriteSuccess": models.ResourceWriteSuccessData, + "Microsoft.Resources.ResourceWriteFailure": models.ResourceWriteFailureData, + "Microsoft.Resources.ResourceWriteCancel": models.ResourceWriteCancelData, + "Microsoft.Resources.ResourceDeleteSuccess": models.ResourceDeleteSuccessData, + "Microsoft.Resources.ResourceDeleteFailure": models.ResourceDeleteFailureData, + "Microsoft.Resources.ResourceDeleteCancel": models.ResourceDeleteCancelData, + "Microsoft.Resources.ResourceActionSuccess": models.ResourceActionSuccessData, + "Microsoft.Resources.ResourceActionFailure": models.ResourceActionFailureData, + "Microsoft.Resources.ResourceActionCancel": models.ResourceActionCancelData, + "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners": models.ServiceBusActiveMessagesAvailableWithNoListenersEventData, + "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener": models.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, + "Microsoft.Storage.BlobCreated": models.StorageBlobCreatedEventData, + "Microsoft.Storage.BlobDeleted": models.StorageBlobDeletedEventData, + "Microsoft.Storage.BlobRenamed": models.StorageBlobRenamedEventData, + "Microsoft.Storage.DirectoryCreated": models.StorageDirectoryCreatedEventData, + "Microsoft.Storage.DirectoryDeleted": models.StorageDirectoryDeletedEventData, + "Microsoft.Storage.DirectoryRenamed": models.StorageDirectoryRenamedEventData, + "Microsoft.Storage.LifecyclePolicyCompleted": models.StorageLifecyclePolicyCompletedEventData, + "Microsoft.Web.AppUpdated": models.WebAppUpdatedEventData, + "Microsoft.Web.BackupOperationStarted": models.WebBackupOperationStartedEventData, + "Microsoft.Web.BackupOperationCompleted": models.WebBackupOperationCompletedEventData, + "Microsoft.Web.BackupOperationFailed": models.WebBackupOperationFailedEventData, + "Microsoft.Web.RestoreOperationStarted": models.WebRestoreOperationStartedEventData, + "Microsoft.Web.RestoreOperationCompleted": models.WebRestoreOperationCompletedEventData, + "Microsoft.Web.RestoreOperationFailed": models.WebRestoreOperationFailedEventData, + "Microsoft.Web.SlotSwapStarted": models.WebSlotSwapStartedEventData, + "Microsoft.Web.SlotSwapCompleted": models.WebSlotSwapCompletedEventData, + "Microsoft.Web.SlotSwapFailed": models.WebSlotSwapFailedEventData, + "Microsoft.Web.SlotSwapWithPreviewStarted": models.WebSlotSwapWithPreviewStartedEventData, + "Microsoft.Web.SlotSwapWithPreviewCancelled": models.WebSlotSwapWithPreviewCancelledEventData, + "Microsoft.Web.AppServicePlanUpdated": models.WebAppServicePlanUpdatedEventData, +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/__init__.py new file mode 100644 index 0000000000000..54198998f87f8 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/__init__.py @@ -0,0 +1,16 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._event_grid_publisher_client import EventGridPublisherClient +__all__ = ['EventGridPublisherClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/_configuration.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/_configuration.py new file mode 100644 index 0000000000000..10b08816d1b62 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/_configuration.py @@ -0,0 +1,52 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + +VERSION = "unknown" + +class EventGridPublisherClientConfiguration(Configuration): + """Configuration for EventGridPublisherClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + """ + + def __init__( + self, + **kwargs # type: Any + ): + # type: (...) -> None + super(EventGridPublisherClientConfiguration, self).__init__(**kwargs) + + self.api_version = "2018-01-01" + kwargs.setdefault('sdk_moniker', 'eventgridpublisherclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/_event_grid_publisher_client.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/_event_grid_publisher_client.py new file mode 100644 index 0000000000000..48b2bba0ac588 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/_event_grid_publisher_client.py @@ -0,0 +1,53 @@ +# 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. +# -------------------------------------------------------------------------- + +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 EventGridPublisherClientConfiguration +from .operations import EventGridPublisherClientOperationsMixin +from . import models + + +class EventGridPublisherClient(EventGridPublisherClientOperationsMixin): + """EventGrid Python Publisher Client. + + """ + + def __init__( + self, + **kwargs # type: Any + ): + # type: (...) -> None + base_url = 'https://{topicHostname}' + self._config = EventGridPublisherClientConfiguration(**kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> EventGridPublisherClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/__init__.py new file mode 100644 index 0000000000000..6a44d89d724a1 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/__init__.py @@ -0,0 +1,10 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._event_grid_publisher_client_async import EventGridPublisherClient +__all__ = ['EventGridPublisherClient'] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/_configuration_async.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/_configuration_async.py new file mode 100644 index 0000000000000..2fe719e6da1c4 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/_configuration_async.py @@ -0,0 +1,46 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +VERSION = "unknown" + +class EventGridPublisherClientConfiguration(Configuration): + """Configuration for EventGridPublisherClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + """ + + def __init__( + self, + **kwargs: Any + ) -> None: + super(EventGridPublisherClientConfiguration, self).__init__(**kwargs) + + self.api_version = "2018-01-01" + kwargs.setdefault('sdk_moniker', 'eventgridpublisherclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/_event_grid_publisher_client_async.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/_event_grid_publisher_client_async.py new file mode 100644 index 0000000000000..acd4bdd2a0ea1 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/_event_grid_publisher_client_async.py @@ -0,0 +1,45 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core import AsyncPipelineClient +from msrest import Deserializer, Serializer + +from ._configuration_async import EventGridPublisherClientConfiguration +from .operations_async import EventGridPublisherClientOperationsMixin +from .. import models + + +class EventGridPublisherClient(EventGridPublisherClientOperationsMixin): + """EventGrid Python Publisher Client. + + """ + + def __init__( + self, + **kwargs: Any + ) -> None: + base_url = 'https://{topicHostname}' + self._config = EventGridPublisherClientConfiguration(**kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "EventGridPublisherClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/operations_async/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/operations_async/__init__.py new file mode 100644 index 0000000000000..f0c46bab822e6 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/operations_async/__init__.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._event_grid_publisher_client_operations_async import EventGridPublisherClientOperationsMixin + +__all__ = [ + 'EventGridPublisherClientOperationsMixin', +] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/operations_async/_event_grid_publisher_client_operations_async.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/operations_async/_event_grid_publisher_client_operations_async.py new file mode 100644 index 0000000000000..15c54919f3afa --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/aio/operations_async/_event_grid_publisher_client_operations_async.py @@ -0,0 +1,185 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EventGridPublisherClientOperationsMixin: + + async def publish_events( + self, + topic_hostname: str, + events: List["models.EventGridEvent"], + **kwargs + ) -> None: + """Publishes a batch of events to an Azure Event Grid topic. + + :param topic_hostname: The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net. + :type topic_hostname: str + :param events: An array of events to be published to Event Grid. + :type events: list[~event_grid_publisher_client.models.EventGridEvent] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.publish_events.metadata['url'] # type: ignore + path_format_arguments = { + 'topicHostname': self._serialize.url("topic_hostname", topic_hostname, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(events, '[EventGridEvent]') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + publish_events.metadata = {'url': '/api/events'} # type: ignore + + async def publish_cloud_event_events( + self, + topic_hostname: str, + events: List["models.CloudEvent"], + **kwargs + ) -> None: + """Publishes a batch of events to an Azure Event Grid topic. + + :param topic_hostname: The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net. + :type topic_hostname: str + :param events: An array of events to be published to Event Grid. + :type events: list[~event_grid_publisher_client.models.CloudEvent] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-01-01" + content_type = kwargs.pop("content_type", "application/cloudevents-batch+json; charset=utf-8") + + # Construct URL + url = self.publish_cloud_event_events.metadata['url'] # type: ignore + path_format_arguments = { + 'topicHostname': self._serialize.url("topic_hostname", topic_hostname, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(events, '[CloudEvent]') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + publish_cloud_event_events.metadata = {'url': '/api/events'} # type: ignore + + async def publish_custom_event_events( + self, + topic_hostname: str, + events: List[object], + **kwargs + ) -> None: + """Publishes a batch of events to an Azure Event Grid topic. + + :param topic_hostname: The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net. + :type topic_hostname: str + :param events: An array of events to be published to Event Grid. + :type events: list[object] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.publish_custom_event_events.metadata['url'] # type: ignore + path_format_arguments = { + 'topicHostname': self._serialize.url("topic_hostname", topic_hostname, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(events, '[object]') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + publish_custom_event_events.metadata = {'url': '/api/events'} # type: ignore diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/__init__.py new file mode 100644 index 0000000000000..884541520e444 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/__init__.py @@ -0,0 +1,443 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AppConfigurationKeyValueDeletedEventData + from ._models_py3 import AppConfigurationKeyValueModifiedEventData + from ._models_py3 import AppEventTypeDetail + from ._models_py3 import AppServicePlanEventTypeDetail + from ._models_py3 import ChatEventBaseProperties + from ._models_py3 import ChatMemberAddedToThreadWithUserEventData + from ._models_py3 import ChatMemberRemovedFromThreadForWithUserEventData + from ._models_py3 import ChatMessageDeletedEventData + from ._models_py3 import ChatMessageEditedEventData + from ._models_py3 import ChatMessageEventBaseProperties + from ._models_py3 import ChatMessageReceivedEventData + from ._models_py3 import ChatThreadCreatedWithUserEventData + from ._models_py3 import ChatThreadEventBaseProperties + from ._models_py3 import ChatThreadMemberProperties + from ._models_py3 import ChatThreadPropertiesUpdatedPerUserEventData + from ._models_py3 import ChatThreadWithUserDeletedEventData + from ._models_py3 import CloudEvent + from ._models_py3 import ContainerRegistryArtifactEventData + from ._models_py3 import ContainerRegistryArtifactEventTarget + from ._models_py3 import ContainerRegistryChartDeletedEventData + from ._models_py3 import ContainerRegistryChartPushedEventData + from ._models_py3 import ContainerRegistryEventActor + from ._models_py3 import ContainerRegistryEventData + from ._models_py3 import ContainerRegistryEventRequest + from ._models_py3 import ContainerRegistryEventSource + from ._models_py3 import ContainerRegistryEventTarget + from ._models_py3 import ContainerRegistryImageDeletedEventData + from ._models_py3 import ContainerRegistryImagePushedEventData + from ._models_py3 import DeviceConnectionStateEventInfo + from ._models_py3 import DeviceConnectionStateEventProperties + from ._models_py3 import DeviceLifeCycleEventProperties + from ._models_py3 import DeviceTelemetryEventProperties + from ._models_py3 import DeviceTwinInfo + from ._models_py3 import DeviceTwinInfoProperties + from ._models_py3 import DeviceTwinInfoX509Thumbprint + from ._models_py3 import DeviceTwinMetadata + from ._models_py3 import DeviceTwinProperties + from ._models_py3 import EventGridEvent + from ._models_py3 import EventHubCaptureFileCreatedEventData + from ._models_py3 import IotHubDeviceConnectedEventData + from ._models_py3 import IotHubDeviceCreatedEventData + from ._models_py3 import IotHubDeviceDeletedEventData + from ._models_py3 import IotHubDeviceDisconnectedEventData + from ._models_py3 import IotHubDeviceTelemetryEventData + from ._models_py3 import KeyVaultCertificateExpiredEventData + from ._models_py3 import KeyVaultCertificateNearExpiryEventData + from ._models_py3 import KeyVaultCertificateNewVersionCreatedEventData + from ._models_py3 import KeyVaultKeyExpiredEventData + from ._models_py3 import KeyVaultKeyNearExpiryEventData + from ._models_py3 import KeyVaultKeyNewVersionCreatedEventData + from ._models_py3 import KeyVaultSecretExpiredEventData + from ._models_py3 import KeyVaultSecretNearExpiryEventData + from ._models_py3 import KeyVaultSecretNewVersionCreatedEventData + from ._models_py3 import MachineLearningServicesDatasetDriftDetectedEventData + from ._models_py3 import MachineLearningServicesModelDeployedEventData + from ._models_py3 import MachineLearningServicesModelRegisteredEventData + from ._models_py3 import MachineLearningServicesRunCompletedEventData + from ._models_py3 import MachineLearningServicesRunStatusChangedEventData + from ._models_py3 import MapsGeofenceEnteredEventData + from ._models_py3 import MapsGeofenceEventProperties + from ._models_py3 import MapsGeofenceExitedEventData + from ._models_py3 import MapsGeofenceGeometry + from ._models_py3 import MapsGeofenceResultEventData + from ._models_py3 import MediaJobCanceledEventData + from ._models_py3 import MediaJobCancelingEventData + from ._models_py3 import MediaJobError + from ._models_py3 import MediaJobErrorDetail + from ._models_py3 import MediaJobErroredEventData + from ._models_py3 import MediaJobFinishedEventData + from ._models_py3 import MediaJobOutput + from ._models_py3 import MediaJobOutputAsset + from ._models_py3 import MediaJobOutputCanceledEventData + from ._models_py3 import MediaJobOutputCancelingEventData + from ._models_py3 import MediaJobOutputErroredEventData + from ._models_py3 import MediaJobOutputFinishedEventData + from ._models_py3 import MediaJobOutputProcessingEventData + from ._models_py3 import MediaJobOutputProgressEventData + from ._models_py3 import MediaJobOutputScheduledEventData + from ._models_py3 import MediaJobOutputStateChangeEventData + from ._models_py3 import MediaJobProcessingEventData + from ._models_py3 import MediaJobScheduledEventData + from ._models_py3 import MediaJobStateChangeEventData + from ._models_py3 import MediaLiveEventConnectionRejectedEventData + from ._models_py3 import MediaLiveEventEncoderConnectedEventData + from ._models_py3 import MediaLiveEventEncoderDisconnectedEventData + from ._models_py3 import MediaLiveEventIncomingDataChunkDroppedEventData + from ._models_py3 import MediaLiveEventIncomingStreamReceivedEventData + from ._models_py3 import MediaLiveEventIncomingStreamsOutOfSyncEventData + from ._models_py3 import MediaLiveEventIncomingVideoStreamsOutOfSyncEventData + from ._models_py3 import MediaLiveEventIngestHeartbeatEventData + from ._models_py3 import MediaLiveEventTrackDiscontinuityDetectedEventData + from ._models_py3 import RedisExportRDBCompletedEventData + from ._models_py3 import RedisImportRDBCompletedEventData + from ._models_py3 import RedisPatchingCompletedEventData + from ._models_py3 import RedisScalingCompletedEventData + from ._models_py3 import ResourceActionCancelData + from ._models_py3 import ResourceActionFailureData + from ._models_py3 import ResourceActionSuccessData + from ._models_py3 import ResourceDeleteCancelData + from ._models_py3 import ResourceDeleteFailureData + from ._models_py3 import ResourceDeleteSuccessData + from ._models_py3 import ResourceWriteCancelData + from ._models_py3 import ResourceWriteFailureData + from ._models_py3 import ResourceWriteSuccessData + from ._models_py3 import SMSDeliveryAttemptProperties + from ._models_py3 import SMSDeliveryReportReceivedEventData + from ._models_py3 import SMSEventBaseProperties + from ._models_py3 import SMSReceivedEventData + from ._models_py3 import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from ._models_py3 import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from ._models_py3 import SignalRServiceClientConnectionConnectedEventData + from ._models_py3 import SignalRServiceClientConnectionDisconnectedEventData + from ._models_py3 import StorageBlobCreatedEventData + from ._models_py3 import StorageBlobDeletedEventData + from ._models_py3 import StorageBlobRenamedEventData + from ._models_py3 import StorageDirectoryCreatedEventData + from ._models_py3 import StorageDirectoryDeletedEventData + from ._models_py3 import StorageDirectoryRenamedEventData + from ._models_py3 import StorageLifecyclePolicyActionSummaryDetail + from ._models_py3 import StorageLifecyclePolicyCompletedEventData + from ._models_py3 import SubscriptionDeletedEventData + from ._models_py3 import SubscriptionValidationEventData + from ._models_py3 import SubscriptionValidationResponse + from ._models_py3 import WebAppServicePlanUpdatedEventData + from ._models_py3 import WebAppServicePlanUpdatedEventDataSku + from ._models_py3 import WebAppUpdatedEventData + from ._models_py3 import WebBackupOperationCompletedEventData + from ._models_py3 import WebBackupOperationFailedEventData + from ._models_py3 import WebBackupOperationStartedEventData + from ._models_py3 import WebRestoreOperationCompletedEventData + from ._models_py3 import WebRestoreOperationFailedEventData + from ._models_py3 import WebRestoreOperationStartedEventData + from ._models_py3 import WebSlotSwapCompletedEventData + from ._models_py3 import WebSlotSwapFailedEventData + from ._models_py3 import WebSlotSwapStartedEventData + from ._models_py3 import WebSlotSwapWithPreviewCancelledEventData + from ._models_py3 import WebSlotSwapWithPreviewStartedEventData +except (SyntaxError, ImportError): + from ._models import AppConfigurationKeyValueDeletedEventData # type: ignore + from ._models import AppConfigurationKeyValueModifiedEventData # type: ignore + from ._models import AppEventTypeDetail # type: ignore + from ._models import AppServicePlanEventTypeDetail # type: ignore + from ._models import ChatEventBaseProperties # type: ignore + from ._models import ChatMemberAddedToThreadWithUserEventData # type: ignore + from ._models import ChatMemberRemovedFromThreadForWithUserEventData # type: ignore + from ._models import ChatMessageDeletedEventData # type: ignore + from ._models import ChatMessageEditedEventData # type: ignore + from ._models import ChatMessageEventBaseProperties # type: ignore + from ._models import ChatMessageReceivedEventData # type: ignore + from ._models import ChatThreadCreatedWithUserEventData # type: ignore + from ._models import ChatThreadEventBaseProperties # type: ignore + from ._models import ChatThreadMemberProperties # type: ignore + from ._models import ChatThreadPropertiesUpdatedPerUserEventData # type: ignore + from ._models import ChatThreadWithUserDeletedEventData # type: ignore + from ._models import CloudEvent # type: ignore + from ._models import ContainerRegistryArtifactEventData # type: ignore + from ._models import ContainerRegistryArtifactEventTarget # type: ignore + from ._models import ContainerRegistryChartDeletedEventData # type: ignore + from ._models import ContainerRegistryChartPushedEventData # type: ignore + from ._models import ContainerRegistryEventActor # type: ignore + from ._models import ContainerRegistryEventData # type: ignore + from ._models import ContainerRegistryEventRequest # type: ignore + from ._models import ContainerRegistryEventSource # type: ignore + from ._models import ContainerRegistryEventTarget # type: ignore + from ._models import ContainerRegistryImageDeletedEventData # type: ignore + from ._models import ContainerRegistryImagePushedEventData # type: ignore + from ._models import DeviceConnectionStateEventInfo # type: ignore + from ._models import DeviceConnectionStateEventProperties # type: ignore + from ._models import DeviceLifeCycleEventProperties # type: ignore + from ._models import DeviceTelemetryEventProperties # type: ignore + from ._models import DeviceTwinInfo # type: ignore + from ._models import DeviceTwinInfoProperties # type: ignore + from ._models import DeviceTwinInfoX509Thumbprint # type: ignore + from ._models import DeviceTwinMetadata # type: ignore + from ._models import DeviceTwinProperties # type: ignore + from ._models import EventGridEvent # type: ignore + from ._models import EventHubCaptureFileCreatedEventData # type: ignore + from ._models import IotHubDeviceConnectedEventData # type: ignore + from ._models import IotHubDeviceCreatedEventData # type: ignore + from ._models import IotHubDeviceDeletedEventData # type: ignore + from ._models import IotHubDeviceDisconnectedEventData # type: ignore + from ._models import IotHubDeviceTelemetryEventData # type: ignore + from ._models import KeyVaultCertificateExpiredEventData # type: ignore + from ._models import KeyVaultCertificateNearExpiryEventData # type: ignore + from ._models import KeyVaultCertificateNewVersionCreatedEventData # type: ignore + from ._models import KeyVaultKeyExpiredEventData # type: ignore + from ._models import KeyVaultKeyNearExpiryEventData # type: ignore + from ._models import KeyVaultKeyNewVersionCreatedEventData # type: ignore + from ._models import KeyVaultSecretExpiredEventData # type: ignore + from ._models import KeyVaultSecretNearExpiryEventData # type: ignore + from ._models import KeyVaultSecretNewVersionCreatedEventData # type: ignore + from ._models import MachineLearningServicesDatasetDriftDetectedEventData # type: ignore + from ._models import MachineLearningServicesModelDeployedEventData # type: ignore + from ._models import MachineLearningServicesModelRegisteredEventData # type: ignore + from ._models import MachineLearningServicesRunCompletedEventData # type: ignore + from ._models import MachineLearningServicesRunStatusChangedEventData # type: ignore + from ._models import MapsGeofenceEnteredEventData # type: ignore + from ._models import MapsGeofenceEventProperties # type: ignore + from ._models import MapsGeofenceExitedEventData # type: ignore + from ._models import MapsGeofenceGeometry # type: ignore + from ._models import MapsGeofenceResultEventData # type: ignore + from ._models import MediaJobCanceledEventData # type: ignore + from ._models import MediaJobCancelingEventData # type: ignore + from ._models import MediaJobError # type: ignore + from ._models import MediaJobErrorDetail # type: ignore + from ._models import MediaJobErroredEventData # type: ignore + from ._models import MediaJobFinishedEventData # type: ignore + from ._models import MediaJobOutput # type: ignore + from ._models import MediaJobOutputAsset # type: ignore + from ._models import MediaJobOutputCanceledEventData # type: ignore + from ._models import MediaJobOutputCancelingEventData # type: ignore + from ._models import MediaJobOutputErroredEventData # type: ignore + from ._models import MediaJobOutputFinishedEventData # type: ignore + from ._models import MediaJobOutputProcessingEventData # type: ignore + from ._models import MediaJobOutputProgressEventData # type: ignore + from ._models import MediaJobOutputScheduledEventData # type: ignore + from ._models import MediaJobOutputStateChangeEventData # type: ignore + from ._models import MediaJobProcessingEventData # type: ignore + from ._models import MediaJobScheduledEventData # type: ignore + from ._models import MediaJobStateChangeEventData # type: ignore + from ._models import MediaLiveEventConnectionRejectedEventData # type: ignore + from ._models import MediaLiveEventEncoderConnectedEventData # type: ignore + from ._models import MediaLiveEventEncoderDisconnectedEventData # type: ignore + from ._models import MediaLiveEventIncomingDataChunkDroppedEventData # type: ignore + from ._models import MediaLiveEventIncomingStreamReceivedEventData # type: ignore + from ._models import MediaLiveEventIncomingStreamsOutOfSyncEventData # type: ignore + from ._models import MediaLiveEventIncomingVideoStreamsOutOfSyncEventData # type: ignore + from ._models import MediaLiveEventIngestHeartbeatEventData # type: ignore + from ._models import MediaLiveEventTrackDiscontinuityDetectedEventData # type: ignore + from ._models import RedisExportRDBCompletedEventData # type: ignore + from ._models import RedisImportRDBCompletedEventData # type: ignore + from ._models import RedisPatchingCompletedEventData # type: ignore + from ._models import RedisScalingCompletedEventData # type: ignore + from ._models import ResourceActionCancelData # type: ignore + from ._models import ResourceActionFailureData # type: ignore + from ._models import ResourceActionSuccessData # type: ignore + from ._models import ResourceDeleteCancelData # type: ignore + from ._models import ResourceDeleteFailureData # type: ignore + from ._models import ResourceDeleteSuccessData # type: ignore + from ._models import ResourceWriteCancelData # type: ignore + from ._models import ResourceWriteFailureData # type: ignore + from ._models import ResourceWriteSuccessData # type: ignore + from ._models import SMSDeliveryAttemptProperties # type: ignore + from ._models import SMSDeliveryReportReceivedEventData # type: ignore + from ._models import SMSEventBaseProperties # type: ignore + from ._models import SMSReceivedEventData # type: ignore + from ._models import ServiceBusActiveMessagesAvailableWithNoListenersEventData # type: ignore + from ._models import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData # type: ignore + from ._models import SignalRServiceClientConnectionConnectedEventData # type: ignore + from ._models import SignalRServiceClientConnectionDisconnectedEventData # type: ignore + from ._models import StorageBlobCreatedEventData # type: ignore + from ._models import StorageBlobDeletedEventData # type: ignore + from ._models import StorageBlobRenamedEventData # type: ignore + from ._models import StorageDirectoryCreatedEventData # type: ignore + from ._models import StorageDirectoryDeletedEventData # type: ignore + from ._models import StorageDirectoryRenamedEventData # type: ignore + from ._models import StorageLifecyclePolicyActionSummaryDetail # type: ignore + from ._models import StorageLifecyclePolicyCompletedEventData # type: ignore + from ._models import SubscriptionDeletedEventData # type: ignore + from ._models import SubscriptionValidationEventData # type: ignore + from ._models import SubscriptionValidationResponse # type: ignore + from ._models import WebAppServicePlanUpdatedEventData # type: ignore + from ._models import WebAppServicePlanUpdatedEventDataSku # type: ignore + from ._models import WebAppUpdatedEventData # type: ignore + from ._models import WebBackupOperationCompletedEventData # type: ignore + from ._models import WebBackupOperationFailedEventData # type: ignore + from ._models import WebBackupOperationStartedEventData # type: ignore + from ._models import WebRestoreOperationCompletedEventData # type: ignore + from ._models import WebRestoreOperationFailedEventData # type: ignore + from ._models import WebRestoreOperationStartedEventData # type: ignore + from ._models import WebSlotSwapCompletedEventData # type: ignore + from ._models import WebSlotSwapFailedEventData # type: ignore + from ._models import WebSlotSwapStartedEventData # type: ignore + from ._models import WebSlotSwapWithPreviewCancelledEventData # type: ignore + from ._models import WebSlotSwapWithPreviewStartedEventData # type: ignore + +from ._event_grid_publisher_client_enums import ( + AppAction, + AppServicePlanAction, + AsyncStatus, + MediaJobErrorCategory, + MediaJobErrorCode, + MediaJobRetry, + MediaJobState, + StampKind, +) + +__all__ = [ + 'AppConfigurationKeyValueDeletedEventData', + 'AppConfigurationKeyValueModifiedEventData', + 'AppEventTypeDetail', + 'AppServicePlanEventTypeDetail', + 'ChatEventBaseProperties', + 'ChatMemberAddedToThreadWithUserEventData', + 'ChatMemberRemovedFromThreadForWithUserEventData', + 'ChatMessageDeletedEventData', + 'ChatMessageEditedEventData', + 'ChatMessageEventBaseProperties', + 'ChatMessageReceivedEventData', + 'ChatThreadCreatedWithUserEventData', + 'ChatThreadEventBaseProperties', + 'ChatThreadMemberProperties', + 'ChatThreadPropertiesUpdatedPerUserEventData', + 'ChatThreadWithUserDeletedEventData', + 'CloudEvent', + 'ContainerRegistryArtifactEventData', + 'ContainerRegistryArtifactEventTarget', + 'ContainerRegistryChartDeletedEventData', + 'ContainerRegistryChartPushedEventData', + 'ContainerRegistryEventActor', + 'ContainerRegistryEventData', + 'ContainerRegistryEventRequest', + 'ContainerRegistryEventSource', + 'ContainerRegistryEventTarget', + 'ContainerRegistryImageDeletedEventData', + 'ContainerRegistryImagePushedEventData', + 'DeviceConnectionStateEventInfo', + 'DeviceConnectionStateEventProperties', + 'DeviceLifeCycleEventProperties', + 'DeviceTelemetryEventProperties', + 'DeviceTwinInfo', + 'DeviceTwinInfoProperties', + 'DeviceTwinInfoX509Thumbprint', + 'DeviceTwinMetadata', + 'DeviceTwinProperties', + 'EventGridEvent', + 'EventHubCaptureFileCreatedEventData', + 'IotHubDeviceConnectedEventData', + 'IotHubDeviceCreatedEventData', + 'IotHubDeviceDeletedEventData', + 'IotHubDeviceDisconnectedEventData', + 'IotHubDeviceTelemetryEventData', + 'KeyVaultCertificateExpiredEventData', + 'KeyVaultCertificateNearExpiryEventData', + 'KeyVaultCertificateNewVersionCreatedEventData', + 'KeyVaultKeyExpiredEventData', + 'KeyVaultKeyNearExpiryEventData', + 'KeyVaultKeyNewVersionCreatedEventData', + 'KeyVaultSecretExpiredEventData', + 'KeyVaultSecretNearExpiryEventData', + 'KeyVaultSecretNewVersionCreatedEventData', + 'MachineLearningServicesDatasetDriftDetectedEventData', + 'MachineLearningServicesModelDeployedEventData', + 'MachineLearningServicesModelRegisteredEventData', + 'MachineLearningServicesRunCompletedEventData', + 'MachineLearningServicesRunStatusChangedEventData', + 'MapsGeofenceEnteredEventData', + 'MapsGeofenceEventProperties', + 'MapsGeofenceExitedEventData', + 'MapsGeofenceGeometry', + 'MapsGeofenceResultEventData', + 'MediaJobCanceledEventData', + 'MediaJobCancelingEventData', + 'MediaJobError', + 'MediaJobErrorDetail', + 'MediaJobErroredEventData', + 'MediaJobFinishedEventData', + 'MediaJobOutput', + 'MediaJobOutputAsset', + 'MediaJobOutputCanceledEventData', + 'MediaJobOutputCancelingEventData', + 'MediaJobOutputErroredEventData', + 'MediaJobOutputFinishedEventData', + 'MediaJobOutputProcessingEventData', + 'MediaJobOutputProgressEventData', + 'MediaJobOutputScheduledEventData', + 'MediaJobOutputStateChangeEventData', + 'MediaJobProcessingEventData', + 'MediaJobScheduledEventData', + 'MediaJobStateChangeEventData', + 'MediaLiveEventConnectionRejectedEventData', + 'MediaLiveEventEncoderConnectedEventData', + 'MediaLiveEventEncoderDisconnectedEventData', + 'MediaLiveEventIncomingDataChunkDroppedEventData', + 'MediaLiveEventIncomingStreamReceivedEventData', + 'MediaLiveEventIncomingStreamsOutOfSyncEventData', + 'MediaLiveEventIncomingVideoStreamsOutOfSyncEventData', + 'MediaLiveEventIngestHeartbeatEventData', + 'MediaLiveEventTrackDiscontinuityDetectedEventData', + 'RedisExportRDBCompletedEventData', + 'RedisImportRDBCompletedEventData', + 'RedisPatchingCompletedEventData', + 'RedisScalingCompletedEventData', + 'ResourceActionCancelData', + 'ResourceActionFailureData', + 'ResourceActionSuccessData', + 'ResourceDeleteCancelData', + 'ResourceDeleteFailureData', + 'ResourceDeleteSuccessData', + 'ResourceWriteCancelData', + 'ResourceWriteFailureData', + 'ResourceWriteSuccessData', + 'SMSDeliveryAttemptProperties', + 'SMSDeliveryReportReceivedEventData', + 'SMSEventBaseProperties', + 'SMSReceivedEventData', + 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', + 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', + 'SignalRServiceClientConnectionConnectedEventData', + 'SignalRServiceClientConnectionDisconnectedEventData', + 'StorageBlobCreatedEventData', + 'StorageBlobDeletedEventData', + 'StorageBlobRenamedEventData', + 'StorageDirectoryCreatedEventData', + 'StorageDirectoryDeletedEventData', + 'StorageDirectoryRenamedEventData', + 'StorageLifecyclePolicyActionSummaryDetail', + 'StorageLifecyclePolicyCompletedEventData', + 'SubscriptionDeletedEventData', + 'SubscriptionValidationEventData', + 'SubscriptionValidationResponse', + 'WebAppServicePlanUpdatedEventData', + 'WebAppServicePlanUpdatedEventDataSku', + 'WebAppUpdatedEventData', + 'WebBackupOperationCompletedEventData', + 'WebBackupOperationFailedEventData', + 'WebBackupOperationStartedEventData', + 'WebRestoreOperationCompletedEventData', + 'WebRestoreOperationFailedEventData', + 'WebRestoreOperationStartedEventData', + 'WebSlotSwapCompletedEventData', + 'WebSlotSwapFailedEventData', + 'WebSlotSwapStartedEventData', + 'WebSlotSwapWithPreviewCancelledEventData', + 'WebSlotSwapWithPreviewStartedEventData', + 'AppAction', + 'AppServicePlanAction', + 'AsyncStatus', + 'MediaJobErrorCategory', + 'MediaJobErrorCode', + 'MediaJobRetry', + 'MediaJobState', + 'StampKind', +] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_event_grid_publisher_client_enums.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_event_grid_publisher_client_enums.py new file mode 100644 index 0000000000000..ae2189a9dc2bc --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_event_grid_publisher_client_enums.py @@ -0,0 +1,104 @@ +# 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. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AppAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of action of the operation. + """ + + RESTARTED = "Restarted" #: Web app was restarted. + STOPPED = "Stopped" #: Web app was stopped. + CHANGED_APP_SETTINGS = "ChangedAppSettings" #: There was an operation to change app setting on the web app. + STARTED = "Started" #: The job has started. + COMPLETED = "Completed" #: The job has completed. + FAILED = "Failed" #: The job has failed to complete. + +class AppServicePlanAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of action on the app service plan. + """ + + UPDATED = "Updated" #: App Service plan is being updated. + +class AsyncStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Asynchronous operation status of the operation on the app service plan. + """ + + STARTED = "Started" #: Async operation has started. + COMPLETED = "Completed" #: Async operation has completed. + FAILED = "Failed" #: Async operation failed to complete. + +class MediaJobErrorCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Helps with categorization of errors. + """ + + SERVICE = "Service" #: The error is service related. + DOWNLOAD = "Download" #: The error is download related. + UPLOAD = "Upload" #: The error is upload related. + CONFIGURATION = "Configuration" #: The error is configuration related. + CONTENT = "Content" #: The error is related to data in the input files. + +class MediaJobErrorCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Error code describing the error. + """ + + SERVICE_ERROR = "ServiceError" #: Fatal service error, please contact support. + SERVICE_TRANSIENT_ERROR = "ServiceTransientError" #: Transient error, please retry, if retry is unsuccessful, please contact support. + DOWNLOAD_NOT_ACCESSIBLE = "DownloadNotAccessible" #: While trying to download the input files, the files were not accessible, please check the availability of the source. + DOWNLOAD_TRANSIENT_ERROR = "DownloadTransientError" #: While trying to download the input files, there was an issue during transfer (storage service, network errors), see details and check your source. + UPLOAD_NOT_ACCESSIBLE = "UploadNotAccessible" #: While trying to upload the output files, the destination was not reachable, please check the availability of the destination. + UPLOAD_TRANSIENT_ERROR = "UploadTransientError" #: While trying to upload the output files, there was an issue during transfer (storage service, network errors), see details and check your destination. + CONFIGURATION_UNSUPPORTED = "ConfigurationUnsupported" #: There was a problem with the combination of input files and the configuration settings applied, fix the configuration settings and retry with the same input, or change input to match the configuration. + CONTENT_MALFORMED = "ContentMalformed" #: There was a problem with the input content (for example: zero byte files, or corrupt/non-decodable files), check the input files. + CONTENT_UNSUPPORTED = "ContentUnsupported" #: There was a problem with the format of the input (not valid media file, or an unsupported file/codec), check the validity of the input files. + +class MediaJobRetry(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact + Azure support via Azure Portal. + """ + + DO_NOT_RETRY = "DoNotRetry" #: Issue needs to be investigated and then the job resubmitted with corrections or retried once the underlying issue has been corrected. + MAY_RETRY = "MayRetry" #: Issue may be resolved after waiting for a period of time and resubmitting the same Job. + +class MediaJobState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The previous state of the Job. + """ + + CANCELED = "Canceled" #: The job was canceled. This is a final state for the job. + CANCELING = "Canceling" #: The job is in the process of being canceled. This is a transient state for the job. + ERROR = "Error" #: The job has encountered an error. This is a final state for the job. + FINISHED = "Finished" #: The job is finished. This is a final state for the job. + PROCESSING = "Processing" #: The job is processing. This is a transient state for the job. + QUEUED = "Queued" #: The job is in a queued state, waiting for resources to become available. This is a transient state. + SCHEDULED = "Scheduled" #: The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states. + +class StampKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Kind of environment where app service plan is. + """ + + PUBLIC = "Public" #: App Service Plan is running on a public stamp. + ASE_V1 = "AseV1" #: App Service Plan is running on an App Service Environment V1. + ASE_V2 = "AseV2" #: App Service Plan is running on an App Service Environment V2. diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py new file mode 100644 index 0000000000000..5562dadfd0748 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py @@ -0,0 +1,5528 @@ +# 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 msrest.serialization + + +class AppConfigurationKeyValueDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.AppConfiguration.KeyValueDeleted event. + + :param key: The key used to identify the key-value that was deleted. + :type key: str + :param label: The label, if any, used to identify the key-value that was deleted. + :type label: str + :param etag: The etag representing the key-value that was deleted. + :type etag: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppConfigurationKeyValueDeletedEventData, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.label = kwargs.get('label', None) + self.etag = kwargs.get('etag', None) + + +class AppConfigurationKeyValueModifiedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.AppConfiguration.KeyValueModified event. + + :param key: The key used to identify the key-value that was modified. + :type key: str + :param label: The label, if any, used to identify the key-value that was modified. + :type label: str + :param etag: The etag representing the new state of the key-value. + :type etag: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppConfigurationKeyValueModifiedEventData, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.label = kwargs.get('label', None) + self.etag = kwargs.get('etag', None) + + +class AppEventTypeDetail(msrest.serialization.Model): + """Detail of action on the app. + + :param action: Type of action of the operation. Possible values include: "Restarted", + "Stopped", "ChangedAppSettings", "Started", "Completed", "Failed". + :type action: str or ~event_grid_publisher_client.models.AppAction + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppEventTypeDetail, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + + +class AppServicePlanEventTypeDetail(msrest.serialization.Model): + """Detail of action on the app service plan. + + :param stamp_kind: Kind of environment where app service plan is. Possible values include: + "Public", "AseV1", "AseV2". + :type stamp_kind: str or ~event_grid_publisher_client.models.StampKind + :param action: Type of action on the app service plan. Possible values include: "Updated". + :type action: str or ~event_grid_publisher_client.models.AppServicePlanAction + :param status: Asynchronous operation status of the operation on the app service plan. Possible + values include: "Started", "Completed", "Failed". + :type status: str or ~event_grid_publisher_client.models.AsyncStatus + """ + + _attribute_map = { + 'stamp_kind': {'key': 'stampKind', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServicePlanEventTypeDetail, self).__init__(**kwargs) + self.stamp_kind = kwargs.get('stamp_kind', None) + self.action = kwargs.get('action', None) + self.status = kwargs.get('status', None) + + +class ChatEventBaseProperties(msrest.serialization.Model): + """Schema of common properties of all chat events. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatEventBaseProperties, self).__init__(**kwargs) + self.recipient_id = kwargs.get('recipient_id', None) + self.transaction_id = kwargs.get('transaction_id', None) + self.thread_id = kwargs.get('thread_id', None) + + +class ChatThreadEventBaseProperties(ChatEventBaseProperties): + """Schema of common properties of all chat thread events. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatThreadEventBaseProperties, self).__init__(**kwargs) + self.create_time = kwargs.get('create_time', None) + self.version = kwargs.get('version', None) + + +class ChatMemberAddedToThreadWithUserEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMemberAddedToThreadWithUser event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param time: The time at which the user was added to the thread. + :type time: ~datetime.datetime + :param added_by: The MRI of the user who added the user. + :type added_by: str + :param member: The details of the user who was added. + :type member: ~event_grid_publisher_client.models.ChatThreadMemberProperties + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'added_by': {'key': 'addedBy', 'type': 'str'}, + 'member': {'key': 'member', 'type': 'ChatThreadMemberProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatMemberAddedToThreadWithUserEventData, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + self.added_by = kwargs.get('added_by', None) + self.member = kwargs.get('member', None) + + +class ChatMemberRemovedFromThreadForWithUserEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMemberRemovedFromThreadForWithUser event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param time: The time at which the user was removed to the thread. + :type time: ~datetime.datetime + :param removed_by: The MRI of the user who removed the user. + :type removed_by: str + :param member: The details of the user who was removed. + :type member: ~event_grid_publisher_client.models.ChatThreadMemberProperties + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'removed_by': {'key': 'removedBy', 'type': 'str'}, + 'member': {'key': 'member', 'type': 'ChatThreadMemberProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatMemberRemovedFromThreadForWithUserEventData, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + self.removed_by = kwargs.get('removed_by', None) + self.member = kwargs.get('member', None) + + +class ChatMessageEventBaseProperties(ChatEventBaseProperties): + """Schema of common properties of all chat message events. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param message_id: The chat message id. + :type message_id: str + :param collapse_id: The collapse id is used to identify the message threads. + :type collapse_id: str + :param client_message_id: The messaged Id generated by the sending client. + :type client_message_id: str + :param sender_id: The MRI of the sender. + :type sender_id: str + :param sender_display_name: The display name of the sender. + :type sender_display_name: str + :param compose_time: The original compose time of the message. + :type compose_time: ~datetime.datetime + :param message_type: The type of the message. + :type message_type: str + :param version: The version of the message. + :type version: int + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'collapse_id': {'key': 'collapseId', 'type': 'str'}, + 'client_message_id': {'key': 'clientMessageId', 'type': 'str'}, + 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, + 'compose_time': {'key': 'composeTime', 'type': 'iso-8601'}, + 'message_type': {'key': 'messageType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatMessageEventBaseProperties, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.collapse_id = kwargs.get('collapse_id', None) + self.client_message_id = kwargs.get('client_message_id', None) + self.sender_id = kwargs.get('sender_id', None) + self.sender_display_name = kwargs.get('sender_display_name', None) + self.compose_time = kwargs.get('compose_time', None) + self.message_type = kwargs.get('message_type', None) + self.version = kwargs.get('version', None) + + +class ChatMessageDeletedEventData(ChatMessageEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMessageDeleted event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param message_id: The chat message id. + :type message_id: str + :param collapse_id: The collapse id is used to identify the message threads. + :type collapse_id: str + :param client_message_id: The messaged Id generated by the sending client. + :type client_message_id: str + :param sender_id: The MRI of the sender. + :type sender_id: str + :param sender_display_name: The display name of the sender. + :type sender_display_name: str + :param compose_time: The original compose time of the message. + :type compose_time: ~datetime.datetime + :param message_type: The type of the message. + :type message_type: str + :param version: The version of the message. + :type version: int + :param delete_time: The time at which the message was deleted. + :type delete_time: ~datetime.datetime + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'collapse_id': {'key': 'collapseId', 'type': 'str'}, + 'client_message_id': {'key': 'clientMessageId', 'type': 'str'}, + 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, + 'compose_time': {'key': 'composeTime', 'type': 'iso-8601'}, + 'message_type': {'key': 'messageType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'delete_time': {'key': 'deleteTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatMessageDeletedEventData, self).__init__(**kwargs) + self.delete_time = kwargs.get('delete_time', None) + + +class ChatMessageEditedEventData(ChatMessageEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMessageEdited event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param message_id: The chat message id. + :type message_id: str + :param collapse_id: The collapse id is used to identify the message threads. + :type collapse_id: str + :param client_message_id: The messaged Id generated by the sending client. + :type client_message_id: str + :param sender_id: The MRI of the sender. + :type sender_id: str + :param sender_display_name: The display name of the sender. + :type sender_display_name: str + :param compose_time: The original compose time of the message. + :type compose_time: ~datetime.datetime + :param message_type: The type of the message. + :type message_type: str + :param version: The version of the message. + :type version: int + :param message_body: The body of the chat message. + :type message_body: str + :param edit_time: The time at which the message was edited. + :type edit_time: ~datetime.datetime + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'collapse_id': {'key': 'collapseId', 'type': 'str'}, + 'client_message_id': {'key': 'clientMessageId', 'type': 'str'}, + 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, + 'compose_time': {'key': 'composeTime', 'type': 'iso-8601'}, + 'message_type': {'key': 'messageType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'message_body': {'key': 'messageBody', 'type': 'str'}, + 'edit_time': {'key': 'editTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatMessageEditedEventData, self).__init__(**kwargs) + self.message_body = kwargs.get('message_body', None) + self.edit_time = kwargs.get('edit_time', None) + + +class ChatMessageReceivedEventData(ChatMessageEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMessageReceived event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param message_id: The chat message id. + :type message_id: str + :param collapse_id: The collapse id is used to identify the message threads. + :type collapse_id: str + :param client_message_id: The messaged Id generated by the sending client. + :type client_message_id: str + :param sender_id: The MRI of the sender. + :type sender_id: str + :param sender_display_name: The display name of the sender. + :type sender_display_name: str + :param compose_time: The original compose time of the message. + :type compose_time: ~datetime.datetime + :param message_type: The type of the message. + :type message_type: str + :param version: The version of the message. + :type version: int + :param message_body: The body of the chat message. + :type message_body: str + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'collapse_id': {'key': 'collapseId', 'type': 'str'}, + 'client_message_id': {'key': 'clientMessageId', 'type': 'str'}, + 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, + 'compose_time': {'key': 'composeTime', 'type': 'iso-8601'}, + 'message_type': {'key': 'messageType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'message_body': {'key': 'messageBody', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatMessageReceivedEventData, self).__init__(**kwargs) + self.message_body = kwargs.get('message_body', None) + + +class ChatThreadCreatedWithUserEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatThreadCreatedWithUser event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param created_by: The MRI of the creator of the thread. + :type created_by: str + :param thread_type: The type of the thread. + :type thread_type: str + :param properties: The thread properties. + :type properties: dict[str, object] + :param members: The list of properties of users who are part of the thread. + :type members: list[~event_grid_publisher_client.models.ChatThreadMemberProperties] + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'thread_type': {'key': 'threadType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + 'members': {'key': 'members', 'type': '[ChatThreadMemberProperties]'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatThreadCreatedWithUserEventData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.thread_type = kwargs.get('thread_type', None) + self.properties = kwargs.get('properties', None) + self.members = kwargs.get('members', None) + + +class ChatThreadMemberProperties(msrest.serialization.Model): + """Schema of the chat thread member. + + :param friendly_name: The name of the user. + :type friendly_name: str + :param member_id: The MRI of the user. + :type member_id: str + """ + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'member_id': {'key': 'memberId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatThreadMemberProperties, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.member_id = kwargs.get('member_id', None) + + +class ChatThreadPropertiesUpdatedPerUserEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param edited_by: The MRI of the user who updated the thread properties. + :type edited_by: str + :param edit_time: The time at which the properties of the thread were updated. + :type edit_time: ~datetime.datetime + :param properties: The updated thread properties. + :type properties: dict[str, object] + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'edited_by': {'key': 'editedBy', 'type': 'str'}, + 'edit_time': {'key': 'editTime', 'type': 'iso-8601'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatThreadPropertiesUpdatedPerUserEventData, self).__init__(**kwargs) + self.edited_by = kwargs.get('edited_by', None) + self.edit_time = kwargs.get('edit_time', None) + self.properties = kwargs.get('properties', None) + + +class ChatThreadWithUserDeletedEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatThreadWithUserDeleted event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param deleted_by: The MRI of the user who deleted the thread. + :type deleted_by: str + :param delete_time: The deletion time of the thread. + :type delete_time: ~datetime.datetime + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, + 'delete_time': {'key': 'deleteTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ChatThreadWithUserDeletedEventData, self).__init__(**kwargs) + self.deleted_by = kwargs.get('deleted_by', None) + self.delete_time = kwargs.get('delete_time', None) + + +class CloudEvent(msrest.serialization.Model): + """Properties of an event published to an Event Grid topic using the CloudEvent 1.0 Schema. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are deserialized to this + collection. + :type additional_properties: dict[str, object] + :param id: Required. An identifier for the event. The combination of id and source must be + unique for each distinct event. + :type id: str + :param source: Required. Identifies the context in which an event happened. The combination of + id and source must be unique for each distinct event. + :type source: str + :param data: Event data specific to the event type. + :type data: object + :param data_base64: Event data specific to the event type, encoded as a base64 string. + :type data_base64: bytearray + :param type: Required. Type of event related to the originating occurrence. + :type type: str + :param time: The time (in UTC) the event was generated, in RFC3339 format. + :type time: ~datetime.datetime + :param specversion: Required. The version of the CloudEvents specification which the event + uses. + :type specversion: str + :param dataschema: Identifies the schema that data adheres to. + :type dataschema: str + :param datacontenttype: Content type of data value. + :type datacontenttype: str + :param subject: This describes the subject of the event in the context of the event producer + (identified by source). + :type subject: str + """ + + _validation = { + 'id': {'required': True}, + 'source': {'required': True}, + 'type': {'required': True}, + 'specversion': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'object'}, + 'data_base64': {'key': 'data_base64', 'type': 'bytearray'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'specversion': {'key': 'specversion', 'type': 'str'}, + 'dataschema': {'key': 'dataschema', 'type': 'str'}, + 'datacontenttype': {'key': 'datacontenttype', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudEvent, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.id = kwargs['id'] + self.source = kwargs['source'] + self.data = kwargs.get('data', None) + self.data_base64 = kwargs.get('data_base64', None) + self.type = kwargs['type'] + self.time = kwargs.get('time', None) + self.specversion = kwargs['specversion'] + self.dataschema = kwargs.get('dataschema', None) + self.datacontenttype = kwargs.get('datacontenttype', None) + self.subject = kwargs.get('subject', None) + + +class ContainerRegistryArtifactEventData(msrest.serialization.Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryArtifactEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.timestamp = kwargs.get('timestamp', None) + self.action = kwargs.get('action', None) + self.target = kwargs.get('target', None) + + +class ContainerRegistryArtifactEventTarget(msrest.serialization.Model): + """The target of the event. + + :param media_type: The MIME type of the artifact. + :type media_type: str + :param size: The size in bytes of the artifact. + :type size: long + :param digest: The digest of the artifact. + :type digest: str + :param repository: The repository name of the artifact. + :type repository: str + :param tag: The tag of the artifact. + :type tag: str + :param name: The name of the artifact. + :type name: str + :param version: The version of the artifact. + :type version: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryArtifactEventTarget, self).__init__(**kwargs) + self.media_type = kwargs.get('media_type', None) + self.size = kwargs.get('size', None) + self.digest = kwargs.get('digest', None) + self.repository = kwargs.get('repository', None) + self.tag = kwargs.get('tag', None) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + + +class ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventData): + """Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartDeleted event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryChartDeletedEventData, self).__init__(**kwargs) + + +class ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventData): + """Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartPushed event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryChartPushedEventData, self).__init__(**kwargs) + + +class ContainerRegistryEventActor(msrest.serialization.Model): + """The agent that initiated the event. For most situations, this could be from the authorization context of the request. + + :param name: The subject or username associated with the request context that generated the + event. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryEventActor, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class ContainerRegistryEventData(msrest.serialization.Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~event_grid_publisher_client.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :type actor: ~event_grid_publisher_client.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :type source: ~event_grid_publisher_client.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.timestamp = kwargs.get('timestamp', None) + self.action = kwargs.get('action', None) + self.target = kwargs.get('target', None) + self.request = kwargs.get('request', None) + self.actor = kwargs.get('actor', None) + self.source = kwargs.get('source', None) + + +class ContainerRegistryEventRequest(msrest.serialization.Model): + """The request that generated the event. + + :param id: The ID of the request that initiated the event. + :type id: str + :param addr: The IP or hostname and possibly port of the client connection that initiated the + event. This is the RemoteAddr from the standard http request. + :type addr: str + :param host: The externally accessible hostname of the registry instance, as specified by the + http host header on incoming requests. + :type host: str + :param method: The request method that generated the event. + :type method: str + :param useragent: The user agent header of the request. + :type useragent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'addr': {'key': 'addr', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'useragent': {'key': 'useragent', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryEventRequest, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.addr = kwargs.get('addr', None) + self.host = kwargs.get('host', None) + self.method = kwargs.get('method', None) + self.useragent = kwargs.get('useragent', None) + + +class ContainerRegistryEventSource(msrest.serialization.Model): + """The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. + + :param addr: The IP or hostname and the port of the registry node that generated the event. + Generally, this will be resolved by os.Hostname() along with the running port. + :type addr: str + :param instance_id: The running instance of an application. Changes after each restart. + :type instance_id: str + """ + + _attribute_map = { + 'addr': {'key': 'addr', 'type': 'str'}, + 'instance_id': {'key': 'instanceID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryEventSource, self).__init__(**kwargs) + self.addr = kwargs.get('addr', None) + self.instance_id = kwargs.get('instance_id', None) + + +class ContainerRegistryEventTarget(msrest.serialization.Model): + """The target of the event. + + :param media_type: The MIME type of the referenced object. + :type media_type: str + :param size: The number of bytes of the content. Same as Length field. + :type size: long + :param digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. + :type digest: str + :param length: The number of bytes of the content. Same as Size field. + :type length: long + :param repository: The repository name. + :type repository: str + :param url: The direct URL to the content. + :type url: str + :param tag: The tag name. + :type tag: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'length': {'key': 'length', 'type': 'long'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryEventTarget, self).__init__(**kwargs) + self.media_type = kwargs.get('media_type', None) + self.size = kwargs.get('size', None) + self.digest = kwargs.get('digest', None) + self.length = kwargs.get('length', None) + self.repository = kwargs.get('repository', None) + self.url = kwargs.get('url', None) + self.tag = kwargs.get('tag', None) + + +class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): + """Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImageDeleted event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~event_grid_publisher_client.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :type actor: ~event_grid_publisher_client.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :type source: ~event_grid_publisher_client.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryImageDeletedEventData, self).__init__(**kwargs) + + +class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): + """Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImagePushed event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~event_grid_publisher_client.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :type actor: ~event_grid_publisher_client.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :type source: ~event_grid_publisher_client.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerRegistryImagePushedEventData, self).__init__(**kwargs) + + +class DeviceConnectionStateEventInfo(msrest.serialization.Model): + """Information about the device connection state event. + + :param sequence_number: Sequence number is string representation of a hexadecimal number. + string compare can be used to identify the larger number because both in ASCII and HEX numbers + come after alphabets. If you are converting the string to hex, then the number is a 256 bit + number. + :type sequence_number: str + """ + + _attribute_map = { + 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) + self.sequence_number = kwargs.get('sequence_number', None) + + +class DeviceConnectionStateEventProperties(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a device connection state event (DeviceConnected, DeviceDisconnected). + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device connection state event. + :type device_connection_state_event_info: + ~event_grid_publisher_client.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.module_id = kwargs.get('module_id', None) + self.hub_name = kwargs.get('hub_name', None) + self.device_connection_state_event_info = kwargs.get('device_connection_state_event_info', None) + + +class DeviceLifeCycleEventProperties(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted). + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud representation of + application device metadata. + :type twin: ~event_grid_publisher_client.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.hub_name = kwargs.get('hub_name', None) + self.twin = kwargs.get('twin', None) + + +class DeviceTelemetryEventProperties(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry). + + :param body: The content of the message from the device. + :type body: object + :param properties: Application properties are user-defined strings that can be added to the + message. These fields are optional. + :type properties: dict[str, str] + :param system_properties: System properties help identify contents and source of the messages. + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceTelemetryEventProperties, self).__init__(**kwargs) + self.body = kwargs.get('body', None) + self.properties = kwargs.get('properties', None) + self.system_properties = kwargs.get('system_properties', None) + + +class DeviceTwinInfo(msrest.serialization.Model): + """Information about the device twin, which is the cloud representation of application device metadata. + + :param authentication_type: Authentication type used for this device: either SAS, SelfSigned, + or CertificateAuthority. + :type authentication_type: str + :param cloud_to_device_message_count: Count of cloud to device messages sent to this device. + :type cloud_to_device_message_count: float + :param connection_state: Whether the device is connected or disconnected. + :type connection_state: str + :param device_id: The unique identifier of the device twin. + :type device_id: str + :param etag: A piece of information that describes the content of the device twin. Each etag is + guaranteed to be unique per device twin. + :type etag: str + :param last_activity_time: The ISO8601 timestamp of the last activity. + :type last_activity_time: str + :param properties: Properties JSON element. + :type properties: ~event_grid_publisher_client.models.DeviceTwinInfoProperties + :param status: Whether the device twin is enabled or disabled. + :type status: str + :param status_update_time: The ISO8601 timestamp of the last device twin status update. + :type status_update_time: str + :param version: An integer that is incremented by one each time the device twin is updated. + :type version: float + :param x509_thumbprint: The thumbprint is a unique value for the x509 certificate, commonly + used to find a particular certificate in a certificate store. The thumbprint is dynamically + generated using the SHA1 algorithm, and does not physically exist in the certificate. + :type x509_thumbprint: ~event_grid_publisher_client.models.DeviceTwinInfoX509Thumbprint + """ + + _attribute_map = { + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'cloud_to_device_message_count': {'key': 'cloudToDeviceMessageCount', 'type': 'float'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'last_activity_time': {'key': 'lastActivityTime', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeviceTwinInfoProperties'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_update_time': {'key': 'statusUpdateTime', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'float'}, + 'x509_thumbprint': {'key': 'x509Thumbprint', 'type': 'DeviceTwinInfoX509Thumbprint'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceTwinInfo, self).__init__(**kwargs) + self.authentication_type = kwargs.get('authentication_type', None) + self.cloud_to_device_message_count = kwargs.get('cloud_to_device_message_count', None) + self.connection_state = kwargs.get('connection_state', None) + self.device_id = kwargs.get('device_id', None) + self.etag = kwargs.get('etag', None) + self.last_activity_time = kwargs.get('last_activity_time', None) + self.properties = kwargs.get('properties', None) + self.status = kwargs.get('status', None) + self.status_update_time = kwargs.get('status_update_time', None) + self.version = kwargs.get('version', None) + self.x509_thumbprint = kwargs.get('x509_thumbprint', None) + + +class DeviceTwinInfoProperties(msrest.serialization.Model): + """Properties JSON element. + + :param desired: A portion of the properties that can be written only by the application back- + end, and read by the device. + :type desired: ~event_grid_publisher_client.models.DeviceTwinProperties + :param reported: A portion of the properties that can be written only by the device, and read + by the application back-end. + :type reported: ~event_grid_publisher_client.models.DeviceTwinProperties + """ + + _attribute_map = { + 'desired': {'key': 'desired', 'type': 'DeviceTwinProperties'}, + 'reported': {'key': 'reported', 'type': 'DeviceTwinProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceTwinInfoProperties, self).__init__(**kwargs) + self.desired = kwargs.get('desired', None) + self.reported = kwargs.get('reported', None) + + +class DeviceTwinInfoX509Thumbprint(msrest.serialization.Model): + """The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist in the certificate. + + :param primary_thumbprint: Primary thumbprint for the x509 certificate. + :type primary_thumbprint: str + :param secondary_thumbprint: Secondary thumbprint for the x509 certificate. + :type secondary_thumbprint: str + """ + + _attribute_map = { + 'primary_thumbprint': {'key': 'primaryThumbprint', 'type': 'str'}, + 'secondary_thumbprint': {'key': 'secondaryThumbprint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceTwinInfoX509Thumbprint, self).__init__(**kwargs) + self.primary_thumbprint = kwargs.get('primary_thumbprint', None) + self.secondary_thumbprint = kwargs.get('secondary_thumbprint', None) + + +class DeviceTwinMetadata(msrest.serialization.Model): + """Metadata information for the properties JSON document. + + :param last_updated: The ISO8601 timestamp of the last time the properties were updated. + :type last_updated: str + """ + + _attribute_map = { + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceTwinMetadata, self).__init__(**kwargs) + self.last_updated = kwargs.get('last_updated', None) + + +class DeviceTwinProperties(msrest.serialization.Model): + """A portion of the properties that can be written only by the application back-end, and read by the device. + + :param metadata: Metadata information for the properties JSON document. + :type metadata: ~event_grid_publisher_client.models.DeviceTwinMetadata + :param version: Version of device twin properties. + :type version: float + """ + + _attribute_map = { + 'metadata': {'key': 'metadata', 'type': 'DeviceTwinMetadata'}, + 'version': {'key': 'version', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceTwinProperties, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.version = kwargs.get('version', None) + + +class EventGridEvent(msrest.serialization.Model): + """Properties of an event published to an Event Grid topic using the EventGrid Schema. + + 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 id: Required. An unique identifier for the event. + :type id: str + :param topic: The resource path of the event source. + :type topic: str + :param subject: Required. A resource path relative to the topic path. + :type subject: str + :param data: Required. Event data specific to the event type. + :type data: object + :param event_type: Required. The type of the event that occurred. + :type event_type: str + :param event_time: Required. The time (in UTC) the event was generated. + :type event_time: ~datetime.datetime + :ivar metadata_version: The schema version of the event metadata. + :vartype metadata_version: str + :param data_version: Required. The schema version of the data object. + :type data_version: str + """ + + _validation = { + 'id': {'required': True}, + 'subject': {'required': True}, + 'data': {'required': True}, + 'event_type': {'required': True}, + 'event_time': {'required': True}, + 'metadata_version': {'readonly': True}, + 'data_version': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'object'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, + 'data_version': {'key': 'dataVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EventGridEvent, self).__init__(**kwargs) + self.id = kwargs['id'] + self.topic = kwargs.get('topic', None) + self.subject = kwargs['subject'] + self.data = kwargs['data'] + self.event_type = kwargs['event_type'] + self.event_time = kwargs['event_time'] + self.metadata_version = None + self.data_version = kwargs['data_version'] + + +class EventHubCaptureFileCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.EventHub.CaptureFileCreated event. + + :param fileurl: The path to the capture file. + :type fileurl: str + :param file_type: The file type of the capture file. + :type file_type: str + :param partition_id: The shard ID. + :type partition_id: str + :param size_in_bytes: The file size. + :type size_in_bytes: int + :param event_count: The number of events in the file. + :type event_count: int + :param first_sequence_number: The smallest sequence number from the queue. + :type first_sequence_number: int + :param last_sequence_number: The last sequence number from the queue. + :type last_sequence_number: int + :param first_enqueue_time: The first time from the queue. + :type first_enqueue_time: ~datetime.datetime + :param last_enqueue_time: The last time from the queue. + :type last_enqueue_time: ~datetime.datetime + """ + + _attribute_map = { + 'fileurl': {'key': 'fileurl', 'type': 'str'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'size_in_bytes': {'key': 'sizeInBytes', 'type': 'int'}, + 'event_count': {'key': 'eventCount', 'type': 'int'}, + 'first_sequence_number': {'key': 'firstSequenceNumber', 'type': 'int'}, + 'last_sequence_number': {'key': 'lastSequenceNumber', 'type': 'int'}, + 'first_enqueue_time': {'key': 'firstEnqueueTime', 'type': 'iso-8601'}, + 'last_enqueue_time': {'key': 'lastEnqueueTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(EventHubCaptureFileCreatedEventData, self).__init__(**kwargs) + self.fileurl = kwargs.get('fileurl', None) + self.file_type = kwargs.get('file_type', None) + self.partition_id = kwargs.get('partition_id', None) + self.size_in_bytes = kwargs.get('size_in_bytes', None) + self.event_count = kwargs.get('event_count', None) + self.first_sequence_number = kwargs.get('first_sequence_number', None) + self.last_sequence_number = kwargs.get('last_sequence_number', None) + self.first_enqueue_time = kwargs.get('first_enqueue_time', None) + self.last_enqueue_time = kwargs.get('last_enqueue_time', None) + + +class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceConnected event. + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device connection state event. + :type device_connection_state_event_info: + ~event_grid_publisher_client.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(IotHubDeviceConnectedEventData, self).__init__(**kwargs) + + +class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): + """Event data for Microsoft.Devices.DeviceCreated event. + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud representation of + application device metadata. + :type twin: ~event_grid_publisher_client.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(IotHubDeviceCreatedEventData, self).__init__(**kwargs) + + +class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): + """Event data for Microsoft.Devices.DeviceDeleted event. + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud representation of + application device metadata. + :type twin: ~event_grid_publisher_client.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(IotHubDeviceDeletedEventData, self).__init__(**kwargs) + + +class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceDisconnected event. + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device connection state event. + :type device_connection_state_event_info: + ~event_grid_publisher_client.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(IotHubDeviceDisconnectedEventData, self).__init__(**kwargs) + + +class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): + """Event data for Microsoft.Devices.DeviceTelemetry event. + + :param body: The content of the message from the device. + :type body: object + :param properties: Application properties are user-defined strings that can be added to the + message. These fields are optional. + :type properties: dict[str, str] + :param system_properties: System properties help identify contents and source of the messages. + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(IotHubDeviceTelemetryEventData, self).__init__(**kwargs) + + +class KeyVaultCertificateExpiredEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an CertificateExpired event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultCertificateExpiredEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultCertificateNearExpiryEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an CertificateNearExpiry event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultCertificateNearExpiryEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultCertificateNewVersionCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an CertificateNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultCertificateNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultKeyExpiredEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an KeyExpired event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultKeyExpiredEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultKeyNearExpiryEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an KeyNearExpiry event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultKeyNearExpiryEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultKeyNewVersionCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an KeyNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultKeyNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultSecretExpiredEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an SecretExpired event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultSecretExpiredEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultSecretNearExpiryEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an SecretNearExpiry event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultSecretNearExpiryEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultSecretNewVersionCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an SecretNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultSecretNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class MachineLearningServicesDatasetDriftDetectedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.DatasetDriftDetected event. + + :param data_drift_id: The ID of the data drift monitor that triggered the event. + :type data_drift_id: str + :param data_drift_name: The name of the data drift monitor that triggered the event. + :type data_drift_name: str + :param run_id: The ID of the Run that detected data drift. + :type run_id: str + :param base_dataset_id: The ID of the base Dataset used to detect drift. + :type base_dataset_id: str + :param target_dataset_id: The ID of the target Dataset used to detect drift. + :type target_dataset_id: str + :param drift_coefficient: The coefficient result that triggered the event. + :type drift_coefficient: float + :param start_time: The start time of the target dataset time series that resulted in drift + detection. + :type start_time: ~datetime.datetime + :param end_time: The end time of the target dataset time series that resulted in drift + detection. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'data_drift_id': {'key': 'dataDriftId', 'type': 'str'}, + 'data_drift_name': {'key': 'dataDriftName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'base_dataset_id': {'key': 'baseDatasetId', 'type': 'str'}, + 'target_dataset_id': {'key': 'targetDatasetId', 'type': 'str'}, + 'drift_coefficient': {'key': 'driftCoefficient', 'type': 'float'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MachineLearningServicesDatasetDriftDetectedEventData, self).__init__(**kwargs) + self.data_drift_id = kwargs.get('data_drift_id', None) + self.data_drift_name = kwargs.get('data_drift_name', None) + self.run_id = kwargs.get('run_id', None) + self.base_dataset_id = kwargs.get('base_dataset_id', None) + self.target_dataset_id = kwargs.get('target_dataset_id', None) + self.drift_coefficient = kwargs.get('drift_coefficient', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class MachineLearningServicesModelDeployedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.ModelDeployed event. + + :param service_name: The name of the deployed service. + :type service_name: str + :param service_compute_type: The compute type (e.g. ACI, AKS) of the deployed service. + :type service_compute_type: str + :param model_ids: A common separated list of model IDs. The IDs of the models deployed in the + service. + :type model_ids: str + :param service_tags: The tags of the deployed service. + :type service_tags: object + :param service_properties: The properties of the deployed service. + :type service_properties: object + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'service_compute_type': {'key': 'serviceComputeType', 'type': 'str'}, + 'model_ids': {'key': 'modelIds', 'type': 'str'}, + 'service_tags': {'key': 'serviceTags', 'type': 'object'}, + 'service_properties': {'key': 'serviceProperties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(MachineLearningServicesModelDeployedEventData, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.service_compute_type = kwargs.get('service_compute_type', None) + self.model_ids = kwargs.get('model_ids', None) + self.service_tags = kwargs.get('service_tags', None) + self.service_properties = kwargs.get('service_properties', None) + + +class MachineLearningServicesModelRegisteredEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.ModelRegistered event. + + :param model_name: The name of the model that was registered. + :type model_name: str + :param model_version: The version of the model that was registered. + :type model_version: str + :param model_tags: The tags of the model that was registered. + :type model_tags: object + :param model_properties: The properties of the model that was registered. + :type model_properties: object + """ + + _attribute_map = { + 'model_name': {'key': 'modelName', 'type': 'str'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + 'model_tags': {'key': 'modelTags', 'type': 'object'}, + 'model_properties': {'key': 'modelProperties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(MachineLearningServicesModelRegisteredEventData, self).__init__(**kwargs) + self.model_name = kwargs.get('model_name', None) + self.model_version = kwargs.get('model_version', None) + self.model_tags = kwargs.get('model_tags', None) + self.model_properties = kwargs.get('model_properties', None) + + +class MachineLearningServicesRunCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.RunCompleted event. + + :param experiment_id: The ID of the experiment that the run belongs to. + :type experiment_id: str + :param experiment_name: The name of the experiment that the run belongs to. + :type experiment_name: str + :param run_id: The ID of the Run that was completed. + :type run_id: str + :param run_type: The Run Type of the completed Run. + :type run_type: str + :param run_tags: The tags of the completed Run. + :type run_tags: object + :param run_properties: The properties of the completed Run. + :type run_properties: object + """ + + _attribute_map = { + 'experiment_id': {'key': 'experimentId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_type': {'key': 'runType', 'type': 'str'}, + 'run_tags': {'key': 'runTags', 'type': 'object'}, + 'run_properties': {'key': 'runProperties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(MachineLearningServicesRunCompletedEventData, self).__init__(**kwargs) + self.experiment_id = kwargs.get('experiment_id', None) + self.experiment_name = kwargs.get('experiment_name', None) + self.run_id = kwargs.get('run_id', None) + self.run_type = kwargs.get('run_type', None) + self.run_tags = kwargs.get('run_tags', None) + self.run_properties = kwargs.get('run_properties', None) + + +class MachineLearningServicesRunStatusChangedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.RunStatusChanged event. + + :param experiment_id: The ID of the experiment that the Machine Learning Run belongs to. + :type experiment_id: str + :param experiment_name: The name of the experiment that the Machine Learning Run belongs to. + :type experiment_name: str + :param run_id: The ID of the Machine Learning Run. + :type run_id: str + :param run_type: The Run Type of the Machine Learning Run. + :type run_type: str + :param run_tags: The tags of the Machine Learning Run. + :type run_tags: object + :param run_properties: The properties of the Machine Learning Run. + :type run_properties: object + :param run_status: The status of the Machine Learning Run. + :type run_status: str + """ + + _attribute_map = { + 'experiment_id': {'key': 'experimentId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_type': {'key': 'runType', 'type': 'str'}, + 'run_tags': {'key': 'runTags', 'type': 'object'}, + 'run_properties': {'key': 'runProperties', 'type': 'object'}, + 'run_status': {'key': 'runStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MachineLearningServicesRunStatusChangedEventData, self).__init__(**kwargs) + self.experiment_id = kwargs.get('experiment_id', None) + self.experiment_name = kwargs.get('experiment_name', None) + self.run_id = kwargs.get('run_id', None) + self.run_type = kwargs.get('run_type', None) + self.run_tags = kwargs.get('run_tags', None) + self.run_properties = kwargs.get('run_properties', None) + self.run_status = kwargs.get('run_status', None) + + +class MapsGeofenceEventProperties(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Geofence event (GeofenceEntered, GeofenceExited, GeofenceResult). + + :param expired_geofence_geometry_id: Lists of the geometry ID of the geofence which is expired + relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain the coordinate position + or have an overlap with the searchBuffer around the fence. + :type geometries: list[~event_grid_publisher_client.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of the geofence which is + in invalid period relative to the user time in the request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the Azure Maps event + subscriber, false if no event is published to the Azure Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MapsGeofenceEventProperties, self).__init__(**kwargs) + self.expired_geofence_geometry_id = kwargs.get('expired_geofence_geometry_id', None) + self.geometries = kwargs.get('geometries', None) + self.invalid_period_geofence_geometry_id = kwargs.get('invalid_period_geofence_geometry_id', None) + self.is_event_published = kwargs.get('is_event_published', None) + + +class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceEntered event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the geofence which is expired + relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain the coordinate position + or have an overlap with the searchBuffer around the fence. + :type geometries: list[~event_grid_publisher_client.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of the geofence which is + in invalid period relative to the user time in the request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the Azure Maps event + subscriber, false if no event is published to the Azure Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MapsGeofenceEnteredEventData, self).__init__(**kwargs) + + +class MapsGeofenceExitedEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceExited event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the geofence which is expired + relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain the coordinate position + or have an overlap with the searchBuffer around the fence. + :type geometries: list[~event_grid_publisher_client.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of the geofence which is + in invalid period relative to the user time in the request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the Azure Maps event + subscriber, false if no event is published to the Azure Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MapsGeofenceExitedEventData, self).__init__(**kwargs) + + +class MapsGeofenceGeometry(msrest.serialization.Model): + """The geofence geometry. + + :param device_id: ID of the device. + :type device_id: str + :param distance: Distance from the coordinate to the closest border of the geofence. Positive + means the coordinate is outside of the geofence. If the coordinate is outside of the geofence, + but more than the value of searchBuffer away from the closest geofence border, then the value + is 999. Negative means the coordinate is inside of the geofence. If the coordinate is inside + the polygon, but more than the value of searchBuffer away from the closest geofencing + border,then the value is -999. A value of 999 means that there is great confidence the + coordinate is well outside the geofence. A value of -999 means that there is great confidence + the coordinate is well within the geofence. + :type distance: float + :param geometry_id: The unique ID for the geofence geometry. + :type geometry_id: str + :param nearest_lat: Latitude of the nearest point of the geometry. + :type nearest_lat: float + :param nearest_lon: Longitude of the nearest point of the geometry. + :type nearest_lon: float + :param ud_id: The unique id returned from user upload service when uploading a geofence. Will + not be included in geofencing post API. + :type ud_id: str + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'distance': {'key': 'distance', 'type': 'float'}, + 'geometry_id': {'key': 'geometryId', 'type': 'str'}, + 'nearest_lat': {'key': 'nearestLat', 'type': 'float'}, + 'nearest_lon': {'key': 'nearestLon', 'type': 'float'}, + 'ud_id': {'key': 'udId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MapsGeofenceGeometry, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.distance = kwargs.get('distance', None) + self.geometry_id = kwargs.get('geometry_id', None) + self.nearest_lat = kwargs.get('nearest_lat', None) + self.nearest_lon = kwargs.get('nearest_lon', None) + self.ud_id = kwargs.get('ud_id', None) + + +class MapsGeofenceResultEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceResult event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the geofence which is expired + relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain the coordinate position + or have an overlap with the searchBuffer around the fence. + :type geometries: list[~event_grid_publisher_client.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of the geofence which is + in invalid period relative to the user time in the request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the Azure Maps event + subscriber, false if no event is published to the Azure Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MapsGeofenceResultEventData, self).__init__(**kwargs) + + +class MediaJobStateChangeEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None + self.correlation_data = kwargs.get('correlation_data', None) + + +class MediaJobCanceledEventData(MediaJobStateChangeEventData): + """Job canceled event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~event_grid_publisher_client.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobCanceledEventData, self).__init__(**kwargs) + self.outputs = kwargs.get('outputs', None) + + +class MediaJobCancelingEventData(MediaJobStateChangeEventData): + """Job canceling event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobCancelingEventData, self).__init__(**kwargs) + + +class MediaJobError(msrest.serialization.Model): + """Details of JobOutput errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code describing the error. Possible values include: "ServiceError", + "ServiceTransientError", "DownloadNotAccessible", "DownloadTransientError", + "UploadNotAccessible", "UploadTransientError", "ConfigurationUnsupported", "ContentMalformed", + "ContentUnsupported". + :vartype code: str or ~event_grid_publisher_client.models.MediaJobErrorCode + :ivar message: A human-readable language-dependent representation of the error. + :vartype message: str + :ivar category: Helps with categorization of errors. Possible values include: "Service", + "Download", "Upload", "Configuration", "Content". + :vartype category: str or ~event_grid_publisher_client.models.MediaJobErrorCategory + :ivar retry: Indicates that it may be possible to retry the Job. If retry is unsuccessful, + please contact Azure support via Azure Portal. Possible values include: "DoNotRetry", + "MayRetry". + :vartype retry: str or ~event_grid_publisher_client.models.MediaJobRetry + :ivar details: An array of details about specific errors that led to this reported error. + :vartype details: list[~event_grid_publisher_client.models.MediaJobErrorDetail] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'category': {'readonly': True}, + 'retry': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'retry': {'key': 'retry', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[MediaJobErrorDetail]'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobError, self).__init__(**kwargs) + self.code = None + self.message = None + self.category = None + self.retry = None + self.details = None + + +class MediaJobErrorDetail(msrest.serialization.Model): + """Details of JobOutput errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Code describing the error detail. + :vartype code: str + :ivar message: A human-readable representation of the error. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + + +class MediaJobErroredEventData(MediaJobStateChangeEventData): + """Job error state event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~event_grid_publisher_client.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobErroredEventData, self).__init__(**kwargs) + self.outputs = kwargs.get('outputs', None) + + +class MediaJobFinishedEventData(MediaJobStateChangeEventData): + """Job finished event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~event_grid_publisher_client.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobFinishedEventData, self).__init__(**kwargs) + self.outputs = kwargs.get('outputs', None) + + +class MediaJobOutput(msrest.serialization.Model): + """The event data for a Job output. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaJobOutputAsset. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: The discriminator for derived types.Constant filled by server. + :type odata_type: str + :param error: Gets the Job output error. + :type error: ~event_grid_publisher_client.models.MediaJobError + :param label: Gets the Job output label. + :type label: str + :param progress: Required. Gets the Job output progress. + :type progress: long + :param state: Required. Gets the Job output state. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :type state: str or ~event_grid_publisher_client.models.MediaJobState + """ + + _validation = { + 'progress': {'required': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'MediaJobError'}, + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'#Microsoft.Media.JobOutputAsset': 'MediaJobOutputAsset'} + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutput, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.error = kwargs.get('error', None) + self.label = kwargs.get('label', None) + self.progress = kwargs['progress'] + self.state = kwargs['state'] + + +class MediaJobOutputAsset(MediaJobOutput): + """The event data for a Job output asset. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: The discriminator for derived types.Constant filled by server. + :type odata_type: str + :param error: Gets the Job output error. + :type error: ~event_grid_publisher_client.models.MediaJobError + :param label: Gets the Job output label. + :type label: str + :param progress: Required. Gets the Job output progress. + :type progress: long + :param state: Required. Gets the Job output state. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :type state: str or ~event_grid_publisher_client.models.MediaJobState + :param asset_name: Gets the Job output asset name. + :type asset_name: str + """ + + _validation = { + 'progress': {'required': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'MediaJobError'}, + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'asset_name': {'key': 'assetName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputAsset, self).__init__(**kwargs) + self.odata_type = '#Microsoft.Media.JobOutputAsset' # type: str + self.asset_name = kwargs.get('asset_name', None) + + +class MediaJobOutputStateChangeEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobOutputStateChange event. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.output = kwargs.get('output', None) + self.job_correlation_data = kwargs.get('job_correlation_data', None) + + +class MediaJobOutputCanceledEventData(MediaJobOutputStateChangeEventData): + """Job output canceled event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputCanceledEventData, self).__init__(**kwargs) + + +class MediaJobOutputCancelingEventData(MediaJobOutputStateChangeEventData): + """Job output canceling event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputCancelingEventData, self).__init__(**kwargs) + + +class MediaJobOutputErroredEventData(MediaJobOutputStateChangeEventData): + """Job output error event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputErroredEventData, self).__init__(**kwargs) + + +class MediaJobOutputFinishedEventData(MediaJobOutputStateChangeEventData): + """Job output finished event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputFinishedEventData, self).__init__(**kwargs) + + +class MediaJobOutputProcessingEventData(MediaJobOutputStateChangeEventData): + """Job output processing event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputProcessingEventData, self).__init__(**kwargs) + + +class MediaJobOutputProgressEventData(msrest.serialization.Model): + """Job Output Progress Event Data. + + :param label: Gets the Job output label. + :type label: str + :param progress: Gets the Job output progress. + :type progress: long + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _attribute_map = { + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputProgressEventData, self).__init__(**kwargs) + self.label = kwargs.get('label', None) + self.progress = kwargs.get('progress', None) + self.job_correlation_data = kwargs.get('job_correlation_data', None) + + +class MediaJobOutputScheduledEventData(MediaJobOutputStateChangeEventData): + """Job output scheduled event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobOutputScheduledEventData, self).__init__(**kwargs) + + +class MediaJobProcessingEventData(MediaJobStateChangeEventData): + """Job processing event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobProcessingEventData, self).__init__(**kwargs) + + +class MediaJobScheduledEventData(MediaJobStateChangeEventData): + """Job scheduled event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobScheduledEventData, self).__init__(**kwargs) + + +class MediaLiveEventConnectionRejectedEventData(msrest.serialization.Model): + """Encoder connection rejected event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar result_code: Gets the result code. + :vartype result_code: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'result_code': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventConnectionRejectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + self.result_code = None + + +class MediaLiveEventEncoderConnectedEventData(msrest.serialization.Model): + """Encoder connect event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventEncoderConnectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + + +class MediaLiveEventEncoderDisconnectedEventData(msrest.serialization.Model): + """Encoder disconnected event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar result_code: Gets the result code. + :vartype result_code: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'result_code': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventEncoderDisconnectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + self.result_code = None + + +class MediaLiveEventIncomingDataChunkDroppedEventData(msrest.serialization.Model): + """Ingest fragment dropped event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar timestamp: Gets the timestamp of the data chunk dropped. + :vartype timestamp: str + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar timescale: Gets the timescale of the Timestamp. + :vartype timescale: str + :ivar result_code: Gets the result code for fragment drop operation. + :vartype result_code: str + :ivar track_name: Gets the name of the track for which fragment is dropped. + :vartype track_name: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'track_type': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'timescale': {'readonly': True}, + 'result_code': {'readonly': True}, + 'track_name': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIncomingDataChunkDroppedEventData, self).__init__(**kwargs) + self.timestamp = None + self.track_type = None + self.bitrate = None + self.timescale = None + self.result_code = None + self.track_name = None + + +class MediaLiveEventIncomingStreamReceivedEventData(msrest.serialization.Model): + """Encoder connect event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar timestamp: Gets the first timestamp of the data chunk received. + :vartype timestamp: str + :ivar duration: Gets the duration of the first data chunk. + :vartype duration: str + :ivar timescale: Gets the timescale in which timestamp is represented. + :vartype timescale: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'duration': {'readonly': True}, + 'timescale': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIncomingStreamReceivedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.track_type = None + self.track_name = None + self.bitrate = None + self.encoder_ip = None + self.encoder_port = None + self.timestamp = None + self.duration = None + self.timescale = None + + +class MediaLiveEventIncomingStreamsOutOfSyncEventData(msrest.serialization.Model): + """Incoming streams out of sync event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar min_last_timestamp: Gets the minimum last timestamp received. + :vartype min_last_timestamp: str + :ivar type_of_stream_with_min_last_timestamp: Gets the type of stream with minimum last + timestamp. + :vartype type_of_stream_with_min_last_timestamp: str + :ivar max_last_timestamp: Gets the maximum timestamp among all the tracks (audio or video). + :vartype max_last_timestamp: str + :ivar type_of_stream_with_max_last_timestamp: Gets the type of stream with maximum last + timestamp. + :vartype type_of_stream_with_max_last_timestamp: str + :ivar timescale_of_min_last_timestamp: Gets the timescale in which "MinLastTimestamp" is + represented. + :vartype timescale_of_min_last_timestamp: str + :ivar timescale_of_max_last_timestamp: Gets the timescale in which "MaxLastTimestamp" is + represented. + :vartype timescale_of_max_last_timestamp: str + """ + + _validation = { + 'min_last_timestamp': {'readonly': True}, + 'type_of_stream_with_min_last_timestamp': {'readonly': True}, + 'max_last_timestamp': {'readonly': True}, + 'type_of_stream_with_max_last_timestamp': {'readonly': True}, + 'timescale_of_min_last_timestamp': {'readonly': True}, + 'timescale_of_max_last_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'min_last_timestamp': {'key': 'minLastTimestamp', 'type': 'str'}, + 'type_of_stream_with_min_last_timestamp': {'key': 'typeOfStreamWithMinLastTimestamp', 'type': 'str'}, + 'max_last_timestamp': {'key': 'maxLastTimestamp', 'type': 'str'}, + 'type_of_stream_with_max_last_timestamp': {'key': 'typeOfStreamWithMaxLastTimestamp', 'type': 'str'}, + 'timescale_of_min_last_timestamp': {'key': 'timescaleOfMinLastTimestamp', 'type': 'str'}, + 'timescale_of_max_last_timestamp': {'key': 'timescaleOfMaxLastTimestamp', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIncomingStreamsOutOfSyncEventData, self).__init__(**kwargs) + self.min_last_timestamp = None + self.type_of_stream_with_min_last_timestamp = None + self.max_last_timestamp = None + self.type_of_stream_with_max_last_timestamp = None + self.timescale_of_min_last_timestamp = None + self.timescale_of_max_last_timestamp = None + + +class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(msrest.serialization.Model): + """Incoming video stream out of synch event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar first_timestamp: Gets the first timestamp received for one of the quality levels. + :vartype first_timestamp: str + :ivar first_duration: Gets the duration of the data chunk with first timestamp. + :vartype first_duration: str + :ivar second_timestamp: Gets the timestamp received for some other quality levels. + :vartype second_timestamp: str + :ivar second_duration: Gets the duration of the data chunk with second timestamp. + :vartype second_duration: str + :ivar timescale: Gets the timescale in which both the timestamps and durations are represented. + :vartype timescale: str + """ + + _validation = { + 'first_timestamp': {'readonly': True}, + 'first_duration': {'readonly': True}, + 'second_timestamp': {'readonly': True}, + 'second_duration': {'readonly': True}, + 'timescale': {'readonly': True}, + } + + _attribute_map = { + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'first_duration': {'key': 'firstDuration', 'type': 'str'}, + 'second_timestamp': {'key': 'secondTimestamp', 'type': 'str'}, + 'second_duration': {'key': 'secondDuration', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, self).__init__(**kwargs) + self.first_timestamp = None + self.first_duration = None + self.second_timestamp = None + self.second_duration = None + self.timescale = None + + +class MediaLiveEventIngestHeartbeatEventData(msrest.serialization.Model): + """Ingest fragment dropped event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar incoming_bitrate: Gets the incoming bitrate. + :vartype incoming_bitrate: long + :ivar last_timestamp: Gets the last timestamp. + :vartype last_timestamp: str + :ivar timescale: Gets the timescale of the last timestamp. + :vartype timescale: str + :ivar overlap_count: Gets the fragment Overlap count. + :vartype overlap_count: long + :ivar discontinuity_count: Gets the fragment Discontinuity count. + :vartype discontinuity_count: long + :ivar nonincreasing_count: Gets Non increasing count. + :vartype nonincreasing_count: long + :ivar unexpected_bitrate: Gets a value indicating whether unexpected bitrate is present or not. + :vartype unexpected_bitrate: bool + :ivar state: Gets the state of the live event. + :vartype state: str + :ivar healthy: Gets a value indicating whether preview is healthy or not. + :vartype healthy: bool + """ + + _validation = { + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'incoming_bitrate': {'readonly': True}, + 'last_timestamp': {'readonly': True}, + 'timescale': {'readonly': True}, + 'overlap_count': {'readonly': True}, + 'discontinuity_count': {'readonly': True}, + 'nonincreasing_count': {'readonly': True}, + 'unexpected_bitrate': {'readonly': True}, + 'state': {'readonly': True}, + 'healthy': {'readonly': True}, + } + + _attribute_map = { + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'incoming_bitrate': {'key': 'incomingBitrate', 'type': 'long'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'overlap_count': {'key': 'overlapCount', 'type': 'long'}, + 'discontinuity_count': {'key': 'discontinuityCount', 'type': 'long'}, + 'nonincreasing_count': {'key': 'nonincreasingCount', 'type': 'long'}, + 'unexpected_bitrate': {'key': 'unexpectedBitrate', 'type': 'bool'}, + 'state': {'key': 'state', 'type': 'str'}, + 'healthy': {'key': 'healthy', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIngestHeartbeatEventData, self).__init__(**kwargs) + self.track_type = None + self.track_name = None + self.bitrate = None + self.incoming_bitrate = None + self.last_timestamp = None + self.timescale = None + self.overlap_count = None + self.discontinuity_count = None + self.nonincreasing_count = None + self.unexpected_bitrate = None + self.state = None + self.healthy = None + + +class MediaLiveEventTrackDiscontinuityDetectedEventData(msrest.serialization.Model): + """Ingest track discontinuity detected event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate. + :vartype bitrate: long + :ivar previous_timestamp: Gets the timestamp of the previous fragment. + :vartype previous_timestamp: str + :ivar new_timestamp: Gets the timestamp of the current fragment. + :vartype new_timestamp: str + :ivar timescale: Gets the timescale in which both timestamps and discontinuity gap are + represented. + :vartype timescale: str + :ivar discontinuity_gap: Gets the discontinuity gap between PreviousTimestamp and NewTimestamp. + :vartype discontinuity_gap: str + """ + + _validation = { + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'previous_timestamp': {'readonly': True}, + 'new_timestamp': {'readonly': True}, + 'timescale': {'readonly': True}, + 'discontinuity_gap': {'readonly': True}, + } + + _attribute_map = { + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'previous_timestamp': {'key': 'previousTimestamp', 'type': 'str'}, + 'new_timestamp': {'key': 'newTimestamp', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'discontinuity_gap': {'key': 'discontinuityGap', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventTrackDiscontinuityDetectedEventData, self).__init__(**kwargs) + self.track_type = None + self.track_name = None + self.bitrate = None + self.previous_timestamp = None + self.new_timestamp = None + self.timescale = None + self.discontinuity_gap = None + + +class RedisExportRDBCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Cache.ExportRDBCompleted event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param name: The name of this event. + :type name: str + :param status: The status of this event. Failed or succeeded. + :type status: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RedisExportRDBCompletedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + + +class RedisImportRDBCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Cache.ImportRDBCompleted event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param name: The name of this event. + :type name: str + :param status: The status of this event. Failed or succeeded. + :type status: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RedisImportRDBCompletedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + + +class RedisPatchingCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Cache.PatchingCompleted event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param name: The name of this event. + :type name: str + :param status: The status of this event. Failed or succeeded. + :type status: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RedisPatchingCompletedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + + +class RedisScalingCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Cache.ScalingCompleted event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param name: The name of this event. + :type name: str + :param status: The status of this event. Failed or succeeded. + :type status: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RedisScalingCompletedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + + +class ResourceActionCancelData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Resources.ResourceActionCancel event. This is raised when a resource action operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceActionCancelData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceActionFailureData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionFailure event. This is raised when a resource action operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceActionFailureData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceActionSuccessData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionSuccess event. This is raised when a resource action operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceActionSuccessData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceDeleteCancelData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Resources.ResourceDeleteCancel event. This is raised when a resource delete operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceDeleteCancelData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceDeleteFailureData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteFailure event. This is raised when a resource delete operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceDeleteFailureData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceDeleteSuccessData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a resource delete operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceDeleteSuccessData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceWriteCancelData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteCancel event. This is raised when a resource create or update operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceWriteCancelData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceWriteFailureData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteFailure event. This is raised when a resource create or update operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceWriteFailureData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceWriteSuccessData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteSuccess event. This is raised when a resource create or update operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceWriteSuccessData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ServiceBusActiveMessagesAvailableWithNoListenersEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. Could be one of + 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the entity type is of type + 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the entity type is of type + 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's subscription. If the + entity type is of type 'queue', then this value will be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) + + +class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. Could be one of + 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the entity type is of type + 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the entity type is of type + 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's subscription. If the + entity type is of type 'queue', then this value will be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) + + +class SignalRServiceClientConnectionConnectedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionConnected event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param hub_name: The hub of connected client connection. + :type hub_name: str + :param connection_id: The connection Id of connected client connection. + :type connection_id: str + :param user_id: The user Id of connected client connection. + :type user_id: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SignalRServiceClientConnectionConnectedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.hub_name = kwargs.get('hub_name', None) + self.connection_id = kwargs.get('connection_id', None) + self.user_id = kwargs.get('user_id', None) + + +class SignalRServiceClientConnectionDisconnectedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionDisconnected event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param hub_name: The hub of connected client connection. + :type hub_name: str + :param connection_id: The connection Id of connected client connection. + :type connection_id: str + :param user_id: The user Id of connected client connection. + :type user_id: str + :param error_message: The message of error that cause the client connection disconnected. + :type error_message: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SignalRServiceClientConnectionDisconnectedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.hub_name = kwargs.get('hub_name', None) + self.connection_id = kwargs.get('connection_id', None) + self.user_id = kwargs.get('user_id', None) + self.error_message = kwargs.get('error_message', None) + + +class SMSDeliveryAttemptProperties(msrest.serialization.Model): + """Schema for details of a delivery attempt. + + :param timestamp: TimeStamp when delivery was attempted. + :type timestamp: ~datetime.datetime + :param segments_succeeded: Number of segments that were successfully delivered. + :type segments_succeeded: int + :param segments_failed: Number of segments whose delivery failed. + :type segments_failed: int + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'segments_succeeded': {'key': 'segmentsSucceeded', 'type': 'int'}, + 'segments_failed': {'key': 'segmentsFailed', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SMSDeliveryAttemptProperties, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.segments_succeeded = kwargs.get('segments_succeeded', None) + self.segments_failed = kwargs.get('segments_failed', None) + + +class SMSEventBaseProperties(msrest.serialization.Model): + """Schema of common properties of all SMS events. + + :param message_id: The identity of the SMS message. + :type message_id: str + :param from_property: The identity of SMS message sender. + :type from_property: str + :param to: The identity of SMS message receiver. + :type to: str + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'from_property': {'key': 'from', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SMSEventBaseProperties, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.from_property = kwargs.get('from_property', None) + self.to = kwargs.get('to', None) + + +class SMSDeliveryReportReceivedEventData(SMSEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.SMSDeliveryReportReceived event. + + :param message_id: The identity of the SMS message. + :type message_id: str + :param from_property: The identity of SMS message sender. + :type from_property: str + :param to: The identity of SMS message receiver. + :type to: str + :param delivery_status: Status of Delivery. + :type delivery_status: str + :param delivery_status_details: Details about Delivery Status. + :type delivery_status_details: str + :param delivery_attempts: List of details of delivery attempts made. + :type delivery_attempts: list[~event_grid_publisher_client.models.SMSDeliveryAttemptProperties] + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'from_property': {'key': 'from', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'str'}, + 'delivery_status': {'key': 'deliveryStatus', 'type': 'str'}, + 'delivery_status_details': {'key': 'deliveryStatusDetails', 'type': 'str'}, + 'delivery_attempts': {'key': 'deliveryAttempts', 'type': '[SMSDeliveryAttemptProperties]'}, + } + + def __init__( + self, + **kwargs + ): + super(SMSDeliveryReportReceivedEventData, self).__init__(**kwargs) + self.delivery_status = kwargs.get('delivery_status', None) + self.delivery_status_details = kwargs.get('delivery_status_details', None) + self.delivery_attempts = kwargs.get('delivery_attempts', None) + + +class SMSReceivedEventData(SMSEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.SMSReceived event. + + :param message_id: The identity of the SMS message. + :type message_id: str + :param from_property: The identity of SMS message sender. + :type from_property: str + :param to: The identity of SMS message receiver. + :type to: str + :param message: The SMS content. + :type message: str + :param received_timestamp: The time at which the SMS was received. + :type received_timestamp: ~datetime.datetime + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'from_property': {'key': 'from', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'received_timestamp': {'key': 'receivedTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SMSReceivedEventData, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.received_timestamp = kwargs.get('received_timestamp', None) + + +class StorageBlobCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobCreated event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the Storage service for the storage API + operation that triggered this event. + :type request_id: str + :param e_tag: The etag of the blob at the time this event was triggered. + :type e_tag: str + :param content_type: The content type of the blob. This is the same as what would be returned + in the Content-Type header from the blob. + :type content_type: str + :param content_length: The size of the blob in bytes. This is the same as what would be + returned in the Content-Length header from the blob. + :type content_length: long + :param content_offset: The offset of the blob in bytes. + :type content_offset: long + :param blob_type: The type of blob. + :type blob_type: str + :param url: The path to the blob. + :type url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular blob name. Users can use standard string comparison to understand the relative + sequence of two events on the same blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_length': {'key': 'contentLength', 'type': 'long'}, + 'content_offset': {'key': 'contentOffset', 'type': 'long'}, + 'blob_type': {'key': 'blobType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageBlobCreatedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.e_tag = kwargs.get('e_tag', None) + self.content_type = kwargs.get('content_type', None) + self.content_length = kwargs.get('content_length', None) + self.content_offset = kwargs.get('content_offset', None) + self.blob_type = kwargs.get('blob_type', None) + self.url = kwargs.get('url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageBlobDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobDeleted event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the Storage service for the storage API + operation that triggered this event. + :type request_id: str + :param content_type: The content type of the blob. This is the same as what would be returned + in the Content-Type header from the blob. + :type content_type: str + :param blob_type: The type of blob. + :type blob_type: str + :param url: The path to the blob. + :type url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular blob name. Users can use standard string comparison to understand the relative + sequence of two events on the same blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'blob_type': {'key': 'blobType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageBlobDeletedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.content_type = kwargs.get('content_type', None) + self.blob_type = kwargs.get('blob_type', None) + self.url = kwargs.get('url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageBlobRenamedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobRenamed event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the storage API + operation that triggered this event. + :type request_id: str + :param source_url: The path to the blob that was renamed. + :type source_url: str + :param destination_url: The new path to the blob after the rename operation. + :type destination_url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular blob name. Users can use standard string comparison to understand the relative + sequence of two events on the same blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'source_url': {'key': 'sourceUrl', 'type': 'str'}, + 'destination_url': {'key': 'destinationUrl', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageBlobRenamedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.source_url = kwargs.get('source_url', None) + self.destination_url = kwargs.get('destination_url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageDirectoryCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.DirectoryCreated event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the storage API + operation that triggered this event. + :type request_id: str + :param e_tag: The etag of the directory at the time this event was triggered. + :type e_tag: str + :param url: The path to the directory. + :type url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular directory name. Users can use standard string comparison to understand the relative + sequence of two events on the same directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageDirectoryCreatedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.e_tag = kwargs.get('e_tag', None) + self.url = kwargs.get('url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageDirectoryDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.DirectoryDeleted event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the storage API + operation that triggered this event. + :type request_id: str + :param url: The path to the deleted directory. + :type url: str + :param recursive: Is this event for a recursive delete operation. + :type recursive: bool + :param sequencer: An opaque string value representing the logical sequence of events for any + particular directory name. Users can use standard string comparison to understand the relative + sequence of two events on the same directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'bool'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageDirectoryDeletedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.url = kwargs.get('url', None) + self.recursive = kwargs.get('recursive', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageDirectoryRenamedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.DirectoryRenamed event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the storage API + operation that triggered this event. + :type request_id: str + :param source_url: The path to the directory that was renamed. + :type source_url: str + :param destination_url: The new path to the directory after the rename operation. + :type destination_url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular directory name. Users can use standard string comparison to understand the relative + sequence of two events on the same directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'source_url': {'key': 'sourceUrl', 'type': 'str'}, + 'destination_url': {'key': 'destinationUrl', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageDirectoryRenamedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.source_url = kwargs.get('source_url', None) + self.destination_url = kwargs.get('destination_url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageLifecyclePolicyActionSummaryDetail(msrest.serialization.Model): + """Execution statistics of a specific policy action in a Blob Management cycle. + + :param total_objects_count: Total number of objects to be acted on by this action. + :type total_objects_count: long + :param success_count: Number of success operations of this action. + :type success_count: long + :param error_list: Error messages of this action if any. + :type error_list: str + """ + + _attribute_map = { + 'total_objects_count': {'key': 'totalObjectsCount', 'type': 'long'}, + 'success_count': {'key': 'successCount', 'type': 'long'}, + 'error_list': {'key': 'errorList', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageLifecyclePolicyActionSummaryDetail, self).__init__(**kwargs) + self.total_objects_count = kwargs.get('total_objects_count', None) + self.success_count = kwargs.get('success_count', None) + self.error_list = kwargs.get('error_list', None) + + +class StorageLifecyclePolicyCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.LifecyclePolicyCompleted event. + + :param schedule_time: The time the policy task was scheduled. + :type schedule_time: str + :param delete_summary: Execution statistics of a specific policy action in a Blob Management + cycle. + :type delete_summary: + ~event_grid_publisher_client.models.StorageLifecyclePolicyActionSummaryDetail + :param tier_to_cool_summary: Execution statistics of a specific policy action in a Blob + Management cycle. + :type tier_to_cool_summary: + ~event_grid_publisher_client.models.StorageLifecyclePolicyActionSummaryDetail + :param tier_to_archive_summary: Execution statistics of a specific policy action in a Blob + Management cycle. + :type tier_to_archive_summary: + ~event_grid_publisher_client.models.StorageLifecyclePolicyActionSummaryDetail + """ + + _attribute_map = { + 'schedule_time': {'key': 'scheduleTime', 'type': 'str'}, + 'delete_summary': {'key': 'deleteSummary', 'type': 'StorageLifecyclePolicyActionSummaryDetail'}, + 'tier_to_cool_summary': {'key': 'tierToCoolSummary', 'type': 'StorageLifecyclePolicyActionSummaryDetail'}, + 'tier_to_archive_summary': {'key': 'tierToArchiveSummary', 'type': 'StorageLifecyclePolicyActionSummaryDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageLifecyclePolicyCompletedEventData, self).__init__(**kwargs) + self.schedule_time = kwargs.get('schedule_time', None) + self.delete_summary = kwargs.get('delete_summary', None) + self.tier_to_cool_summary = kwargs.get('tier_to_cool_summary', None) + self.tier_to_archive_summary = kwargs.get('tier_to_archive_summary', None) + + +class SubscriptionDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None + + +class SubscriptionValidationEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to validate an event + subscription. To complete the validation handshake, the subscriber must either respond with + this validation code as part of the validation response, or perform a GET request on the + validationUrl (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid (available starting version + 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond + with the validationCode as part of the validation response, or perform a GET request on the + validationUrl (available starting version 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None + + +class SubscriptionValidationResponse(msrest.serialization.Model): + """To complete an event subscription validation handshake, a subscriber can use either the validationCode or the validationUrl received in a SubscriptionValidationEvent. When the validationCode is used, the SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber to Azure Event Grid + to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = kwargs.get('validation_response', None) + + +class WebAppServicePlanUpdatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.AppServicePlanUpdated event. + + :param app_service_plan_event_type_detail: Detail of action on the app service plan. + :type app_service_plan_event_type_detail: + ~event_grid_publisher_client.models.AppServicePlanEventTypeDetail + :param sku: sku of app service plan. + :type sku: ~event_grid_publisher_client.models.WebAppServicePlanUpdatedEventDataSku + :param name: name of the app service plan that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the app + service plan API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + app service plan API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the app service plan API + operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_service_plan_event_type_detail': {'key': 'appServicePlanEventTypeDetail', 'type': 'AppServicePlanEventTypeDetail'}, + 'sku': {'key': 'sku', 'type': 'WebAppServicePlanUpdatedEventDataSku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppServicePlanUpdatedEventData, self).__init__(**kwargs) + self.app_service_plan_event_type_detail = kwargs.get('app_service_plan_event_type_detail', None) + self.sku = kwargs.get('sku', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebAppServicePlanUpdatedEventDataSku(msrest.serialization.Model): + """sku of app service plan. + + :param name: name of app service plan sku. + :type name: str + :param tier: tier of app service plan sku. + :type tier: str + :param size: size of app service plan sku. + :type size: str + :param family: family of app service plan sku. + :type family: str + :param capacity: capacity of app service plan sku. + :type capacity: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'Tier', 'type': 'str'}, + 'size': {'key': 'Size', 'type': 'str'}, + 'family': {'key': 'Family', 'type': 'str'}, + 'capacity': {'key': 'Capacity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppServicePlanUpdatedEventDataSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class WebAppUpdatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.AppUpdated event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppUpdatedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebBackupOperationCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.BackupOperationCompleted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebBackupOperationCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebBackupOperationFailedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.BackupOperationFailed event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebBackupOperationFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebBackupOperationStartedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.BackupOperationStarted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebBackupOperationStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebRestoreOperationCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.RestoreOperationCompleted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebRestoreOperationCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebRestoreOperationFailedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.RestoreOperationFailed event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebRestoreOperationFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebRestoreOperationStartedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.RestoreOperationStarted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebRestoreOperationStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapCompleted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebSlotSwapCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapFailedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapFailed event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebSlotSwapFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapStartedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapStarted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebSlotSwapStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapWithPreviewCancelledEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapWithPreviewCancelled event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebSlotSwapWithPreviewCancelledEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapWithPreviewStartedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapWithPreviewStarted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebSlotSwapWithPreviewStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models_py3.py new file mode 100644 index 0000000000000..7646d84b46207 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models_py3.py @@ -0,0 +1,6351 @@ +# 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 datetime +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._event_grid_publisher_client_enums import * + + +class AppConfigurationKeyValueDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.AppConfiguration.KeyValueDeleted event. + + :param key: The key used to identify the key-value that was deleted. + :type key: str + :param label: The label, if any, used to identify the key-value that was deleted. + :type label: str + :param etag: The etag representing the key-value that was deleted. + :type etag: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + *, + key: Optional[str] = None, + label: Optional[str] = None, + etag: Optional[str] = None, + **kwargs + ): + super(AppConfigurationKeyValueDeletedEventData, self).__init__(**kwargs) + self.key = key + self.label = label + self.etag = etag + + +class AppConfigurationKeyValueModifiedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.AppConfiguration.KeyValueModified event. + + :param key: The key used to identify the key-value that was modified. + :type key: str + :param label: The label, if any, used to identify the key-value that was modified. + :type label: str + :param etag: The etag representing the new state of the key-value. + :type etag: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + *, + key: Optional[str] = None, + label: Optional[str] = None, + etag: Optional[str] = None, + **kwargs + ): + super(AppConfigurationKeyValueModifiedEventData, self).__init__(**kwargs) + self.key = key + self.label = label + self.etag = etag + + +class AppEventTypeDetail(msrest.serialization.Model): + """Detail of action on the app. + + :param action: Type of action of the operation. Possible values include: "Restarted", + "Stopped", "ChangedAppSettings", "Started", "Completed", "Failed". + :type action: str or ~event_grid_publisher_client.models.AppAction + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + *, + action: Optional[Union[str, "AppAction"]] = None, + **kwargs + ): + super(AppEventTypeDetail, self).__init__(**kwargs) + self.action = action + + +class AppServicePlanEventTypeDetail(msrest.serialization.Model): + """Detail of action on the app service plan. + + :param stamp_kind: Kind of environment where app service plan is. Possible values include: + "Public", "AseV1", "AseV2". + :type stamp_kind: str or ~event_grid_publisher_client.models.StampKind + :param action: Type of action on the app service plan. Possible values include: "Updated". + :type action: str or ~event_grid_publisher_client.models.AppServicePlanAction + :param status: Asynchronous operation status of the operation on the app service plan. Possible + values include: "Started", "Completed", "Failed". + :type status: str or ~event_grid_publisher_client.models.AsyncStatus + """ + + _attribute_map = { + 'stamp_kind': {'key': 'stampKind', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + stamp_kind: Optional[Union[str, "StampKind"]] = None, + action: Optional[Union[str, "AppServicePlanAction"]] = None, + status: Optional[Union[str, "AsyncStatus"]] = None, + **kwargs + ): + super(AppServicePlanEventTypeDetail, self).__init__(**kwargs) + self.stamp_kind = stamp_kind + self.action = action + self.status = status + + +class ChatEventBaseProperties(msrest.serialization.Model): + """Schema of common properties of all chat events. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + **kwargs + ): + super(ChatEventBaseProperties, self).__init__(**kwargs) + self.recipient_id = recipient_id + self.transaction_id = transaction_id + self.thread_id = thread_id + + +class ChatThreadEventBaseProperties(ChatEventBaseProperties): + """Schema of common properties of all chat thread events. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + create_time: Optional[datetime.datetime] = None, + version: Optional[int] = None, + **kwargs + ): + super(ChatThreadEventBaseProperties, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, **kwargs) + self.create_time = create_time + self.version = version + + +class ChatMemberAddedToThreadWithUserEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMemberAddedToThreadWithUser event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param time: The time at which the user was added to the thread. + :type time: ~datetime.datetime + :param added_by: The MRI of the user who added the user. + :type added_by: str + :param member: The details of the user who was added. + :type member: ~event_grid_publisher_client.models.ChatThreadMemberProperties + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'added_by': {'key': 'addedBy', 'type': 'str'}, + 'member': {'key': 'member', 'type': 'ChatThreadMemberProperties'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + create_time: Optional[datetime.datetime] = None, + version: Optional[int] = None, + time: Optional[datetime.datetime] = None, + added_by: Optional[str] = None, + member: Optional["ChatThreadMemberProperties"] = None, + **kwargs + ): + super(ChatMemberAddedToThreadWithUserEventData, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, create_time=create_time, version=version, **kwargs) + self.time = time + self.added_by = added_by + self.member = member + + +class ChatMemberRemovedFromThreadForWithUserEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMemberRemovedFromThreadForWithUser event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param time: The time at which the user was removed to the thread. + :type time: ~datetime.datetime + :param removed_by: The MRI of the user who removed the user. + :type removed_by: str + :param member: The details of the user who was removed. + :type member: ~event_grid_publisher_client.models.ChatThreadMemberProperties + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'removed_by': {'key': 'removedBy', 'type': 'str'}, + 'member': {'key': 'member', 'type': 'ChatThreadMemberProperties'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + create_time: Optional[datetime.datetime] = None, + version: Optional[int] = None, + time: Optional[datetime.datetime] = None, + removed_by: Optional[str] = None, + member: Optional["ChatThreadMemberProperties"] = None, + **kwargs + ): + super(ChatMemberRemovedFromThreadForWithUserEventData, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, create_time=create_time, version=version, **kwargs) + self.time = time + self.removed_by = removed_by + self.member = member + + +class ChatMessageEventBaseProperties(ChatEventBaseProperties): + """Schema of common properties of all chat message events. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param message_id: The chat message id. + :type message_id: str + :param collapse_id: The collapse id is used to identify the message threads. + :type collapse_id: str + :param client_message_id: The messaged Id generated by the sending client. + :type client_message_id: str + :param sender_id: The MRI of the sender. + :type sender_id: str + :param sender_display_name: The display name of the sender. + :type sender_display_name: str + :param compose_time: The original compose time of the message. + :type compose_time: ~datetime.datetime + :param message_type: The type of the message. + :type message_type: str + :param version: The version of the message. + :type version: int + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'collapse_id': {'key': 'collapseId', 'type': 'str'}, + 'client_message_id': {'key': 'clientMessageId', 'type': 'str'}, + 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, + 'compose_time': {'key': 'composeTime', 'type': 'iso-8601'}, + 'message_type': {'key': 'messageType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + message_id: Optional[str] = None, + collapse_id: Optional[str] = None, + client_message_id: Optional[str] = None, + sender_id: Optional[str] = None, + sender_display_name: Optional[str] = None, + compose_time: Optional[datetime.datetime] = None, + message_type: Optional[str] = None, + version: Optional[int] = None, + **kwargs + ): + super(ChatMessageEventBaseProperties, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, **kwargs) + self.message_id = message_id + self.collapse_id = collapse_id + self.client_message_id = client_message_id + self.sender_id = sender_id + self.sender_display_name = sender_display_name + self.compose_time = compose_time + self.message_type = message_type + self.version = version + + +class ChatMessageDeletedEventData(ChatMessageEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMessageDeleted event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param message_id: The chat message id. + :type message_id: str + :param collapse_id: The collapse id is used to identify the message threads. + :type collapse_id: str + :param client_message_id: The messaged Id generated by the sending client. + :type client_message_id: str + :param sender_id: The MRI of the sender. + :type sender_id: str + :param sender_display_name: The display name of the sender. + :type sender_display_name: str + :param compose_time: The original compose time of the message. + :type compose_time: ~datetime.datetime + :param message_type: The type of the message. + :type message_type: str + :param version: The version of the message. + :type version: int + :param delete_time: The time at which the message was deleted. + :type delete_time: ~datetime.datetime + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'collapse_id': {'key': 'collapseId', 'type': 'str'}, + 'client_message_id': {'key': 'clientMessageId', 'type': 'str'}, + 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, + 'compose_time': {'key': 'composeTime', 'type': 'iso-8601'}, + 'message_type': {'key': 'messageType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'delete_time': {'key': 'deleteTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + message_id: Optional[str] = None, + collapse_id: Optional[str] = None, + client_message_id: Optional[str] = None, + sender_id: Optional[str] = None, + sender_display_name: Optional[str] = None, + compose_time: Optional[datetime.datetime] = None, + message_type: Optional[str] = None, + version: Optional[int] = None, + delete_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(ChatMessageDeletedEventData, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, message_id=message_id, collapse_id=collapse_id, client_message_id=client_message_id, sender_id=sender_id, sender_display_name=sender_display_name, compose_time=compose_time, message_type=message_type, version=version, **kwargs) + self.delete_time = delete_time + + +class ChatMessageEditedEventData(ChatMessageEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMessageEdited event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param message_id: The chat message id. + :type message_id: str + :param collapse_id: The collapse id is used to identify the message threads. + :type collapse_id: str + :param client_message_id: The messaged Id generated by the sending client. + :type client_message_id: str + :param sender_id: The MRI of the sender. + :type sender_id: str + :param sender_display_name: The display name of the sender. + :type sender_display_name: str + :param compose_time: The original compose time of the message. + :type compose_time: ~datetime.datetime + :param message_type: The type of the message. + :type message_type: str + :param version: The version of the message. + :type version: int + :param message_body: The body of the chat message. + :type message_body: str + :param edit_time: The time at which the message was edited. + :type edit_time: ~datetime.datetime + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'collapse_id': {'key': 'collapseId', 'type': 'str'}, + 'client_message_id': {'key': 'clientMessageId', 'type': 'str'}, + 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, + 'compose_time': {'key': 'composeTime', 'type': 'iso-8601'}, + 'message_type': {'key': 'messageType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'message_body': {'key': 'messageBody', 'type': 'str'}, + 'edit_time': {'key': 'editTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + message_id: Optional[str] = None, + collapse_id: Optional[str] = None, + client_message_id: Optional[str] = None, + sender_id: Optional[str] = None, + sender_display_name: Optional[str] = None, + compose_time: Optional[datetime.datetime] = None, + message_type: Optional[str] = None, + version: Optional[int] = None, + message_body: Optional[str] = None, + edit_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(ChatMessageEditedEventData, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, message_id=message_id, collapse_id=collapse_id, client_message_id=client_message_id, sender_id=sender_id, sender_display_name=sender_display_name, compose_time=compose_time, message_type=message_type, version=version, **kwargs) + self.message_body = message_body + self.edit_time = edit_time + + +class ChatMessageReceivedEventData(ChatMessageEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatMessageReceived event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param message_id: The chat message id. + :type message_id: str + :param collapse_id: The collapse id is used to identify the message threads. + :type collapse_id: str + :param client_message_id: The messaged Id generated by the sending client. + :type client_message_id: str + :param sender_id: The MRI of the sender. + :type sender_id: str + :param sender_display_name: The display name of the sender. + :type sender_display_name: str + :param compose_time: The original compose time of the message. + :type compose_time: ~datetime.datetime + :param message_type: The type of the message. + :type message_type: str + :param version: The version of the message. + :type version: int + :param message_body: The body of the chat message. + :type message_body: str + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'collapse_id': {'key': 'collapseId', 'type': 'str'}, + 'client_message_id': {'key': 'clientMessageId', 'type': 'str'}, + 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, + 'compose_time': {'key': 'composeTime', 'type': 'iso-8601'}, + 'message_type': {'key': 'messageType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'message_body': {'key': 'messageBody', 'type': 'str'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + message_id: Optional[str] = None, + collapse_id: Optional[str] = None, + client_message_id: Optional[str] = None, + sender_id: Optional[str] = None, + sender_display_name: Optional[str] = None, + compose_time: Optional[datetime.datetime] = None, + message_type: Optional[str] = None, + version: Optional[int] = None, + message_body: Optional[str] = None, + **kwargs + ): + super(ChatMessageReceivedEventData, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, message_id=message_id, collapse_id=collapse_id, client_message_id=client_message_id, sender_id=sender_id, sender_display_name=sender_display_name, compose_time=compose_time, message_type=message_type, version=version, **kwargs) + self.message_body = message_body + + +class ChatThreadCreatedWithUserEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatThreadCreatedWithUser event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param created_by: The MRI of the creator of the thread. + :type created_by: str + :param thread_type: The type of the thread. + :type thread_type: str + :param properties: The thread properties. + :type properties: dict[str, object] + :param members: The list of properties of users who are part of the thread. + :type members: list[~event_grid_publisher_client.models.ChatThreadMemberProperties] + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'thread_type': {'key': 'threadType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + 'members': {'key': 'members', 'type': '[ChatThreadMemberProperties]'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + create_time: Optional[datetime.datetime] = None, + version: Optional[int] = None, + created_by: Optional[str] = None, + thread_type: Optional[str] = None, + properties: Optional[Dict[str, object]] = None, + members: Optional[List["ChatThreadMemberProperties"]] = None, + **kwargs + ): + super(ChatThreadCreatedWithUserEventData, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, create_time=create_time, version=version, **kwargs) + self.created_by = created_by + self.thread_type = thread_type + self.properties = properties + self.members = members + + +class ChatThreadMemberProperties(msrest.serialization.Model): + """Schema of the chat thread member. + + :param friendly_name: The name of the user. + :type friendly_name: str + :param member_id: The MRI of the user. + :type member_id: str + """ + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'member_id': {'key': 'memberId', 'type': 'str'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + member_id: Optional[str] = None, + **kwargs + ): + super(ChatThreadMemberProperties, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.member_id = member_id + + +class ChatThreadPropertiesUpdatedPerUserEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param edited_by: The MRI of the user who updated the thread properties. + :type edited_by: str + :param edit_time: The time at which the properties of the thread were updated. + :type edit_time: ~datetime.datetime + :param properties: The updated thread properties. + :type properties: dict[str, object] + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'edited_by': {'key': 'editedBy', 'type': 'str'}, + 'edit_time': {'key': 'editTime', 'type': 'iso-8601'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + create_time: Optional[datetime.datetime] = None, + version: Optional[int] = None, + edited_by: Optional[str] = None, + edit_time: Optional[datetime.datetime] = None, + properties: Optional[Dict[str, object]] = None, + **kwargs + ): + super(ChatThreadPropertiesUpdatedPerUserEventData, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, create_time=create_time, version=version, **kwargs) + self.edited_by = edited_by + self.edit_time = edit_time + self.properties = properties + + +class ChatThreadWithUserDeletedEventData(ChatThreadEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatThreadWithUserDeleted event. + + :param recipient_id: The MRI of the target user. + :type recipient_id: str + :param transaction_id: The transaction id will be used as co-relation vector. + :type transaction_id: str + :param thread_id: The chat thread id. + :type thread_id: str + :param create_time: The original creation time of the thread. + :type create_time: ~datetime.datetime + :param version: The version of the thread. + :type version: int + :param deleted_by: The MRI of the user who deleted the thread. + :type deleted_by: str + :param delete_time: The deletion time of the thread. + :type delete_time: ~datetime.datetime + """ + + _attribute_map = { + 'recipient_id': {'key': 'recipientId', 'type': 'str'}, + 'transaction_id': {'key': 'transactionId', 'type': 'str'}, + 'thread_id': {'key': 'threadId', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'int'}, + 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, + 'delete_time': {'key': 'deleteTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recipient_id: Optional[str] = None, + transaction_id: Optional[str] = None, + thread_id: Optional[str] = None, + create_time: Optional[datetime.datetime] = None, + version: Optional[int] = None, + deleted_by: Optional[str] = None, + delete_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(ChatThreadWithUserDeletedEventData, self).__init__(recipient_id=recipient_id, transaction_id=transaction_id, thread_id=thread_id, create_time=create_time, version=version, **kwargs) + self.deleted_by = deleted_by + self.delete_time = delete_time + + +class CloudEvent(msrest.serialization.Model): + """Properties of an event published to an Event Grid topic using the CloudEvent 1.0 Schema. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are deserialized to this + collection. + :type additional_properties: dict[str, object] + :param id: Required. An identifier for the event. The combination of id and source must be + unique for each distinct event. + :type id: str + :param source: Required. Identifies the context in which an event happened. The combination of + id and source must be unique for each distinct event. + :type source: str + :param data: Event data specific to the event type. + :type data: object + :param data_base64: Event data specific to the event type, encoded as a base64 string. + :type data_base64: bytearray + :param type: Required. Type of event related to the originating occurrence. + :type type: str + :param time: The time (in UTC) the event was generated, in RFC3339 format. + :type time: ~datetime.datetime + :param specversion: Required. The version of the CloudEvents specification which the event + uses. + :type specversion: str + :param dataschema: Identifies the schema that data adheres to. + :type dataschema: str + :param datacontenttype: Content type of data value. + :type datacontenttype: str + :param subject: This describes the subject of the event in the context of the event producer + (identified by source). + :type subject: str + """ + + _validation = { + 'id': {'required': True}, + 'source': {'required': True}, + 'type': {'required': True}, + 'specversion': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'object'}, + 'data_base64': {'key': 'data_base64', 'type': 'bytearray'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'specversion': {'key': 'specversion', 'type': 'str'}, + 'dataschema': {'key': 'dataschema', 'type': 'str'}, + 'datacontenttype': {'key': 'datacontenttype', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + source: str, + type: str, + specversion: str, + additional_properties: Optional[Dict[str, object]] = None, + data: Optional[object] = None, + data_base64: Optional[bytearray] = None, + time: Optional[datetime.datetime] = None, + dataschema: Optional[str] = None, + datacontenttype: Optional[str] = None, + subject: Optional[str] = None, + **kwargs + ): + super(CloudEvent, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.id = id + self.source = source + self.data = data + self.data_base64 = data_base64 + self.type = type + self.time = time + self.specversion = specversion + self.dataschema = dataschema + self.datacontenttype = datacontenttype + self.subject = subject + + +class ContainerRegistryArtifactEventData(msrest.serialization.Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + timestamp: Optional[datetime.datetime] = None, + action: Optional[str] = None, + target: Optional["ContainerRegistryArtifactEventTarget"] = None, + **kwargs + ): + super(ContainerRegistryArtifactEventData, self).__init__(**kwargs) + self.id = id + self.timestamp = timestamp + self.action = action + self.target = target + + +class ContainerRegistryArtifactEventTarget(msrest.serialization.Model): + """The target of the event. + + :param media_type: The MIME type of the artifact. + :type media_type: str + :param size: The size in bytes of the artifact. + :type size: long + :param digest: The digest of the artifact. + :type digest: str + :param repository: The repository name of the artifact. + :type repository: str + :param tag: The tag of the artifact. + :type tag: str + :param name: The name of the artifact. + :type name: str + :param version: The version of the artifact. + :type version: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + media_type: Optional[str] = None, + size: Optional[int] = None, + digest: Optional[str] = None, + repository: Optional[str] = None, + tag: Optional[str] = None, + name: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + super(ContainerRegistryArtifactEventTarget, self).__init__(**kwargs) + self.media_type = media_type + self.size = size + self.digest = digest + self.repository = repository + self.tag = tag + self.name = name + self.version = version + + +class ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventData): + """Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartDeleted event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + timestamp: Optional[datetime.datetime] = None, + action: Optional[str] = None, + target: Optional["ContainerRegistryArtifactEventTarget"] = None, + **kwargs + ): + super(ContainerRegistryChartDeletedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, **kwargs) + + +class ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventData): + """Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartPushed event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + timestamp: Optional[datetime.datetime] = None, + action: Optional[str] = None, + target: Optional["ContainerRegistryArtifactEventTarget"] = None, + **kwargs + ): + super(ContainerRegistryChartPushedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, **kwargs) + + +class ContainerRegistryEventActor(msrest.serialization.Model): + """The agent that initiated the event. For most situations, this could be from the authorization context of the request. + + :param name: The subject or username associated with the request context that generated the + event. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(ContainerRegistryEventActor, self).__init__(**kwargs) + self.name = name + + +class ContainerRegistryEventData(msrest.serialization.Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~event_grid_publisher_client.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :type actor: ~event_grid_publisher_client.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :type source: ~event_grid_publisher_client.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + timestamp: Optional[datetime.datetime] = None, + action: Optional[str] = None, + target: Optional["ContainerRegistryEventTarget"] = None, + request: Optional["ContainerRegistryEventRequest"] = None, + actor: Optional["ContainerRegistryEventActor"] = None, + source: Optional["ContainerRegistryEventSource"] = None, + **kwargs + ): + super(ContainerRegistryEventData, self).__init__(**kwargs) + self.id = id + self.timestamp = timestamp + self.action = action + self.target = target + self.request = request + self.actor = actor + self.source = source + + +class ContainerRegistryEventRequest(msrest.serialization.Model): + """The request that generated the event. + + :param id: The ID of the request that initiated the event. + :type id: str + :param addr: The IP or hostname and possibly port of the client connection that initiated the + event. This is the RemoteAddr from the standard http request. + :type addr: str + :param host: The externally accessible hostname of the registry instance, as specified by the + http host header on incoming requests. + :type host: str + :param method: The request method that generated the event. + :type method: str + :param useragent: The user agent header of the request. + :type useragent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'addr': {'key': 'addr', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'useragent': {'key': 'useragent', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + addr: Optional[str] = None, + host: Optional[str] = None, + method: Optional[str] = None, + useragent: Optional[str] = None, + **kwargs + ): + super(ContainerRegistryEventRequest, self).__init__(**kwargs) + self.id = id + self.addr = addr + self.host = host + self.method = method + self.useragent = useragent + + +class ContainerRegistryEventSource(msrest.serialization.Model): + """The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. + + :param addr: The IP or hostname and the port of the registry node that generated the event. + Generally, this will be resolved by os.Hostname() along with the running port. + :type addr: str + :param instance_id: The running instance of an application. Changes after each restart. + :type instance_id: str + """ + + _attribute_map = { + 'addr': {'key': 'addr', 'type': 'str'}, + 'instance_id': {'key': 'instanceID', 'type': 'str'}, + } + + def __init__( + self, + *, + addr: Optional[str] = None, + instance_id: Optional[str] = None, + **kwargs + ): + super(ContainerRegistryEventSource, self).__init__(**kwargs) + self.addr = addr + self.instance_id = instance_id + + +class ContainerRegistryEventTarget(msrest.serialization.Model): + """The target of the event. + + :param media_type: The MIME type of the referenced object. + :type media_type: str + :param size: The number of bytes of the content. Same as Length field. + :type size: long + :param digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. + :type digest: str + :param length: The number of bytes of the content. Same as Size field. + :type length: long + :param repository: The repository name. + :type repository: str + :param url: The direct URL to the content. + :type url: str + :param tag: The tag name. + :type tag: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'length': {'key': 'length', 'type': 'long'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__( + self, + *, + media_type: Optional[str] = None, + size: Optional[int] = None, + digest: Optional[str] = None, + length: Optional[int] = None, + repository: Optional[str] = None, + url: Optional[str] = None, + tag: Optional[str] = None, + **kwargs + ): + super(ContainerRegistryEventTarget, self).__init__(**kwargs) + self.media_type = media_type + self.size = size + self.digest = digest + self.length = length + self.repository = repository + self.url = url + self.tag = tag + + +class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): + """Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImageDeleted event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~event_grid_publisher_client.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :type actor: ~event_grid_publisher_client.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :type source: ~event_grid_publisher_client.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + timestamp: Optional[datetime.datetime] = None, + action: Optional[str] = None, + target: Optional["ContainerRegistryEventTarget"] = None, + request: Optional["ContainerRegistryEventRequest"] = None, + actor: Optional["ContainerRegistryEventActor"] = None, + source: Optional["ContainerRegistryEventSource"] = None, + **kwargs + ): + super(ContainerRegistryImageDeletedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, request=request, actor=actor, source=source, **kwargs) + + +class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): + """Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImagePushed event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~event_grid_publisher_client.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~event_grid_publisher_client.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :type actor: ~event_grid_publisher_client.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :type source: ~event_grid_publisher_client.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + timestamp: Optional[datetime.datetime] = None, + action: Optional[str] = None, + target: Optional["ContainerRegistryEventTarget"] = None, + request: Optional["ContainerRegistryEventRequest"] = None, + actor: Optional["ContainerRegistryEventActor"] = None, + source: Optional["ContainerRegistryEventSource"] = None, + **kwargs + ): + super(ContainerRegistryImagePushedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, request=request, actor=actor, source=source, **kwargs) + + +class DeviceConnectionStateEventInfo(msrest.serialization.Model): + """Information about the device connection state event. + + :param sequence_number: Sequence number is string representation of a hexadecimal number. + string compare can be used to identify the larger number because both in ASCII and HEX numbers + come after alphabets. If you are converting the string to hex, then the number is a 256 bit + number. + :type sequence_number: str + """ + + _attribute_map = { + 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, + } + + def __init__( + self, + *, + sequence_number: Optional[str] = None, + **kwargs + ): + super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) + self.sequence_number = sequence_number + + +class DeviceConnectionStateEventProperties(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a device connection state event (DeviceConnected, DeviceDisconnected). + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device connection state event. + :type device_connection_state_event_info: + ~event_grid_publisher_client.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__( + self, + *, + device_id: Optional[str] = None, + module_id: Optional[str] = None, + hub_name: Optional[str] = None, + device_connection_state_event_info: Optional["DeviceConnectionStateEventInfo"] = None, + **kwargs + ): + super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) + self.device_id = device_id + self.module_id = module_id + self.hub_name = hub_name + self.device_connection_state_event_info = device_connection_state_event_info + + +class DeviceLifeCycleEventProperties(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted). + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud representation of + application device metadata. + :type twin: ~event_grid_publisher_client.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__( + self, + *, + device_id: Optional[str] = None, + hub_name: Optional[str] = None, + twin: Optional["DeviceTwinInfo"] = None, + **kwargs + ): + super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) + self.device_id = device_id + self.hub_name = hub_name + self.twin = twin + + +class DeviceTelemetryEventProperties(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry). + + :param body: The content of the message from the device. + :type body: object + :param properties: Application properties are user-defined strings that can be added to the + message. These fields are optional. + :type properties: dict[str, str] + :param system_properties: System properties help identify contents and source of the messages. + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__( + self, + *, + body: Optional[object] = None, + properties: Optional[Dict[str, str]] = None, + system_properties: Optional[Dict[str, str]] = None, + **kwargs + ): + super(DeviceTelemetryEventProperties, self).__init__(**kwargs) + self.body = body + self.properties = properties + self.system_properties = system_properties + + +class DeviceTwinInfo(msrest.serialization.Model): + """Information about the device twin, which is the cloud representation of application device metadata. + + :param authentication_type: Authentication type used for this device: either SAS, SelfSigned, + or CertificateAuthority. + :type authentication_type: str + :param cloud_to_device_message_count: Count of cloud to device messages sent to this device. + :type cloud_to_device_message_count: float + :param connection_state: Whether the device is connected or disconnected. + :type connection_state: str + :param device_id: The unique identifier of the device twin. + :type device_id: str + :param etag: A piece of information that describes the content of the device twin. Each etag is + guaranteed to be unique per device twin. + :type etag: str + :param last_activity_time: The ISO8601 timestamp of the last activity. + :type last_activity_time: str + :param properties: Properties JSON element. + :type properties: ~event_grid_publisher_client.models.DeviceTwinInfoProperties + :param status: Whether the device twin is enabled or disabled. + :type status: str + :param status_update_time: The ISO8601 timestamp of the last device twin status update. + :type status_update_time: str + :param version: An integer that is incremented by one each time the device twin is updated. + :type version: float + :param x509_thumbprint: The thumbprint is a unique value for the x509 certificate, commonly + used to find a particular certificate in a certificate store. The thumbprint is dynamically + generated using the SHA1 algorithm, and does not physically exist in the certificate. + :type x509_thumbprint: ~event_grid_publisher_client.models.DeviceTwinInfoX509Thumbprint + """ + + _attribute_map = { + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'cloud_to_device_message_count': {'key': 'cloudToDeviceMessageCount', 'type': 'float'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'last_activity_time': {'key': 'lastActivityTime', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeviceTwinInfoProperties'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_update_time': {'key': 'statusUpdateTime', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'float'}, + 'x509_thumbprint': {'key': 'x509Thumbprint', 'type': 'DeviceTwinInfoX509Thumbprint'}, + } + + def __init__( + self, + *, + authentication_type: Optional[str] = None, + cloud_to_device_message_count: Optional[float] = None, + connection_state: Optional[str] = None, + device_id: Optional[str] = None, + etag: Optional[str] = None, + last_activity_time: Optional[str] = None, + properties: Optional["DeviceTwinInfoProperties"] = None, + status: Optional[str] = None, + status_update_time: Optional[str] = None, + version: Optional[float] = None, + x509_thumbprint: Optional["DeviceTwinInfoX509Thumbprint"] = None, + **kwargs + ): + super(DeviceTwinInfo, self).__init__(**kwargs) + self.authentication_type = authentication_type + self.cloud_to_device_message_count = cloud_to_device_message_count + self.connection_state = connection_state + self.device_id = device_id + self.etag = etag + self.last_activity_time = last_activity_time + self.properties = properties + self.status = status + self.status_update_time = status_update_time + self.version = version + self.x509_thumbprint = x509_thumbprint + + +class DeviceTwinInfoProperties(msrest.serialization.Model): + """Properties JSON element. + + :param desired: A portion of the properties that can be written only by the application back- + end, and read by the device. + :type desired: ~event_grid_publisher_client.models.DeviceTwinProperties + :param reported: A portion of the properties that can be written only by the device, and read + by the application back-end. + :type reported: ~event_grid_publisher_client.models.DeviceTwinProperties + """ + + _attribute_map = { + 'desired': {'key': 'desired', 'type': 'DeviceTwinProperties'}, + 'reported': {'key': 'reported', 'type': 'DeviceTwinProperties'}, + } + + def __init__( + self, + *, + desired: Optional["DeviceTwinProperties"] = None, + reported: Optional["DeviceTwinProperties"] = None, + **kwargs + ): + super(DeviceTwinInfoProperties, self).__init__(**kwargs) + self.desired = desired + self.reported = reported + + +class DeviceTwinInfoX509Thumbprint(msrest.serialization.Model): + """The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist in the certificate. + + :param primary_thumbprint: Primary thumbprint for the x509 certificate. + :type primary_thumbprint: str + :param secondary_thumbprint: Secondary thumbprint for the x509 certificate. + :type secondary_thumbprint: str + """ + + _attribute_map = { + 'primary_thumbprint': {'key': 'primaryThumbprint', 'type': 'str'}, + 'secondary_thumbprint': {'key': 'secondaryThumbprint', 'type': 'str'}, + } + + def __init__( + self, + *, + primary_thumbprint: Optional[str] = None, + secondary_thumbprint: Optional[str] = None, + **kwargs + ): + super(DeviceTwinInfoX509Thumbprint, self).__init__(**kwargs) + self.primary_thumbprint = primary_thumbprint + self.secondary_thumbprint = secondary_thumbprint + + +class DeviceTwinMetadata(msrest.serialization.Model): + """Metadata information for the properties JSON document. + + :param last_updated: The ISO8601 timestamp of the last time the properties were updated. + :type last_updated: str + """ + + _attribute_map = { + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + } + + def __init__( + self, + *, + last_updated: Optional[str] = None, + **kwargs + ): + super(DeviceTwinMetadata, self).__init__(**kwargs) + self.last_updated = last_updated + + +class DeviceTwinProperties(msrest.serialization.Model): + """A portion of the properties that can be written only by the application back-end, and read by the device. + + :param metadata: Metadata information for the properties JSON document. + :type metadata: ~event_grid_publisher_client.models.DeviceTwinMetadata + :param version: Version of device twin properties. + :type version: float + """ + + _attribute_map = { + 'metadata': {'key': 'metadata', 'type': 'DeviceTwinMetadata'}, + 'version': {'key': 'version', 'type': 'float'}, + } + + def __init__( + self, + *, + metadata: Optional["DeviceTwinMetadata"] = None, + version: Optional[float] = None, + **kwargs + ): + super(DeviceTwinProperties, self).__init__(**kwargs) + self.metadata = metadata + self.version = version + + +class EventGridEvent(msrest.serialization.Model): + """Properties of an event published to an Event Grid topic using the EventGrid Schema. + + 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 id: Required. An unique identifier for the event. + :type id: str + :param topic: The resource path of the event source. + :type topic: str + :param subject: Required. A resource path relative to the topic path. + :type subject: str + :param data: Required. Event data specific to the event type. + :type data: object + :param event_type: Required. The type of the event that occurred. + :type event_type: str + :param event_time: Required. The time (in UTC) the event was generated. + :type event_time: ~datetime.datetime + :ivar metadata_version: The schema version of the event metadata. + :vartype metadata_version: str + :param data_version: Required. The schema version of the data object. + :type data_version: str + """ + + _validation = { + 'id': {'required': True}, + 'subject': {'required': True}, + 'data': {'required': True}, + 'event_type': {'required': True}, + 'event_time': {'required': True}, + 'metadata_version': {'readonly': True}, + 'data_version': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'object'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, + 'data_version': {'key': 'dataVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + subject: str, + data: object, + event_type: str, + event_time: datetime.datetime, + data_version: str, + topic: Optional[str] = None, + **kwargs + ): + super(EventGridEvent, self).__init__(**kwargs) + self.id = id + self.topic = topic + self.subject = subject + self.data = data + self.event_type = event_type + self.event_time = event_time + self.metadata_version = None + self.data_version = data_version + + +class EventHubCaptureFileCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.EventHub.CaptureFileCreated event. + + :param fileurl: The path to the capture file. + :type fileurl: str + :param file_type: The file type of the capture file. + :type file_type: str + :param partition_id: The shard ID. + :type partition_id: str + :param size_in_bytes: The file size. + :type size_in_bytes: int + :param event_count: The number of events in the file. + :type event_count: int + :param first_sequence_number: The smallest sequence number from the queue. + :type first_sequence_number: int + :param last_sequence_number: The last sequence number from the queue. + :type last_sequence_number: int + :param first_enqueue_time: The first time from the queue. + :type first_enqueue_time: ~datetime.datetime + :param last_enqueue_time: The last time from the queue. + :type last_enqueue_time: ~datetime.datetime + """ + + _attribute_map = { + 'fileurl': {'key': 'fileurl', 'type': 'str'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'size_in_bytes': {'key': 'sizeInBytes', 'type': 'int'}, + 'event_count': {'key': 'eventCount', 'type': 'int'}, + 'first_sequence_number': {'key': 'firstSequenceNumber', 'type': 'int'}, + 'last_sequence_number': {'key': 'lastSequenceNumber', 'type': 'int'}, + 'first_enqueue_time': {'key': 'firstEnqueueTime', 'type': 'iso-8601'}, + 'last_enqueue_time': {'key': 'lastEnqueueTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + fileurl: Optional[str] = None, + file_type: Optional[str] = None, + partition_id: Optional[str] = None, + size_in_bytes: Optional[int] = None, + event_count: Optional[int] = None, + first_sequence_number: Optional[int] = None, + last_sequence_number: Optional[int] = None, + first_enqueue_time: Optional[datetime.datetime] = None, + last_enqueue_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(EventHubCaptureFileCreatedEventData, self).__init__(**kwargs) + self.fileurl = fileurl + self.file_type = file_type + self.partition_id = partition_id + self.size_in_bytes = size_in_bytes + self.event_count = event_count + self.first_sequence_number = first_sequence_number + self.last_sequence_number = last_sequence_number + self.first_enqueue_time = first_enqueue_time + self.last_enqueue_time = last_enqueue_time + + +class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceConnected event. + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device connection state event. + :type device_connection_state_event_info: + ~event_grid_publisher_client.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__( + self, + *, + device_id: Optional[str] = None, + module_id: Optional[str] = None, + hub_name: Optional[str] = None, + device_connection_state_event_info: Optional["DeviceConnectionStateEventInfo"] = None, + **kwargs + ): + super(IotHubDeviceConnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) + + +class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): + """Event data for Microsoft.Devices.DeviceCreated event. + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud representation of + application device metadata. + :type twin: ~event_grid_publisher_client.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__( + self, + *, + device_id: Optional[str] = None, + hub_name: Optional[str] = None, + twin: Optional["DeviceTwinInfo"] = None, + **kwargs + ): + super(IotHubDeviceCreatedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) + + +class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): + """Event data for Microsoft.Devices.DeviceDeleted event. + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud representation of + application device metadata. + :type twin: ~event_grid_publisher_client.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__( + self, + *, + device_id: Optional[str] = None, + hub_name: Optional[str] = None, + twin: Optional["DeviceTwinInfo"] = None, + **kwargs + ): + super(IotHubDeviceDeletedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) + + +class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceDisconnected event. + + :param device_id: The unique identifier of the device. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive string can be up to + 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following + special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device connection state event. + :type device_connection_state_event_info: + ~event_grid_publisher_client.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__( + self, + *, + device_id: Optional[str] = None, + module_id: Optional[str] = None, + hub_name: Optional[str] = None, + device_connection_state_event_info: Optional["DeviceConnectionStateEventInfo"] = None, + **kwargs + ): + super(IotHubDeviceDisconnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) + + +class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): + """Event data for Microsoft.Devices.DeviceTelemetry event. + + :param body: The content of the message from the device. + :type body: object + :param properties: Application properties are user-defined strings that can be added to the + message. These fields are optional. + :type properties: dict[str, str] + :param system_properties: System properties help identify contents and source of the messages. + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__( + self, + *, + body: Optional[object] = None, + properties: Optional[Dict[str, str]] = None, + system_properties: Optional[Dict[str, str]] = None, + **kwargs + ): + super(IotHubDeviceTelemetryEventData, self).__init__(body=body, properties=properties, system_properties=system_properties, **kwargs) + + +class KeyVaultCertificateExpiredEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an CertificateExpired event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultCertificateExpiredEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultCertificateNearExpiryEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an CertificateNearExpiry event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultCertificateNearExpiryEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultCertificateNewVersionCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an CertificateNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultCertificateNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultKeyExpiredEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an KeyExpired event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultKeyExpiredEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultKeyNearExpiryEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an KeyNearExpiry event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultKeyNearExpiryEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultKeyNewVersionCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an KeyNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultKeyNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultSecretExpiredEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an SecretExpired event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultSecretExpiredEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultSecretNearExpiryEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an SecretNearExpiry event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultSecretNearExpiryEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultSecretNewVersionCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an SecretNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event. + :type object_type: str + :param object_name: The name of the object that triggered this event. + :type object_name: str + :param version: The version of the object that triggered this event. + :type version: str + :param nbf: Not before date of the object that triggered this event. + :type nbf: float + :param exp: The expiration date of the object that triggered this event. + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + vault_name: Optional[str] = None, + object_type: Optional[str] = None, + object_name: Optional[str] = None, + version: Optional[str] = None, + nbf: Optional[float] = None, + exp: Optional[float] = None, + **kwargs + ): + super(KeyVaultSecretNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class MachineLearningServicesDatasetDriftDetectedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.DatasetDriftDetected event. + + :param data_drift_id: The ID of the data drift monitor that triggered the event. + :type data_drift_id: str + :param data_drift_name: The name of the data drift monitor that triggered the event. + :type data_drift_name: str + :param run_id: The ID of the Run that detected data drift. + :type run_id: str + :param base_dataset_id: The ID of the base Dataset used to detect drift. + :type base_dataset_id: str + :param target_dataset_id: The ID of the target Dataset used to detect drift. + :type target_dataset_id: str + :param drift_coefficient: The coefficient result that triggered the event. + :type drift_coefficient: float + :param start_time: The start time of the target dataset time series that resulted in drift + detection. + :type start_time: ~datetime.datetime + :param end_time: The end time of the target dataset time series that resulted in drift + detection. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'data_drift_id': {'key': 'dataDriftId', 'type': 'str'}, + 'data_drift_name': {'key': 'dataDriftName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'base_dataset_id': {'key': 'baseDatasetId', 'type': 'str'}, + 'target_dataset_id': {'key': 'targetDatasetId', 'type': 'str'}, + 'drift_coefficient': {'key': 'driftCoefficient', 'type': 'float'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + data_drift_id: Optional[str] = None, + data_drift_name: Optional[str] = None, + run_id: Optional[str] = None, + base_dataset_id: Optional[str] = None, + target_dataset_id: Optional[str] = None, + drift_coefficient: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(MachineLearningServicesDatasetDriftDetectedEventData, self).__init__(**kwargs) + self.data_drift_id = data_drift_id + self.data_drift_name = data_drift_name + self.run_id = run_id + self.base_dataset_id = base_dataset_id + self.target_dataset_id = target_dataset_id + self.drift_coefficient = drift_coefficient + self.start_time = start_time + self.end_time = end_time + + +class MachineLearningServicesModelDeployedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.ModelDeployed event. + + :param service_name: The name of the deployed service. + :type service_name: str + :param service_compute_type: The compute type (e.g. ACI, AKS) of the deployed service. + :type service_compute_type: str + :param model_ids: A common separated list of model IDs. The IDs of the models deployed in the + service. + :type model_ids: str + :param service_tags: The tags of the deployed service. + :type service_tags: object + :param service_properties: The properties of the deployed service. + :type service_properties: object + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'service_compute_type': {'key': 'serviceComputeType', 'type': 'str'}, + 'model_ids': {'key': 'modelIds', 'type': 'str'}, + 'service_tags': {'key': 'serviceTags', 'type': 'object'}, + 'service_properties': {'key': 'serviceProperties', 'type': 'object'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + service_compute_type: Optional[str] = None, + model_ids: Optional[str] = None, + service_tags: Optional[object] = None, + service_properties: Optional[object] = None, + **kwargs + ): + super(MachineLearningServicesModelDeployedEventData, self).__init__(**kwargs) + self.service_name = service_name + self.service_compute_type = service_compute_type + self.model_ids = model_ids + self.service_tags = service_tags + self.service_properties = service_properties + + +class MachineLearningServicesModelRegisteredEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.ModelRegistered event. + + :param model_name: The name of the model that was registered. + :type model_name: str + :param model_version: The version of the model that was registered. + :type model_version: str + :param model_tags: The tags of the model that was registered. + :type model_tags: object + :param model_properties: The properties of the model that was registered. + :type model_properties: object + """ + + _attribute_map = { + 'model_name': {'key': 'modelName', 'type': 'str'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + 'model_tags': {'key': 'modelTags', 'type': 'object'}, + 'model_properties': {'key': 'modelProperties', 'type': 'object'}, + } + + def __init__( + self, + *, + model_name: Optional[str] = None, + model_version: Optional[str] = None, + model_tags: Optional[object] = None, + model_properties: Optional[object] = None, + **kwargs + ): + super(MachineLearningServicesModelRegisteredEventData, self).__init__(**kwargs) + self.model_name = model_name + self.model_version = model_version + self.model_tags = model_tags + self.model_properties = model_properties + + +class MachineLearningServicesRunCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.RunCompleted event. + + :param experiment_id: The ID of the experiment that the run belongs to. + :type experiment_id: str + :param experiment_name: The name of the experiment that the run belongs to. + :type experiment_name: str + :param run_id: The ID of the Run that was completed. + :type run_id: str + :param run_type: The Run Type of the completed Run. + :type run_type: str + :param run_tags: The tags of the completed Run. + :type run_tags: object + :param run_properties: The properties of the completed Run. + :type run_properties: object + """ + + _attribute_map = { + 'experiment_id': {'key': 'experimentId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_type': {'key': 'runType', 'type': 'str'}, + 'run_tags': {'key': 'runTags', 'type': 'object'}, + 'run_properties': {'key': 'runProperties', 'type': 'object'}, + } + + def __init__( + self, + *, + experiment_id: Optional[str] = None, + experiment_name: Optional[str] = None, + run_id: Optional[str] = None, + run_type: Optional[str] = None, + run_tags: Optional[object] = None, + run_properties: Optional[object] = None, + **kwargs + ): + super(MachineLearningServicesRunCompletedEventData, self).__init__(**kwargs) + self.experiment_id = experiment_id + self.experiment_name = experiment_name + self.run_id = run_id + self.run_type = run_type + self.run_tags = run_tags + self.run_properties = run_properties + + +class MachineLearningServicesRunStatusChangedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.MachineLearningServices.RunStatusChanged event. + + :param experiment_id: The ID of the experiment that the Machine Learning Run belongs to. + :type experiment_id: str + :param experiment_name: The name of the experiment that the Machine Learning Run belongs to. + :type experiment_name: str + :param run_id: The ID of the Machine Learning Run. + :type run_id: str + :param run_type: The Run Type of the Machine Learning Run. + :type run_type: str + :param run_tags: The tags of the Machine Learning Run. + :type run_tags: object + :param run_properties: The properties of the Machine Learning Run. + :type run_properties: object + :param run_status: The status of the Machine Learning Run. + :type run_status: str + """ + + _attribute_map = { + 'experiment_id': {'key': 'experimentId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_type': {'key': 'runType', 'type': 'str'}, + 'run_tags': {'key': 'runTags', 'type': 'object'}, + 'run_properties': {'key': 'runProperties', 'type': 'object'}, + 'run_status': {'key': 'runStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + experiment_id: Optional[str] = None, + experiment_name: Optional[str] = None, + run_id: Optional[str] = None, + run_type: Optional[str] = None, + run_tags: Optional[object] = None, + run_properties: Optional[object] = None, + run_status: Optional[str] = None, + **kwargs + ): + super(MachineLearningServicesRunStatusChangedEventData, self).__init__(**kwargs) + self.experiment_id = experiment_id + self.experiment_name = experiment_name + self.run_id = run_id + self.run_type = run_type + self.run_tags = run_tags + self.run_properties = run_properties + self.run_status = run_status + + +class MapsGeofenceEventProperties(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Geofence event (GeofenceEntered, GeofenceExited, GeofenceResult). + + :param expired_geofence_geometry_id: Lists of the geometry ID of the geofence which is expired + relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain the coordinate position + or have an overlap with the searchBuffer around the fence. + :type geometries: list[~event_grid_publisher_client.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of the geofence which is + in invalid period relative to the user time in the request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the Azure Maps event + subscriber, false if no event is published to the Azure Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__( + self, + *, + expired_geofence_geometry_id: Optional[List[str]] = None, + geometries: Optional[List["MapsGeofenceGeometry"]] = None, + invalid_period_geofence_geometry_id: Optional[List[str]] = None, + is_event_published: Optional[bool] = None, + **kwargs + ): + super(MapsGeofenceEventProperties, self).__init__(**kwargs) + self.expired_geofence_geometry_id = expired_geofence_geometry_id + self.geometries = geometries + self.invalid_period_geofence_geometry_id = invalid_period_geofence_geometry_id + self.is_event_published = is_event_published + + +class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceEntered event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the geofence which is expired + relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain the coordinate position + or have an overlap with the searchBuffer around the fence. + :type geometries: list[~event_grid_publisher_client.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of the geofence which is + in invalid period relative to the user time in the request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the Azure Maps event + subscriber, false if no event is published to the Azure Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__( + self, + *, + expired_geofence_geometry_id: Optional[List[str]] = None, + geometries: Optional[List["MapsGeofenceGeometry"]] = None, + invalid_period_geofence_geometry_id: Optional[List[str]] = None, + is_event_published: Optional[bool] = None, + **kwargs + ): + super(MapsGeofenceEnteredEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) + + +class MapsGeofenceExitedEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceExited event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the geofence which is expired + relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain the coordinate position + or have an overlap with the searchBuffer around the fence. + :type geometries: list[~event_grid_publisher_client.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of the geofence which is + in invalid period relative to the user time in the request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the Azure Maps event + subscriber, false if no event is published to the Azure Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__( + self, + *, + expired_geofence_geometry_id: Optional[List[str]] = None, + geometries: Optional[List["MapsGeofenceGeometry"]] = None, + invalid_period_geofence_geometry_id: Optional[List[str]] = None, + is_event_published: Optional[bool] = None, + **kwargs + ): + super(MapsGeofenceExitedEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) + + +class MapsGeofenceGeometry(msrest.serialization.Model): + """The geofence geometry. + + :param device_id: ID of the device. + :type device_id: str + :param distance: Distance from the coordinate to the closest border of the geofence. Positive + means the coordinate is outside of the geofence. If the coordinate is outside of the geofence, + but more than the value of searchBuffer away from the closest geofence border, then the value + is 999. Negative means the coordinate is inside of the geofence. If the coordinate is inside + the polygon, but more than the value of searchBuffer away from the closest geofencing + border,then the value is -999. A value of 999 means that there is great confidence the + coordinate is well outside the geofence. A value of -999 means that there is great confidence + the coordinate is well within the geofence. + :type distance: float + :param geometry_id: The unique ID for the geofence geometry. + :type geometry_id: str + :param nearest_lat: Latitude of the nearest point of the geometry. + :type nearest_lat: float + :param nearest_lon: Longitude of the nearest point of the geometry. + :type nearest_lon: float + :param ud_id: The unique id returned from user upload service when uploading a geofence. Will + not be included in geofencing post API. + :type ud_id: str + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'distance': {'key': 'distance', 'type': 'float'}, + 'geometry_id': {'key': 'geometryId', 'type': 'str'}, + 'nearest_lat': {'key': 'nearestLat', 'type': 'float'}, + 'nearest_lon': {'key': 'nearestLon', 'type': 'float'}, + 'ud_id': {'key': 'udId', 'type': 'str'}, + } + + def __init__( + self, + *, + device_id: Optional[str] = None, + distance: Optional[float] = None, + geometry_id: Optional[str] = None, + nearest_lat: Optional[float] = None, + nearest_lon: Optional[float] = None, + ud_id: Optional[str] = None, + **kwargs + ): + super(MapsGeofenceGeometry, self).__init__(**kwargs) + self.device_id = device_id + self.distance = distance + self.geometry_id = geometry_id + self.nearest_lat = nearest_lat + self.nearest_lon = nearest_lon + self.ud_id = ud_id + + +class MapsGeofenceResultEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceResult event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the geofence which is expired + relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain the coordinate position + or have an overlap with the searchBuffer around the fence. + :type geometries: list[~event_grid_publisher_client.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of the geofence which is + in invalid period relative to the user time in the request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the Azure Maps event + subscriber, false if no event is published to the Azure Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__( + self, + *, + expired_geofence_geometry_id: Optional[List[str]] = None, + geometries: Optional[List["MapsGeofenceGeometry"]] = None, + invalid_period_geofence_geometry_id: Optional[List[str]] = None, + is_event_published: Optional[bool] = None, + **kwargs + ): + super(MapsGeofenceResultEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) + + +class MediaJobStateChangeEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None + self.correlation_data = correlation_data + + +class MediaJobCanceledEventData(MediaJobStateChangeEventData): + """Job canceled event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~event_grid_publisher_client.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__( + self, + *, + correlation_data: Optional[Dict[str, str]] = None, + outputs: Optional[List["MediaJobOutput"]] = None, + **kwargs + ): + super(MediaJobCanceledEventData, self).__init__(correlation_data=correlation_data, **kwargs) + self.outputs = outputs + + +class MediaJobCancelingEventData(MediaJobStateChangeEventData): + """Job canceling event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobCancelingEventData, self).__init__(correlation_data=correlation_data, **kwargs) + + +class MediaJobError(msrest.serialization.Model): + """Details of JobOutput errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code describing the error. Possible values include: "ServiceError", + "ServiceTransientError", "DownloadNotAccessible", "DownloadTransientError", + "UploadNotAccessible", "UploadTransientError", "ConfigurationUnsupported", "ContentMalformed", + "ContentUnsupported". + :vartype code: str or ~event_grid_publisher_client.models.MediaJobErrorCode + :ivar message: A human-readable language-dependent representation of the error. + :vartype message: str + :ivar category: Helps with categorization of errors. Possible values include: "Service", + "Download", "Upload", "Configuration", "Content". + :vartype category: str or ~event_grid_publisher_client.models.MediaJobErrorCategory + :ivar retry: Indicates that it may be possible to retry the Job. If retry is unsuccessful, + please contact Azure support via Azure Portal. Possible values include: "DoNotRetry", + "MayRetry". + :vartype retry: str or ~event_grid_publisher_client.models.MediaJobRetry + :ivar details: An array of details about specific errors that led to this reported error. + :vartype details: list[~event_grid_publisher_client.models.MediaJobErrorDetail] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'category': {'readonly': True}, + 'retry': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'retry': {'key': 'retry', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[MediaJobErrorDetail]'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobError, self).__init__(**kwargs) + self.code = None + self.message = None + self.category = None + self.retry = None + self.details = None + + +class MediaJobErrorDetail(msrest.serialization.Model): + """Details of JobOutput errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Code describing the error detail. + :vartype code: str + :ivar message: A human-readable representation of the error. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaJobErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + + +class MediaJobErroredEventData(MediaJobStateChangeEventData): + """Job error state event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~event_grid_publisher_client.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__( + self, + *, + correlation_data: Optional[Dict[str, str]] = None, + outputs: Optional[List["MediaJobOutput"]] = None, + **kwargs + ): + super(MediaJobErroredEventData, self).__init__(correlation_data=correlation_data, **kwargs) + self.outputs = outputs + + +class MediaJobFinishedEventData(MediaJobStateChangeEventData): + """Job finished event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~event_grid_publisher_client.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__( + self, + *, + correlation_data: Optional[Dict[str, str]] = None, + outputs: Optional[List["MediaJobOutput"]] = None, + **kwargs + ): + super(MediaJobFinishedEventData, self).__init__(correlation_data=correlation_data, **kwargs) + self.outputs = outputs + + +class MediaJobOutput(msrest.serialization.Model): + """The event data for a Job output. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaJobOutputAsset. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: The discriminator for derived types.Constant filled by server. + :type odata_type: str + :param error: Gets the Job output error. + :type error: ~event_grid_publisher_client.models.MediaJobError + :param label: Gets the Job output label. + :type label: str + :param progress: Required. Gets the Job output progress. + :type progress: long + :param state: Required. Gets the Job output state. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :type state: str or ~event_grid_publisher_client.models.MediaJobState + """ + + _validation = { + 'progress': {'required': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'MediaJobError'}, + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'#Microsoft.Media.JobOutputAsset': 'MediaJobOutputAsset'} + } + + def __init__( + self, + *, + progress: int, + state: Union[str, "MediaJobState"], + error: Optional["MediaJobError"] = None, + label: Optional[str] = None, + **kwargs + ): + super(MediaJobOutput, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.error = error + self.label = label + self.progress = progress + self.state = state + + +class MediaJobOutputAsset(MediaJobOutput): + """The event data for a Job output asset. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: The discriminator for derived types.Constant filled by server. + :type odata_type: str + :param error: Gets the Job output error. + :type error: ~event_grid_publisher_client.models.MediaJobError + :param label: Gets the Job output label. + :type label: str + :param progress: Required. Gets the Job output progress. + :type progress: long + :param state: Required. Gets the Job output state. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :type state: str or ~event_grid_publisher_client.models.MediaJobState + :param asset_name: Gets the Job output asset name. + :type asset_name: str + """ + + _validation = { + 'progress': {'required': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'MediaJobError'}, + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'asset_name': {'key': 'assetName', 'type': 'str'}, + } + + def __init__( + self, + *, + progress: int, + state: Union[str, "MediaJobState"], + error: Optional["MediaJobError"] = None, + label: Optional[str] = None, + asset_name: Optional[str] = None, + **kwargs + ): + super(MediaJobOutputAsset, self).__init__(error=error, label=label, progress=progress, state=state, **kwargs) + self.odata_type = '#Microsoft.Media.JobOutputAsset' # type: str + self.asset_name = asset_name + + +class MediaJobOutputStateChangeEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobOutputStateChange event. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + output: Optional["MediaJobOutput"] = None, + job_correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobOutputStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.output = output + self.job_correlation_data = job_correlation_data + + +class MediaJobOutputCanceledEventData(MediaJobOutputStateChangeEventData): + """Job output canceled event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + output: Optional["MediaJobOutput"] = None, + job_correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobOutputCanceledEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputCancelingEventData(MediaJobOutputStateChangeEventData): + """Job output canceling event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + output: Optional["MediaJobOutput"] = None, + job_correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobOutputCancelingEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputErroredEventData(MediaJobOutputStateChangeEventData): + """Job output error event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + output: Optional["MediaJobOutput"] = None, + job_correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobOutputErroredEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputFinishedEventData(MediaJobOutputStateChangeEventData): + """Job output finished event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + output: Optional["MediaJobOutput"] = None, + job_correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobOutputFinishedEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputProcessingEventData(MediaJobOutputStateChangeEventData): + """Job output processing event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + output: Optional["MediaJobOutput"] = None, + job_correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobOutputProcessingEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputProgressEventData(msrest.serialization.Model): + """Job Output Progress Event Data. + + :param label: Gets the Job output label. + :type label: str + :param progress: Gets the Job output progress. + :type progress: long + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _attribute_map = { + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + label: Optional[str] = None, + progress: Optional[int] = None, + job_correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobOutputProgressEventData, self).__init__(**kwargs) + self.label = label + self.progress = progress + self.job_correlation_data = job_correlation_data + + +class MediaJobOutputScheduledEventData(MediaJobOutputStateChangeEventData): + """Job output scheduled event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :param output: Gets the output. + :type output: ~event_grid_publisher_client.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + output: Optional["MediaJobOutput"] = None, + job_correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobOutputScheduledEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobProcessingEventData(MediaJobStateChangeEventData): + """Job processing event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobProcessingEventData, self).__init__(correlation_data=correlation_data, **kwargs) + + +class MediaJobScheduledEventData(MediaJobStateChangeEventData): + """Job scheduled event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar previous_state: The previous state of the Job. Possible values include: "Canceled", + "Canceling", "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype previous_state: str or ~event_grid_publisher_client.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: "Canceled", "Canceling", + "Error", "Finished", "Processing", "Queued", "Scheduled". + :vartype state: str or ~event_grid_publisher_client.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__( + self, + *, + correlation_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MediaJobScheduledEventData, self).__init__(correlation_data=correlation_data, **kwargs) + + +class MediaLiveEventConnectionRejectedEventData(msrest.serialization.Model): + """Encoder connection rejected event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar result_code: Gets the result code. + :vartype result_code: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'result_code': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventConnectionRejectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + self.result_code = None + + +class MediaLiveEventEncoderConnectedEventData(msrest.serialization.Model): + """Encoder connect event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventEncoderConnectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + + +class MediaLiveEventEncoderDisconnectedEventData(msrest.serialization.Model): + """Encoder disconnected event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar result_code: Gets the result code. + :vartype result_code: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'result_code': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventEncoderDisconnectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + self.result_code = None + + +class MediaLiveEventIncomingDataChunkDroppedEventData(msrest.serialization.Model): + """Ingest fragment dropped event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar timestamp: Gets the timestamp of the data chunk dropped. + :vartype timestamp: str + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar timescale: Gets the timescale of the Timestamp. + :vartype timescale: str + :ivar result_code: Gets the result code for fragment drop operation. + :vartype result_code: str + :ivar track_name: Gets the name of the track for which fragment is dropped. + :vartype track_name: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'track_type': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'timescale': {'readonly': True}, + 'result_code': {'readonly': True}, + 'track_name': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIncomingDataChunkDroppedEventData, self).__init__(**kwargs) + self.timestamp = None + self.track_type = None + self.bitrate = None + self.timescale = None + self.result_code = None + self.track_name = None + + +class MediaLiveEventIncomingStreamReceivedEventData(msrest.serialization.Model): + """Encoder connect event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar timestamp: Gets the first timestamp of the data chunk received. + :vartype timestamp: str + :ivar duration: Gets the duration of the first data chunk. + :vartype duration: str + :ivar timescale: Gets the timescale in which timestamp is represented. + :vartype timescale: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'duration': {'readonly': True}, + 'timescale': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIncomingStreamReceivedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.track_type = None + self.track_name = None + self.bitrate = None + self.encoder_ip = None + self.encoder_port = None + self.timestamp = None + self.duration = None + self.timescale = None + + +class MediaLiveEventIncomingStreamsOutOfSyncEventData(msrest.serialization.Model): + """Incoming streams out of sync event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar min_last_timestamp: Gets the minimum last timestamp received. + :vartype min_last_timestamp: str + :ivar type_of_stream_with_min_last_timestamp: Gets the type of stream with minimum last + timestamp. + :vartype type_of_stream_with_min_last_timestamp: str + :ivar max_last_timestamp: Gets the maximum timestamp among all the tracks (audio or video). + :vartype max_last_timestamp: str + :ivar type_of_stream_with_max_last_timestamp: Gets the type of stream with maximum last + timestamp. + :vartype type_of_stream_with_max_last_timestamp: str + :ivar timescale_of_min_last_timestamp: Gets the timescale in which "MinLastTimestamp" is + represented. + :vartype timescale_of_min_last_timestamp: str + :ivar timescale_of_max_last_timestamp: Gets the timescale in which "MaxLastTimestamp" is + represented. + :vartype timescale_of_max_last_timestamp: str + """ + + _validation = { + 'min_last_timestamp': {'readonly': True}, + 'type_of_stream_with_min_last_timestamp': {'readonly': True}, + 'max_last_timestamp': {'readonly': True}, + 'type_of_stream_with_max_last_timestamp': {'readonly': True}, + 'timescale_of_min_last_timestamp': {'readonly': True}, + 'timescale_of_max_last_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'min_last_timestamp': {'key': 'minLastTimestamp', 'type': 'str'}, + 'type_of_stream_with_min_last_timestamp': {'key': 'typeOfStreamWithMinLastTimestamp', 'type': 'str'}, + 'max_last_timestamp': {'key': 'maxLastTimestamp', 'type': 'str'}, + 'type_of_stream_with_max_last_timestamp': {'key': 'typeOfStreamWithMaxLastTimestamp', 'type': 'str'}, + 'timescale_of_min_last_timestamp': {'key': 'timescaleOfMinLastTimestamp', 'type': 'str'}, + 'timescale_of_max_last_timestamp': {'key': 'timescaleOfMaxLastTimestamp', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIncomingStreamsOutOfSyncEventData, self).__init__(**kwargs) + self.min_last_timestamp = None + self.type_of_stream_with_min_last_timestamp = None + self.max_last_timestamp = None + self.type_of_stream_with_max_last_timestamp = None + self.timescale_of_min_last_timestamp = None + self.timescale_of_max_last_timestamp = None + + +class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(msrest.serialization.Model): + """Incoming video stream out of synch event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar first_timestamp: Gets the first timestamp received for one of the quality levels. + :vartype first_timestamp: str + :ivar first_duration: Gets the duration of the data chunk with first timestamp. + :vartype first_duration: str + :ivar second_timestamp: Gets the timestamp received for some other quality levels. + :vartype second_timestamp: str + :ivar second_duration: Gets the duration of the data chunk with second timestamp. + :vartype second_duration: str + :ivar timescale: Gets the timescale in which both the timestamps and durations are represented. + :vartype timescale: str + """ + + _validation = { + 'first_timestamp': {'readonly': True}, + 'first_duration': {'readonly': True}, + 'second_timestamp': {'readonly': True}, + 'second_duration': {'readonly': True}, + 'timescale': {'readonly': True}, + } + + _attribute_map = { + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'first_duration': {'key': 'firstDuration', 'type': 'str'}, + 'second_timestamp': {'key': 'secondTimestamp', 'type': 'str'}, + 'second_duration': {'key': 'secondDuration', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, self).__init__(**kwargs) + self.first_timestamp = None + self.first_duration = None + self.second_timestamp = None + self.second_duration = None + self.timescale = None + + +class MediaLiveEventIngestHeartbeatEventData(msrest.serialization.Model): + """Ingest fragment dropped event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar incoming_bitrate: Gets the incoming bitrate. + :vartype incoming_bitrate: long + :ivar last_timestamp: Gets the last timestamp. + :vartype last_timestamp: str + :ivar timescale: Gets the timescale of the last timestamp. + :vartype timescale: str + :ivar overlap_count: Gets the fragment Overlap count. + :vartype overlap_count: long + :ivar discontinuity_count: Gets the fragment Discontinuity count. + :vartype discontinuity_count: long + :ivar nonincreasing_count: Gets Non increasing count. + :vartype nonincreasing_count: long + :ivar unexpected_bitrate: Gets a value indicating whether unexpected bitrate is present or not. + :vartype unexpected_bitrate: bool + :ivar state: Gets the state of the live event. + :vartype state: str + :ivar healthy: Gets a value indicating whether preview is healthy or not. + :vartype healthy: bool + """ + + _validation = { + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'incoming_bitrate': {'readonly': True}, + 'last_timestamp': {'readonly': True}, + 'timescale': {'readonly': True}, + 'overlap_count': {'readonly': True}, + 'discontinuity_count': {'readonly': True}, + 'nonincreasing_count': {'readonly': True}, + 'unexpected_bitrate': {'readonly': True}, + 'state': {'readonly': True}, + 'healthy': {'readonly': True}, + } + + _attribute_map = { + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'incoming_bitrate': {'key': 'incomingBitrate', 'type': 'long'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'overlap_count': {'key': 'overlapCount', 'type': 'long'}, + 'discontinuity_count': {'key': 'discontinuityCount', 'type': 'long'}, + 'nonincreasing_count': {'key': 'nonincreasingCount', 'type': 'long'}, + 'unexpected_bitrate': {'key': 'unexpectedBitrate', 'type': 'bool'}, + 'state': {'key': 'state', 'type': 'str'}, + 'healthy': {'key': 'healthy', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventIngestHeartbeatEventData, self).__init__(**kwargs) + self.track_type = None + self.track_name = None + self.bitrate = None + self.incoming_bitrate = None + self.last_timestamp = None + self.timescale = None + self.overlap_count = None + self.discontinuity_count = None + self.nonincreasing_count = None + self.unexpected_bitrate = None + self.state = None + self.healthy = None + + +class MediaLiveEventTrackDiscontinuityDetectedEventData(msrest.serialization.Model): + """Ingest track discontinuity detected event data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate. + :vartype bitrate: long + :ivar previous_timestamp: Gets the timestamp of the previous fragment. + :vartype previous_timestamp: str + :ivar new_timestamp: Gets the timestamp of the current fragment. + :vartype new_timestamp: str + :ivar timescale: Gets the timescale in which both timestamps and discontinuity gap are + represented. + :vartype timescale: str + :ivar discontinuity_gap: Gets the discontinuity gap between PreviousTimestamp and NewTimestamp. + :vartype discontinuity_gap: str + """ + + _validation = { + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'previous_timestamp': {'readonly': True}, + 'new_timestamp': {'readonly': True}, + 'timescale': {'readonly': True}, + 'discontinuity_gap': {'readonly': True}, + } + + _attribute_map = { + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'previous_timestamp': {'key': 'previousTimestamp', 'type': 'str'}, + 'new_timestamp': {'key': 'newTimestamp', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'discontinuity_gap': {'key': 'discontinuityGap', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaLiveEventTrackDiscontinuityDetectedEventData, self).__init__(**kwargs) + self.track_type = None + self.track_name = None + self.bitrate = None + self.previous_timestamp = None + self.new_timestamp = None + self.timescale = None + self.discontinuity_gap = None + + +class RedisExportRDBCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Cache.ExportRDBCompleted event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param name: The name of this event. + :type name: str + :param status: The status of this event. Failed or succeeded. + :type status: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + name: Optional[str] = None, + status: Optional[str] = None, + **kwargs + ): + super(RedisExportRDBCompletedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.name = name + self.status = status + + +class RedisImportRDBCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Cache.ImportRDBCompleted event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param name: The name of this event. + :type name: str + :param status: The status of this event. Failed or succeeded. + :type status: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + name: Optional[str] = None, + status: Optional[str] = None, + **kwargs + ): + super(RedisImportRDBCompletedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.name = name + self.status = status + + +class RedisPatchingCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Cache.PatchingCompleted event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param name: The name of this event. + :type name: str + :param status: The status of this event. Failed or succeeded. + :type status: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + name: Optional[str] = None, + status: Optional[str] = None, + **kwargs + ): + super(RedisPatchingCompletedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.name = name + self.status = status + + +class RedisScalingCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Cache.ScalingCompleted event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param name: The name of this event. + :type name: str + :param status: The status of this event. Failed or succeeded. + :type status: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + name: Optional[str] = None, + status: Optional[str] = None, + **kwargs + ): + super(RedisScalingCompletedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.name = name + self.status = status + + +class ResourceActionCancelData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Resources.ResourceActionCancel event. This is raised when a resource action operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceActionCancelData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceActionFailureData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionFailure event. This is raised when a resource action operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceActionFailureData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceActionSuccessData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionSuccess event. This is raised when a resource action operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceActionSuccessData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceDeleteCancelData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Resources.ResourceDeleteCancel event. This is raised when a resource delete operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceDeleteCancelData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceDeleteFailureData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteFailure event. This is raised when a resource delete operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceDeleteFailureData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceDeleteSuccessData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a resource delete operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceDeleteSuccessData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceWriteCancelData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteCancel event. This is raised when a resource create or update operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceWriteCancelData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceWriteFailureData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteFailure event. This is raised when a resource create or update operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceWriteFailureData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceWriteSuccessData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteSuccess event. This is raised when a resource create or update operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + resource_provider: Optional[str] = None, + resource_uri: Optional[str] = None, + operation_name: Optional[str] = None, + status: Optional[str] = None, + authorization: Optional[str] = None, + claims: Optional[str] = None, + correlation_id: Optional[str] = None, + http_request: Optional[str] = None, + **kwargs + ): + super(ResourceWriteSuccessData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ServiceBusActiveMessagesAvailableWithNoListenersEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. Could be one of + 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the entity type is of type + 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the entity type is of type + 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's subscription. If the + entity type is of type 'queue', then this value will be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__( + self, + *, + namespace_name: Optional[str] = None, + request_uri: Optional[str] = None, + entity_type: Optional[str] = None, + queue_name: Optional[str] = None, + topic_name: Optional[str] = None, + subscription_name: Optional[str] = None, + **kwargs + ): + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name + + +class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. Could be one of + 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the entity type is of type + 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the entity type is of type + 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's subscription. If the + entity type is of type 'queue', then this value will be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__( + self, + *, + namespace_name: Optional[str] = None, + request_uri: Optional[str] = None, + entity_type: Optional[str] = None, + queue_name: Optional[str] = None, + topic_name: Optional[str] = None, + subscription_name: Optional[str] = None, + **kwargs + ): + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name + + +class SignalRServiceClientConnectionConnectedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionConnected event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param hub_name: The hub of connected client connection. + :type hub_name: str + :param connection_id: The connection Id of connected client connection. + :type connection_id: str + :param user_id: The user Id of connected client connection. + :type user_id: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + hub_name: Optional[str] = None, + connection_id: Optional[str] = None, + user_id: Optional[str] = None, + **kwargs + ): + super(SignalRServiceClientConnectionConnectedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.hub_name = hub_name + self.connection_id = connection_id + self.user_id = user_id + + +class SignalRServiceClientConnectionDisconnectedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionDisconnected event. + + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param hub_name: The hub of connected client connection. + :type hub_name: str + :param connection_id: The connection Id of connected client connection. + :type connection_id: str + :param user_id: The user Id of connected client connection. + :type user_id: str + :param error_message: The message of error that cause the client connection disconnected. + :type error_message: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + hub_name: Optional[str] = None, + connection_id: Optional[str] = None, + user_id: Optional[str] = None, + error_message: Optional[str] = None, + **kwargs + ): + super(SignalRServiceClientConnectionDisconnectedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.hub_name = hub_name + self.connection_id = connection_id + self.user_id = user_id + self.error_message = error_message + + +class SMSDeliveryAttemptProperties(msrest.serialization.Model): + """Schema for details of a delivery attempt. + + :param timestamp: TimeStamp when delivery was attempted. + :type timestamp: ~datetime.datetime + :param segments_succeeded: Number of segments that were successfully delivered. + :type segments_succeeded: int + :param segments_failed: Number of segments whose delivery failed. + :type segments_failed: int + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'segments_succeeded': {'key': 'segmentsSucceeded', 'type': 'int'}, + 'segments_failed': {'key': 'segmentsFailed', 'type': 'int'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + segments_succeeded: Optional[int] = None, + segments_failed: Optional[int] = None, + **kwargs + ): + super(SMSDeliveryAttemptProperties, self).__init__(**kwargs) + self.timestamp = timestamp + self.segments_succeeded = segments_succeeded + self.segments_failed = segments_failed + + +class SMSEventBaseProperties(msrest.serialization.Model): + """Schema of common properties of all SMS events. + + :param message_id: The identity of the SMS message. + :type message_id: str + :param from_property: The identity of SMS message sender. + :type from_property: str + :param to: The identity of SMS message receiver. + :type to: str + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'from_property': {'key': 'from', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'str'}, + } + + def __init__( + self, + *, + message_id: Optional[str] = None, + from_property: Optional[str] = None, + to: Optional[str] = None, + **kwargs + ): + super(SMSEventBaseProperties, self).__init__(**kwargs) + self.message_id = message_id + self.from_property = from_property + self.to = to + + +class SMSDeliveryReportReceivedEventData(SMSEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.SMSDeliveryReportReceived event. + + :param message_id: The identity of the SMS message. + :type message_id: str + :param from_property: The identity of SMS message sender. + :type from_property: str + :param to: The identity of SMS message receiver. + :type to: str + :param delivery_status: Status of Delivery. + :type delivery_status: str + :param delivery_status_details: Details about Delivery Status. + :type delivery_status_details: str + :param delivery_attempts: List of details of delivery attempts made. + :type delivery_attempts: list[~event_grid_publisher_client.models.SMSDeliveryAttemptProperties] + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'from_property': {'key': 'from', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'str'}, + 'delivery_status': {'key': 'deliveryStatus', 'type': 'str'}, + 'delivery_status_details': {'key': 'deliveryStatusDetails', 'type': 'str'}, + 'delivery_attempts': {'key': 'deliveryAttempts', 'type': '[SMSDeliveryAttemptProperties]'}, + } + + def __init__( + self, + *, + message_id: Optional[str] = None, + from_property: Optional[str] = None, + to: Optional[str] = None, + delivery_status: Optional[str] = None, + delivery_status_details: Optional[str] = None, + delivery_attempts: Optional[List["SMSDeliveryAttemptProperties"]] = None, + **kwargs + ): + super(SMSDeliveryReportReceivedEventData, self).__init__(message_id=message_id, from_property=from_property, to=to, **kwargs) + self.delivery_status = delivery_status + self.delivery_status_details = delivery_status_details + self.delivery_attempts = delivery_attempts + + +class SMSReceivedEventData(SMSEventBaseProperties): + """Schema of the Data property of an EventGridEvent for an Microsoft.Communication.SMSReceived event. + + :param message_id: The identity of the SMS message. + :type message_id: str + :param from_property: The identity of SMS message sender. + :type from_property: str + :param to: The identity of SMS message receiver. + :type to: str + :param message: The SMS content. + :type message: str + :param received_timestamp: The time at which the SMS was received. + :type received_timestamp: ~datetime.datetime + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'from_property': {'key': 'from', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'received_timestamp': {'key': 'receivedTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + message_id: Optional[str] = None, + from_property: Optional[str] = None, + to: Optional[str] = None, + message: Optional[str] = None, + received_timestamp: Optional[datetime.datetime] = None, + **kwargs + ): + super(SMSReceivedEventData, self).__init__(message_id=message_id, from_property=from_property, to=to, **kwargs) + self.message = message + self.received_timestamp = received_timestamp + + +class StorageBlobCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobCreated event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the Storage service for the storage API + operation that triggered this event. + :type request_id: str + :param e_tag: The etag of the blob at the time this event was triggered. + :type e_tag: str + :param content_type: The content type of the blob. This is the same as what would be returned + in the Content-Type header from the blob. + :type content_type: str + :param content_length: The size of the blob in bytes. This is the same as what would be + returned in the Content-Length header from the blob. + :type content_length: long + :param content_offset: The offset of the blob in bytes. + :type content_offset: long + :param blob_type: The type of blob. + :type blob_type: str + :param url: The path to the blob. + :type url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular blob name. Users can use standard string comparison to understand the relative + sequence of two events on the same blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_length': {'key': 'contentLength', 'type': 'long'}, + 'content_offset': {'key': 'contentOffset', 'type': 'long'}, + 'blob_type': {'key': 'blobType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + *, + api: Optional[str] = None, + client_request_id: Optional[str] = None, + request_id: Optional[str] = None, + e_tag: Optional[str] = None, + content_type: Optional[str] = None, + content_length: Optional[int] = None, + content_offset: Optional[int] = None, + blob_type: Optional[str] = None, + url: Optional[str] = None, + sequencer: Optional[str] = None, + identity: Optional[str] = None, + storage_diagnostics: Optional[object] = None, + **kwargs + ): + super(StorageBlobCreatedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.e_tag = e_tag + self.content_type = content_type + self.content_length = content_length + self.content_offset = content_offset + self.blob_type = blob_type + self.url = url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageBlobDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobDeleted event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the Storage service for the storage API + operation that triggered this event. + :type request_id: str + :param content_type: The content type of the blob. This is the same as what would be returned + in the Content-Type header from the blob. + :type content_type: str + :param blob_type: The type of blob. + :type blob_type: str + :param url: The path to the blob. + :type url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular blob name. Users can use standard string comparison to understand the relative + sequence of two events on the same blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'blob_type': {'key': 'blobType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + *, + api: Optional[str] = None, + client_request_id: Optional[str] = None, + request_id: Optional[str] = None, + content_type: Optional[str] = None, + blob_type: Optional[str] = None, + url: Optional[str] = None, + sequencer: Optional[str] = None, + identity: Optional[str] = None, + storage_diagnostics: Optional[object] = None, + **kwargs + ): + super(StorageBlobDeletedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.content_type = content_type + self.blob_type = blob_type + self.url = url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageBlobRenamedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobRenamed event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the storage API + operation that triggered this event. + :type request_id: str + :param source_url: The path to the blob that was renamed. + :type source_url: str + :param destination_url: The new path to the blob after the rename operation. + :type destination_url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular blob name. Users can use standard string comparison to understand the relative + sequence of two events on the same blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'source_url': {'key': 'sourceUrl', 'type': 'str'}, + 'destination_url': {'key': 'destinationUrl', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + *, + api: Optional[str] = None, + client_request_id: Optional[str] = None, + request_id: Optional[str] = None, + source_url: Optional[str] = None, + destination_url: Optional[str] = None, + sequencer: Optional[str] = None, + identity: Optional[str] = None, + storage_diagnostics: Optional[object] = None, + **kwargs + ): + super(StorageBlobRenamedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.source_url = source_url + self.destination_url = destination_url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageDirectoryCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.DirectoryCreated event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the storage API + operation that triggered this event. + :type request_id: str + :param e_tag: The etag of the directory at the time this event was triggered. + :type e_tag: str + :param url: The path to the directory. + :type url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular directory name. Users can use standard string comparison to understand the relative + sequence of two events on the same directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + *, + api: Optional[str] = None, + client_request_id: Optional[str] = None, + request_id: Optional[str] = None, + e_tag: Optional[str] = None, + url: Optional[str] = None, + sequencer: Optional[str] = None, + identity: Optional[str] = None, + storage_diagnostics: Optional[object] = None, + **kwargs + ): + super(StorageDirectoryCreatedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.e_tag = e_tag + self.url = url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageDirectoryDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.DirectoryDeleted event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the storage API + operation that triggered this event. + :type request_id: str + :param url: The path to the deleted directory. + :type url: str + :param recursive: Is this event for a recursive delete operation. + :type recursive: bool + :param sequencer: An opaque string value representing the logical sequence of events for any + particular directory name. Users can use standard string comparison to understand the relative + sequence of two events on the same directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'bool'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + *, + api: Optional[str] = None, + client_request_id: Optional[str] = None, + request_id: Optional[str] = None, + url: Optional[str] = None, + recursive: Optional[bool] = None, + sequencer: Optional[str] = None, + identity: Optional[str] = None, + storage_diagnostics: Optional[object] = None, + **kwargs + ): + super(StorageDirectoryDeletedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.url = url + self.recursive = recursive + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageDirectoryRenamedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.DirectoryRenamed event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the storage API operation that + triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the storage API + operation that triggered this event. + :type request_id: str + :param source_url: The path to the directory that was renamed. + :type source_url: str + :param destination_url: The new path to the directory after the rename operation. + :type destination_url: str + :param sequencer: An opaque string value representing the logical sequence of events for any + particular directory name. Users can use standard string comparison to understand the relative + sequence of two events on the same directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data occasionally included by the + Azure Storage service. This property should be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'source_url': {'key': 'sourceUrl', 'type': 'str'}, + 'destination_url': {'key': 'destinationUrl', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__( + self, + *, + api: Optional[str] = None, + client_request_id: Optional[str] = None, + request_id: Optional[str] = None, + source_url: Optional[str] = None, + destination_url: Optional[str] = None, + sequencer: Optional[str] = None, + identity: Optional[str] = None, + storage_diagnostics: Optional[object] = None, + **kwargs + ): + super(StorageDirectoryRenamedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.source_url = source_url + self.destination_url = destination_url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageLifecyclePolicyActionSummaryDetail(msrest.serialization.Model): + """Execution statistics of a specific policy action in a Blob Management cycle. + + :param total_objects_count: Total number of objects to be acted on by this action. + :type total_objects_count: long + :param success_count: Number of success operations of this action. + :type success_count: long + :param error_list: Error messages of this action if any. + :type error_list: str + """ + + _attribute_map = { + 'total_objects_count': {'key': 'totalObjectsCount', 'type': 'long'}, + 'success_count': {'key': 'successCount', 'type': 'long'}, + 'error_list': {'key': 'errorList', 'type': 'str'}, + } + + def __init__( + self, + *, + total_objects_count: Optional[int] = None, + success_count: Optional[int] = None, + error_list: Optional[str] = None, + **kwargs + ): + super(StorageLifecyclePolicyActionSummaryDetail, self).__init__(**kwargs) + self.total_objects_count = total_objects_count + self.success_count = success_count + self.error_list = error_list + + +class StorageLifecyclePolicyCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Storage.LifecyclePolicyCompleted event. + + :param schedule_time: The time the policy task was scheduled. + :type schedule_time: str + :param delete_summary: Execution statistics of a specific policy action in a Blob Management + cycle. + :type delete_summary: + ~event_grid_publisher_client.models.StorageLifecyclePolicyActionSummaryDetail + :param tier_to_cool_summary: Execution statistics of a specific policy action in a Blob + Management cycle. + :type tier_to_cool_summary: + ~event_grid_publisher_client.models.StorageLifecyclePolicyActionSummaryDetail + :param tier_to_archive_summary: Execution statistics of a specific policy action in a Blob + Management cycle. + :type tier_to_archive_summary: + ~event_grid_publisher_client.models.StorageLifecyclePolicyActionSummaryDetail + """ + + _attribute_map = { + 'schedule_time': {'key': 'scheduleTime', 'type': 'str'}, + 'delete_summary': {'key': 'deleteSummary', 'type': 'StorageLifecyclePolicyActionSummaryDetail'}, + 'tier_to_cool_summary': {'key': 'tierToCoolSummary', 'type': 'StorageLifecyclePolicyActionSummaryDetail'}, + 'tier_to_archive_summary': {'key': 'tierToArchiveSummary', 'type': 'StorageLifecyclePolicyActionSummaryDetail'}, + } + + def __init__( + self, + *, + schedule_time: Optional[str] = None, + delete_summary: Optional["StorageLifecyclePolicyActionSummaryDetail"] = None, + tier_to_cool_summary: Optional["StorageLifecyclePolicyActionSummaryDetail"] = None, + tier_to_archive_summary: Optional["StorageLifecyclePolicyActionSummaryDetail"] = None, + **kwargs + ): + super(StorageLifecyclePolicyCompletedEventData, self).__init__(**kwargs) + self.schedule_time = schedule_time + self.delete_summary = delete_summary + self.tier_to_cool_summary = tier_to_cool_summary + self.tier_to_archive_summary = tier_to_archive_summary + + +class SubscriptionDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None + + +class SubscriptionValidationEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to validate an event + subscription. To complete the validation handshake, the subscriber must either respond with + this validation code as part of the validation response, or perform a GET request on the + validationUrl (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid (available starting version + 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond + with the validationCode as part of the validation response, or perform a GET request on the + validationUrl (available starting version 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None + + +class SubscriptionValidationResponse(msrest.serialization.Model): + """To complete an event subscription validation handshake, a subscriber can use either the validationCode or the validationUrl received in a SubscriptionValidationEvent. When the validationCode is used, the SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber to Azure Event Grid + to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__( + self, + *, + validation_response: Optional[str] = None, + **kwargs + ): + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = validation_response + + +class WebAppServicePlanUpdatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.AppServicePlanUpdated event. + + :param app_service_plan_event_type_detail: Detail of action on the app service plan. + :type app_service_plan_event_type_detail: + ~event_grid_publisher_client.models.AppServicePlanEventTypeDetail + :param sku: sku of app service plan. + :type sku: ~event_grid_publisher_client.models.WebAppServicePlanUpdatedEventDataSku + :param name: name of the app service plan that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the app + service plan API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + app service plan API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the app service plan API + operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_service_plan_event_type_detail': {'key': 'appServicePlanEventTypeDetail', 'type': 'AppServicePlanEventTypeDetail'}, + 'sku': {'key': 'sku', 'type': 'WebAppServicePlanUpdatedEventDataSku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_service_plan_event_type_detail: Optional["AppServicePlanEventTypeDetail"] = None, + sku: Optional["WebAppServicePlanUpdatedEventDataSku"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebAppServicePlanUpdatedEventData, self).__init__(**kwargs) + self.app_service_plan_event_type_detail = app_service_plan_event_type_detail + self.sku = sku + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebAppServicePlanUpdatedEventDataSku(msrest.serialization.Model): + """sku of app service plan. + + :param name: name of app service plan sku. + :type name: str + :param tier: tier of app service plan sku. + :type tier: str + :param size: size of app service plan sku. + :type size: str + :param family: family of app service plan sku. + :type family: str + :param capacity: capacity of app service plan sku. + :type capacity: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'Tier', 'type': 'str'}, + 'size': {'key': 'Size', 'type': 'str'}, + 'family': {'key': 'Family', 'type': 'str'}, + 'capacity': {'key': 'Capacity', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + tier: Optional[str] = None, + size: Optional[str] = None, + family: Optional[str] = None, + capacity: Optional[str] = None, + **kwargs + ): + super(WebAppServicePlanUpdatedEventDataSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class WebAppUpdatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.AppUpdated event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebAppUpdatedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebBackupOperationCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.BackupOperationCompleted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebBackupOperationCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebBackupOperationFailedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.BackupOperationFailed event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebBackupOperationFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebBackupOperationStartedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.BackupOperationStarted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebBackupOperationStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebRestoreOperationCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.RestoreOperationCompleted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebRestoreOperationCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebRestoreOperationFailedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.RestoreOperationFailed event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebRestoreOperationFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebRestoreOperationStartedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.RestoreOperationStarted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebRestoreOperationStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapCompletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapCompleted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebSlotSwapCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapFailedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapFailed event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebSlotSwapFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapStartedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapStarted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebSlotSwapStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapWithPreviewCancelledEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapWithPreviewCancelled event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebSlotSwapWithPreviewCancelledEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapWithPreviewStartedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for an Microsoft.Web.SlotSwapWithPreviewStarted event. + + :param app_event_type_detail: Detail of action on the app. + :type app_event_type_detail: ~event_grid_publisher_client.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app service for the site API + operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the app service for the + site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the site API operation that + triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__( + self, + *, + app_event_type_detail: Optional["AppEventTypeDetail"] = None, + name: Optional[str] = None, + client_request_id: Optional[str] = None, + correlation_request_id: Optional[str] = None, + request_id: Optional[str] = None, + address: Optional[str] = None, + verb: Optional[str] = None, + **kwargs + ): + super(WebSlotSwapWithPreviewStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/operations/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/operations/__init__.py new file mode 100644 index 0000000000000..842b4ec6d7359 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/operations/__init__.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._event_grid_publisher_client_operations import EventGridPublisherClientOperationsMixin + +__all__ = [ + 'EventGridPublisherClientOperationsMixin', +] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/operations/_event_grid_publisher_client_operations.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/operations/_event_grid_publisher_client_operations.py new file mode 100644 index 0000000000000..2e894cbcd5d5a --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/operations/_event_grid_publisher_client_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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class EventGridPublisherClientOperationsMixin(object): + + def publish_events( + self, + topic_hostname, # type: str + events, # type: List["models.EventGridEvent"] + **kwargs # type: Any + ): + # type: (...) -> None + """Publishes a batch of events to an Azure Event Grid topic. + + :param topic_hostname: The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net. + :type topic_hostname: str + :param events: An array of events to be published to Event Grid. + :type events: list[~event_grid_publisher_client.models.EventGridEvent] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.publish_events.metadata['url'] # type: ignore + path_format_arguments = { + 'topicHostname': self._serialize.url("topic_hostname", topic_hostname, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(events, '[EventGridEvent]') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + publish_events.metadata = {'url': '/api/events'} # type: ignore + + def publish_cloud_event_events( + self, + topic_hostname, # type: str + events, # type: List["models.CloudEvent"] + **kwargs # type: Any + ): + # type: (...) -> None + """Publishes a batch of events to an Azure Event Grid topic. + + :param topic_hostname: The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net. + :type topic_hostname: str + :param events: An array of events to be published to Event Grid. + :type events: list[~event_grid_publisher_client.models.CloudEvent] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-01-01" + content_type = kwargs.pop("content_type", "application/cloudevents-batch+json; charset=utf-8") + + # Construct URL + url = self.publish_cloud_event_events.metadata['url'] # type: ignore + path_format_arguments = { + 'topicHostname': self._serialize.url("topic_hostname", topic_hostname, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(events, '[CloudEvent]') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + publish_cloud_event_events.metadata = {'url': '/api/events'} # type: ignore + + def publish_custom_event_events( + self, + topic_hostname, # type: str + events, # type: List[object] + **kwargs # type: Any + ): + # type: (...) -> None + """Publishes a batch of events to an Azure Event Grid topic. + + :param topic_hostname: The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net. + :type topic_hostname: str + :param events: An array of events to be published to Event Grid. + :type events: list[object] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.publish_custom_event_events.metadata['url'] # type: ignore + path_format_arguments = { + 'topicHostname': self._serialize.url("topic_hostname", topic_hostname, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(events, '[object]') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + publish_custom_event_events.metadata = {'url': '/api/events'} # type: ignore diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/py.typed b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_helpers.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_helpers.py new file mode 100644 index 0000000000000..9443f7e3f698c --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_helpers.py @@ -0,0 +1,81 @@ +import hashlib +import hmac +import base64 +try: + from urllib.parse import quote +except ImportError: + from urllib2 import quote # type: ignore +import datetime + +from azure.core.pipeline.policies import AzureKeyCredentialPolicy +from azure.core.credentials import AzureKeyCredential +from ._shared_access_signature_credential import EventGridSharedAccessSignatureCredential +from ._signature_credential_policy import EventGridSharedAccessSignatureCredentialPolicy +from . import _constants as constants +from ._event_mappings import _event_mappings + +def generate_shared_access_signature(topic_hostname, shared_access_key, expiration_date_utc, **kwargs): + # type: (str, str, datetime.Datetime, Any) -> str + """ Helper method to generate shared access signature given hostname, key, and expiration date. + :param str topic_hostname: The topic endpoint to send the events to. + Similar to .-1.eventgrid.azure.net + :param str shared_access_key: The shared access key to be used for generating the token + :param datetime.datetime expiration_date_utc: The expiration datetime in UTC for the signature. + :param str api_version: The API Version to include in the signature. If not provided, the default API version will be used. + :rtype: str + """ + + full_topic_hostname = _get_full_topic_hostname(topic_hostname) + + full_topic_hostname = "{}?apiVersion={}".format(full_topic_hostname, kwargs.get('api_version', None) or constants.DEFAULT_API_VERSION) + encoded_resource = quote(full_topic_hostname, safe=constants.SAFE_ENCODE) + encoded_expiration_utc = quote(str(expiration_date_utc), safe=constants.SAFE_ENCODE) + + unsigned_sas = "r={}&e={}".format(encoded_resource, encoded_expiration_utc) + signature = quote(_generate_hmac(shared_access_key, unsigned_sas), safe=constants.SAFE_ENCODE) + signed_sas = "{}&s={}".format(unsigned_sas, signature) + return signed_sas + +def _get_topic_hostname_only_fqdn(topic_hostname): + if topic_hostname.startswith('http://'): + raise ValueError("HTTP is not supported. Only HTTPS is supported.") + if topic_hostname.startswith('https://'): + topic_hostname = topic_hostname.replace("https://", "") + if topic_hostname.endswith("/api/events"): + topic_hostname = topic_hostname.replace("/api/events", "") + + return topic_hostname + +def _get_full_topic_hostname(topic_hostname): + if topic_hostname.startswith('http://'): + raise ValueError("HTTP is not supported. Only HTTPS is supported.") + if not topic_hostname.startswith('https://'): + topic_hostname = "https://{}".format(topic_hostname) + if not topic_hostname.endswith("/api/events"): + topic_hostname = "{}/api/events".format(topic_hostname) + + return topic_hostname + +def _generate_hmac(key, message): + decoded_key = base64.b64decode(key) + bytes_message = message.encode('ascii') + hmac_new = hmac.new(decoded_key, bytes_message, hashlib.sha256).digest() + + return base64.b64encode(hmac_new) + +def _get_authentication_policy(credential): + if credential is None: + raise ValueError("Parameter 'self._credential' must not be None.") + if isinstance(credential, AzureKeyCredential): + authentication_policy = AzureKeyCredentialPolicy(credential=credential, name=constants.EVENTGRID_KEY_HEADER) + if isinstance(credential, EventGridSharedAccessSignatureCredential): + authentication_policy = EventGridSharedAccessSignatureCredentialPolicy(credential=credential, name=constants.EVENTGRID_TOKEN_HEADER) + return authentication_policy + +def _is_cloud_event(event): + # type: dict -> bool + required = ('id', 'source', 'specversion', 'type') + try: + return all([_ in event for _ in required]) and event['specversion'] == "1.0" + except TypeError: + return False diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_models.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_models.py new file mode 100644 index 0000000000000..43d3624e672e5 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_models.py @@ -0,0 +1,204 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint:disable=protected-access +from typing import Optional +from msrest.serialization import UTC +import datetime as dt +import uuid +import json +import six +from ._generated import models +from ._generated.models import StorageBlobCreatedEventData, \ + EventGridEvent as InternalEventGridEvent, \ + CloudEvent as InternalCloudEvent +from ._shared.mixins import DictMixin +from ._event_mappings import _event_mappings + + +class EventMixin(object): + """ + Mixin for the event models comprising of some helper methods. + """ + @staticmethod + def _deserialize_data(event, event_type): + """ + Sets the data of the desrialized event to strongly typed event object if event type exists in _event_mappings. + Otherwise, sets it to None. + + :param str event_type: The event_type of the EventGridEvent object or the type of the CloudEvent object. + """ + # if system event type defined, set event.data to system event object + try: + event.data = (_event_mappings[event_type]).deserialize(event.data) + except KeyError: # else, if custom event, then event.data is dict and should be set to None + event.data = None + + @staticmethod + def _from_json(event, encode): + """ + Load the event into the json + :param dict eventgrid_event: The event to be deserialized. + :type eventgrid_event: Union[str, dict, bytes] + :param str encode: The encoding to be used. Defaults to 'utf-8' + """ + if isinstance(event, six.binary_type): + event = json.loads(event.decode(encode)) + elif isinstance(event, six.string_types): + event = json.loads(event) + return event + + +class CloudEvent(EventMixin): #pylint:disable=too-many-instance-attributes + """Properties of an event published to an Event Grid topic using the CloudEvent 1.0 Schema. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Identifies the context in which an event happened. The combination of id and source must be + unique for each distinct event. If publishing to a domain topic, source must be the domain name. + :type source: str + :param data: Event data specific to the event type. + :type data: object + :param type: Required. Type of event related to the originating occurrence. + :type type: str + :param time: The time (in UTC) the event was generated, in RFC3339 format. + :type time: ~datetime.datetime + :param dataschema: Identifies the schema that data adheres to. + :type dataschema: str + :param datacontenttype: Content type of data value. + :type datacontenttype: str + :param subject: This describes the subject of the event in the context of the event producer + (identified by source). + :type subject: str + :param id: Optional. An identifier for the event. The combination of id and source must be + unique for each distinct event. + :type id: Optional[str] + """ + def __init__(self, source, type, **kwargs): + # type: (str, str, Any) -> None + self.source = source + self.type = type + self.specversion = kwargs.pop("specversion", "1.0") + self.id = kwargs.pop("id", str(uuid.uuid4())) + self.time = kwargs.pop("time", dt.datetime.now(UTC()).isoformat()) + self.data = kwargs.pop("data", None) + self.datacontenttype = kwargs.pop("datacontenttype", None) + self.dataschema = kwargs.pop("dataschema", None) + self.subject = kwargs.pop("subject", None) + self.extensions = {} + self.extensions.update({k:v for k, v in kwargs.pop('extensions', {}).items()}) + + @classmethod + def _from_generated(cls, cloud_event, **kwargs): + generated = InternalCloudEvent.deserialize(cloud_event) + if generated.additional_properties: + extensions = {k:v for k, v in generated.additional_properties.items()} + kwargs.setdefault('extensions', extensions) + return cls( + id=generated.id, + source=generated.source, + type=generated.type, + specversion=generated.specversion, + data=generated.data or generated.data_base64, + time=generated.time, + dataschema=generated.dataschema, + datacontenttype=generated.datacontenttype, + subject=generated.subject, + **kwargs + ) + + def _to_generated(self, **kwargs): + if isinstance(self.data, six.binary_type): + data_base64 = self.data + data = None + else: + data_base64 = None + data = self.data + return InternalCloudEvent( + id=self.id, + source=self.source, + type=self.type, + specversion=self.specversion, + data=data, + data_base64=data_base64, + time=self.time, + dataschema=self.dataschema, + datacontenttype=self.datacontenttype, + subject=self.subject, + additional_properties=self.extensions, + **kwargs + ) + + +class EventGridEvent(InternalEventGridEvent, EventMixin): + """Properties of an event published to an Event Grid topic using the EventGrid Schema. + + 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 topic: The resource path of the event source. If not provided, Event Grid will stamp onto the event. + :type topic: str + :param subject: Required. A resource path relative to the topic path. + :type subject: str + :param data: Event data specific to the event type. + :type data: object + :param event_type: Required. The type of the event that occurred. + :type event_type: str + :ivar metadata_version: The schema version of the event metadata. If provided, must match Event Grid Schema exactly. + If not provided, EventGrid will stamp onto event. + :vartype metadata_version: str + :param data_version: The schema version of the data object. If not provided, will be stamped with an empty value. + :type data_version: str + :param id: Optional. An identifier for the event. The combination of id and source must be + unique for each distinct event. + :type id: Optional[str] + :param event_time: Optional.The time (in UTC) of the event. If not provided, it will be the time (in UTC) the event was generated. + :type event_time: Optional[~datetime.datetime] + """ + + _validation = { + 'id': {'required': True}, + 'subject': {'required': True}, + 'data': {'required': True}, + 'event_type': {'required': True}, + 'event_time': {'required': True}, + 'metadata_version': {'readonly': True}, + 'data_version': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'object'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, + 'data_version': {'key': 'dataVersion', 'type': 'str'}, + } + + def __init__(self, subject, event_type, **kwargs): + # type: (str, str, Any) -> None + kwargs.setdefault('id', uuid.uuid4()) + kwargs.setdefault('subject', subject) + kwargs.setdefault("event_type", event_type) + kwargs.setdefault('event_time', dt.datetime.now(UTC()).isoformat()) + kwargs.setdefault('data', None) + + super(EventGridEvent, self).__init__(**kwargs) + + +class CustomEvent(DictMixin): + """The wrapper class for a CustomEvent, to be used when publishing events. + :param dict args: dict + """ + + def __init__(self, *args, **kwargs): + # type: (Any, Any) -> None + self._update(*args, **kwargs) + + def _update(self, *args, **kwargs): + for k, v in dict(*args, **kwargs).items(): + self[k] = v diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_publisher_client.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_publisher_client.py new file mode 100644 index 0000000000000..44b664ddc4938 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_publisher_client.py @@ -0,0 +1,78 @@ +# +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING, Sequence +import json + +from azure.core import PipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Union, Dict, List + SendType = Union[ + CloudEvent, + EventGridEvent, + CustomEvent, + Dict, + List[CloudEvent], + List[EventGridEvent], + List[CustomEvent], + List[Dict] + ] + +from ._models import CloudEvent, EventGridEvent, CustomEvent +from ._helpers import _get_topic_hostname_only_fqdn, _get_authentication_policy, _is_cloud_event +from ._generated._event_grid_publisher_client import EventGridPublisherClient as EventGridPublisherClientImpl +from . import _constants as constants + + +class EventGridPublisherClient(object): + """EventGrid Python Publisher Client. + + :param str topic_hostname: The topic endpoint to send the events to. + :param credential: The credential object used for authentication which implements SAS key authentication or SAS token authentication. + :type credential: Union[~azure.core.credentials.AzureKeyCredential, azure.eventgrid.EventGridSharedAccessSignatureCredential] + """ + + def __init__(self, topic_hostname, credential, **kwargs): + # type: (str, Union[AzureKeyCredential, EventGridSharedAccessSignatureCredential], Any) -> None + + topic_hostname = _get_topic_hostname_only_fqdn(topic_hostname) + + self._topic_hostname = topic_hostname + auth_policy = _get_authentication_policy(credential) + self._client = EventGridPublisherClientImpl(authentication_policy=auth_policy, **kwargs) + def send(self, events, **kwargs): + # type: (SendType, Any) -> None + """Sends event data to topic hostname specified during client initialization. + + :param events: A list or an instance of CloudEvent/EventGridEvent/CustomEvent to be sent. + :type events: SendType + :keyword str content_type: The type of content to be used to send the events. + Has default value "application/json; charset=utf-8" for EventGridEvents, with "cloudevents-batch+json" for CloudEvents + :rtype: None + :raises: :class:`ValueError`, when events do not follow specified SendType. + """ + if not isinstance(events, list): + events = [events] + + if all(isinstance(e, CloudEvent) for e in events) or all(_is_cloud_event(e) for e in events): + try: + events = [e._to_generated(**kwargs) for e in events] + except AttributeError: + pass # means it's a dictionary + kwargs.setdefault("content_type", "application/cloudevents-batch+json; charset=utf-8") + self._client.publish_cloud_event_events(self._topic_hostname, events, **kwargs) + elif all(isinstance(e, EventGridEvent) for e in events) or all(isinstance(e, dict) for e in events): + kwargs.setdefault("content_type", "application/json; charset=utf-8") + self._client.publish_events(self._topic_hostname, events, **kwargs) + elif all(isinstance(e, CustomEvent) for e in events): + serialized_events = [dict(e) for e in events] + self._client.publish_custom_event_events(self._topic_hostname, serialized_events, **kwargs) + else: + raise ValueError("Event schema is not correct.") diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared/__init__.py new file mode 100644 index 0000000000000..4897306df708a --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared/__init__.py @@ -0,0 +1,8 @@ +# 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. +# -------------------------------------------------------------------------- + +from .mixins import DictMixin +__all__ = ['DictMixin'] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared/mixins.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared/mixins.py new file mode 100644 index 0000000000000..0b24e8edc45cd --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared/mixins.py @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint:disable=protected-access + +class DictMixin(object): + + def __setitem__(self, key, item): + self.__dict__[key] = item + + def __getitem__(self, key): + return self.__dict__[key] + + def __contains__(self, key): + return key in self.__dict__ + + def __repr__(self): + return str(self) + + def __len__(self): + return len(self.keys()) + + def __delitem__(self, key): + self.__dict__[key] = None + + def __eq__(self, other): + """Compare objects by comparing all attributes.""" + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other): + """Compare objects by comparing all attributes.""" + return not self.__eq__(other) + + def __str__(self): + return str({k: v for k, v in self.__dict__.items() if not k.startswith('_')}) + + def has_key(self, k, **kwargs): + return k in self.__dict__ + + def update(self, *args, **kwargs): + return self.__dict__.update(*args, **kwargs) + + def keys(self, **kwargs): + return [k for k in self.__dict__ if not k.startswith('_')] + + def values(self, **kwargs): + return [v for k, v in self.__dict__.items() if not k.startswith('_')] + + def items(self, **kwargs): + return [(k, v) for k, v in self.__dict__.items() if not k.startswith('_')] + + def get(self, key, default=None, **kwargs): + if key in self.__dict__: + return self.__dict__[key] + return default diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared_access_signature_credential.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared_access_signature_credential.py new file mode 100644 index 0000000000000..dece8da69fe1b --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_shared_access_signature_credential.py @@ -0,0 +1,33 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE.txt in the project root for +# license information. +# ------------------------------------------------------------------------- + +class EventGridSharedAccessSignatureCredential(object): + """Creates an instance of an EventGridSharedAccessSignatureCredential for use with a service client. + :param str signature: Signature to use in authentication. + """ + + def __init__(self, signature): + # type: (str) -> None + self._signature = signature + + @property + def signature(self): + # type: () -> str + """ + The value of the signature to be used in authentication. + + :rtype: str + """ + return self._signature + + def update(self, signature): + # type: (str) -> None + """ + Updates the key property value of the signature to be used in authentication. + + :param str signature: Signature to use in authentication. + """ + self._signature = signature diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_signature_credential_policy.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_signature_credential_policy.py new file mode 100644 index 0000000000000..3370595d1d5d6 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_signature_credential_policy.py @@ -0,0 +1,23 @@ +import six + +from azure.core.pipeline.policies import SansIOHTTPPolicy + +class EventGridSharedAccessSignatureCredentialPolicy(SansIOHTTPPolicy): + """Adds a token header for the provided credential. + :param credential: The credential used to authenticate requests. + :type credential: ~azure.eventgrid.EventGridSharedAccessSignatureCredential + :param str name: The name of the token header used for the credential. + :raises: ValueError or TypeError + """ + def __init__(self, credential, name, **kwargs): # pylint: disable=unused-argument + # type: (EventGridSharedAccessSignatureCredential, str, Any) -> None + super(EventGridSharedAccessSignatureCredentialPolicy, self).__init__() + self._credential = credential + if not name: + raise ValueError("name can not be None or empty") + if not isinstance(name, six.string_types): + raise TypeError("name must be a string.") + self._name = name + + def on_request(self, request): + request.http_request.headers[self._name] = self._credential.signature diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py new file mode 100644 index 0000000000000..b24b0b48a5e66 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py @@ -0,0 +1,12 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2.0.0b1" diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/__init__.py new file mode 100644 index 0000000000000..2de020d81e022 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/__init__.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +from ._publisher_client_async import EventGridPublisherClient + +__all__ = ['EventGridPublisherClient'] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py new file mode 100644 index 0000000000000..0cfe1de4693f2 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py @@ -0,0 +1,80 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core import AsyncPipelineClient +from msrest import Deserializer, Serializer + +from .._models import CloudEvent, EventGridEvent, CustomEvent +from .._helpers import _get_topic_hostname_only_fqdn, _get_authentication_policy, _is_cloud_event +from azure.core.pipeline.policies import AzureKeyCredentialPolicy +from azure.core.credentials import AzureKeyCredential +from .._generated.aio import EventGridPublisherClient as EventGridPublisherClientAsync +from .. import _constants as constants + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Union, Dict, List + SendType = Union[ + CloudEvent, + EventGridEvent, + CustomEvent, + Dict, + List[CloudEvent], + List[EventGridEvent], + List[CustomEvent], + List[Dict] + ] + +class EventGridPublisherClient(object): + """Asynchronous EventGrid Python Publisher Client. + + :param str topic_hostname: The topic endpoint to send the events to. + :param credential: The credential object used for authentication which implements SAS key authentication or SAS token authentication. + :type credential: Union[~azure.core.credentials.AzureKeyCredential, azure.eventgrid.EventGridSharedAccessSignatureCredential] + """ + + def __init__(self, topic_hostname, credential, **kwargs): + # type: (str, Union[AzureKeyCredential, EventGridSharedAccessSignatureCredential], Any) -> None + auth_policy = _get_authentication_policy(credential) + self._client = EventGridPublisherClientAsync(authentication_policy=auth_policy, **kwargs) + topic_hostname = _get_topic_hostname_only_fqdn(topic_hostname) + self._topic_hostname = topic_hostname + + + async def send(self, events, **kwargs): + # type: (SendType) -> None + """Sends event data to topic hostname specified during client initialization. + + :param events: A list or an instance of CloudEvent/EventGridEvent/CustomEvent to be sent. + :type events: SendType + :keyword str content_type: The type of content to be used to send the events. + Has default value "application/json; charset=utf-8" for EventGridEvents, with "cloudevents-batch+json" for CloudEvents + :rtype: None + :raises: :class:`ValueError`, when events do not follow specified SendType. + """ + if not isinstance(events, list): + events = [events] + + if all(isinstance(e, CloudEvent) for e in events) or all(_is_cloud_event(e) for e in events): + try: + events = [e._to_generated(**kwargs) for e in events] + except AttributeError: + pass # means it's a dictionary + kwargs.setdefault("content_type", "application/cloudevents-batch+json; charset=utf-8") + await self._client.publish_cloud_event_events(self._topic_hostname, events, **kwargs) + elif all(isinstance(e, EventGridEvent) for e in events) or all(isinstance(e, dict) for e in events): + kwargs.setdefault("content_type", "application/json; charset=utf-8") + await self._client.publish_events(self._topic_hostname, events, **kwargs) + elif all(isinstance(e, CustomEvent) for e in events): + serialized_events = [dict(e) for e in events] + await self._client.publish_custom_event_events(self._topic_hostname, serialized_events, **kwargs) + else: + raise ValueError("Event schema is not correct.") + diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/event_grid_client.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/event_grid_client.py deleted file mode 100644 index cd2878ff4c789..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/event_grid_client.py +++ /dev/null @@ -1,116 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Configuration, Serializer, Deserializer -from .version import VERSION -from msrest.pipeline import ClientRawResponse -from msrest.exceptions import HttpOperationError -from . import models - - -class EventGridClientConfiguration(Configuration): - """Configuration for EventGridClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - """ - - def __init__( - self, credentials): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - base_url = 'https://{topicHostname}' - - super(EventGridClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-eventgrid/{}'.format(VERSION)) - - self.credentials = credentials - - -class EventGridClient(SDKClient): - """EventGrid Client - - :ivar config: Configuration for client. - :vartype config: EventGridClientConfiguration - - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - """ - - def __init__( - self, credentials): - - self.config = EventGridClientConfiguration(credentials) - super(EventGridClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-01-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - - def publish_events( - self, topic_hostname, events, custom_headers=None, raw=False, **operation_config): - """Publishes a batch of events to an Azure Event Grid topic. - - :param topic_hostname: The host name of the topic, e.g. - topic1.westus2-1.eventgrid.azure.net - :type topic_hostname: str - :param events: An array of events to be published to Event Grid. - :type events: list[~azure.eventgrid.models.EventGridEvent] - :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:`HttpOperationError` - """ - # Construct URL - url = self.publish_events.metadata['url'] - path_format_arguments = { - 'topicHostname': self._serialize.url("topic_hostname", topic_hostname, 'str', skip_quote=True) - } - 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['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct body - body_content = self._serialize.body(events, '[EventGridEvent]') - - # 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 [200]: - raise HttpOperationError(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - publish_events.metadata = {'url': '/api/events'} diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py index 30defc1761cae..c89dbc17e927f 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py @@ -1,266 +1,300 @@ # 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. +# Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- -try: - from .storage_blob_created_event_data_py3 import StorageBlobCreatedEventData - from .storage_blob_deleted_event_data_py3 import StorageBlobDeletedEventData - from .event_hub_capture_file_created_event_data_py3 import EventHubCaptureFileCreatedEventData - from .resource_write_success_data_py3 import ResourceWriteSuccessData - from .resource_write_failure_data_py3 import ResourceWriteFailureData - from .resource_write_cancel_data_py3 import ResourceWriteCancelData - from .resource_delete_success_data_py3 import ResourceDeleteSuccessData - from .resource_delete_failure_data_py3 import ResourceDeleteFailureData - from .resource_delete_cancel_data_py3 import ResourceDeleteCancelData - from .resource_action_success_data_py3 import ResourceActionSuccessData - from .resource_action_failure_data_py3 import ResourceActionFailureData - from .resource_action_cancel_data_py3 import ResourceActionCancelData - from .event_grid_event_py3 import EventGridEvent - from .subscription_validation_event_data_py3 import SubscriptionValidationEventData - from .subscription_validation_response_py3 import SubscriptionValidationResponse - from .subscription_deleted_event_data_py3 import SubscriptionDeletedEventData - from .iot_hub_device_created_event_data_py3 import IotHubDeviceCreatedEventData - from .iot_hub_device_deleted_event_data_py3 import IotHubDeviceDeletedEventData - from .iot_hub_device_connected_event_data_py3 import IotHubDeviceConnectedEventData - from .iot_hub_device_disconnected_event_data_py3 import IotHubDeviceDisconnectedEventData - from .iot_hub_device_telemetry_event_data_py3 import IotHubDeviceTelemetryEventData - from .device_twin_metadata_py3 import DeviceTwinMetadata - from .device_twin_properties_py3 import DeviceTwinProperties - from .device_twin_info_properties_py3 import DeviceTwinInfoProperties - from .device_twin_info_x509_thumbprint_py3 import DeviceTwinInfoX509Thumbprint - from .device_twin_info_py3 import DeviceTwinInfo - from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties - from .device_connection_state_event_info_py3 import DeviceConnectionStateEventInfo - from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties - from .device_telemetry_event_properties_py3 import DeviceTelemetryEventProperties - from .container_registry_image_pushed_event_data_py3 import ContainerRegistryImagePushedEventData - from .container_registry_image_deleted_event_data_py3 import ContainerRegistryImageDeletedEventData - from .container_registry_chart_pushed_event_data_py3 import ContainerRegistryChartPushedEventData - from .container_registry_chart_deleted_event_data_py3 import ContainerRegistryChartDeletedEventData - from .container_registry_event_target_py3 import ContainerRegistryEventTarget - from .container_registry_event_request_py3 import ContainerRegistryEventRequest - from .container_registry_event_actor_py3 import ContainerRegistryEventActor - from .container_registry_event_source_py3 import ContainerRegistryEventSource - from .container_registry_event_data_py3 import ContainerRegistryEventData - from .container_registry_artifact_event_target_py3 import ContainerRegistryArtifactEventTarget - from .container_registry_artifact_event_data_py3 import ContainerRegistryArtifactEventData - from .service_bus_active_messages_available_with_no_listeners_event_data_py3 import ServiceBusActiveMessagesAvailableWithNoListenersEventData - from .service_bus_deadletter_messages_available_with_no_listeners_event_data_py3 import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData - from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - from .media_job_error_detail_py3 import MediaJobErrorDetail - from .media_job_error_py3 import MediaJobError - from .media_job_output_py3 import MediaJobOutput - from .media_job_output_asset_py3 import MediaJobOutputAsset - from .media_job_output_progress_event_data_py3 import MediaJobOutputProgressEventData - from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - from .media_job_scheduled_event_data_py3 import MediaJobScheduledEventData - from .media_job_processing_event_data_py3 import MediaJobProcessingEventData - from .media_job_canceling_event_data_py3 import MediaJobCancelingEventData - from .media_job_finished_event_data_py3 import MediaJobFinishedEventData - from .media_job_canceled_event_data_py3 import MediaJobCanceledEventData - from .media_job_errored_event_data_py3 import MediaJobErroredEventData - from .media_job_output_canceled_event_data_py3 import MediaJobOutputCanceledEventData - from .media_job_output_canceling_event_data_py3 import MediaJobOutputCancelingEventData - from .media_job_output_errored_event_data_py3 import MediaJobOutputErroredEventData - from .media_job_output_finished_event_data_py3 import MediaJobOutputFinishedEventData - from .media_job_output_processing_event_data_py3 import MediaJobOutputProcessingEventData - from .media_job_output_scheduled_event_data_py3 import MediaJobOutputScheduledEventData - from .media_live_event_encoder_connected_event_data_py3 import MediaLiveEventEncoderConnectedEventData - from .media_live_event_connection_rejected_event_data_py3 import MediaLiveEventConnectionRejectedEventData - from .media_live_event_encoder_disconnected_event_data_py3 import MediaLiveEventEncoderDisconnectedEventData - from .media_live_event_incoming_stream_received_event_data_py3 import MediaLiveEventIncomingStreamReceivedEventData - from .media_live_event_incoming_streams_out_of_sync_event_data_py3 import MediaLiveEventIncomingStreamsOutOfSyncEventData - from .media_live_event_incoming_video_streams_out_of_sync_event_data_py3 import MediaLiveEventIncomingVideoStreamsOutOfSyncEventData - from .media_live_event_incoming_data_chunk_dropped_event_data_py3 import MediaLiveEventIncomingDataChunkDroppedEventData - from .media_live_event_ingest_heartbeat_event_data_py3 import MediaLiveEventIngestHeartbeatEventData - from .media_live_event_track_discontinuity_detected_event_data_py3 import MediaLiveEventTrackDiscontinuityDetectedEventData - from .maps_geofence_entered_event_data_py3 import MapsGeofenceEnteredEventData - from .maps_geofence_exited_event_data_py3 import MapsGeofenceExitedEventData - from .maps_geofence_result_event_data_py3 import MapsGeofenceResultEventData - from .maps_geofence_geometry_py3 import MapsGeofenceGeometry - from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties - from .app_configuration_key_value_modified_event_data_py3 import AppConfigurationKeyValueModifiedEventData - from .app_configuration_key_value_deleted_event_data_py3 import AppConfigurationKeyValueDeletedEventData - from .signal_rservice_client_connection_connected_event_data_py3 import SignalRServiceClientConnectionConnectedEventData - from .signal_rservice_client_connection_disconnected_event_data_py3 import SignalRServiceClientConnectionDisconnectedEventData -except (SyntaxError, ImportError): - from .storage_blob_created_event_data import StorageBlobCreatedEventData - from .storage_blob_deleted_event_data import StorageBlobDeletedEventData - from .event_hub_capture_file_created_event_data import EventHubCaptureFileCreatedEventData - from .resource_write_success_data import ResourceWriteSuccessData - from .resource_write_failure_data import ResourceWriteFailureData - from .resource_write_cancel_data import ResourceWriteCancelData - from .resource_delete_success_data import ResourceDeleteSuccessData - from .resource_delete_failure_data import ResourceDeleteFailureData - from .resource_delete_cancel_data import ResourceDeleteCancelData - from .resource_action_success_data import ResourceActionSuccessData - from .resource_action_failure_data import ResourceActionFailureData - from .resource_action_cancel_data import ResourceActionCancelData - from .event_grid_event import EventGridEvent - from .subscription_validation_event_data import SubscriptionValidationEventData - from .subscription_validation_response import SubscriptionValidationResponse - from .subscription_deleted_event_data import SubscriptionDeletedEventData - from .iot_hub_device_created_event_data import IotHubDeviceCreatedEventData - from .iot_hub_device_deleted_event_data import IotHubDeviceDeletedEventData - from .iot_hub_device_connected_event_data import IotHubDeviceConnectedEventData - from .iot_hub_device_disconnected_event_data import IotHubDeviceDisconnectedEventData - from .iot_hub_device_telemetry_event_data import IotHubDeviceTelemetryEventData - from .device_twin_metadata import DeviceTwinMetadata - from .device_twin_properties import DeviceTwinProperties - from .device_twin_info_properties import DeviceTwinInfoProperties - from .device_twin_info_x509_thumbprint import DeviceTwinInfoX509Thumbprint - from .device_twin_info import DeviceTwinInfo - from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties - from .device_connection_state_event_info import DeviceConnectionStateEventInfo - from .device_connection_state_event_properties import DeviceConnectionStateEventProperties - from .device_telemetry_event_properties import DeviceTelemetryEventProperties - from .container_registry_image_pushed_event_data import ContainerRegistryImagePushedEventData - from .container_registry_image_deleted_event_data import ContainerRegistryImageDeletedEventData - from .container_registry_chart_pushed_event_data import ContainerRegistryChartPushedEventData - from .container_registry_chart_deleted_event_data import ContainerRegistryChartDeletedEventData - from .container_registry_event_target import ContainerRegistryEventTarget - from .container_registry_event_request import ContainerRegistryEventRequest - from .container_registry_event_actor import ContainerRegistryEventActor - from .container_registry_event_source import ContainerRegistryEventSource - from .container_registry_event_data import ContainerRegistryEventData - from .container_registry_artifact_event_target import ContainerRegistryArtifactEventTarget - from .container_registry_artifact_event_data import ContainerRegistryArtifactEventData - from .service_bus_active_messages_available_with_no_listeners_event_data import ServiceBusActiveMessagesAvailableWithNoListenersEventData - from .service_bus_deadletter_messages_available_with_no_listeners_event_data import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData - from .media_job_state_change_event_data import MediaJobStateChangeEventData - from .media_job_error_detail import MediaJobErrorDetail - from .media_job_error import MediaJobError - from .media_job_output import MediaJobOutput - from .media_job_output_asset import MediaJobOutputAsset - from .media_job_output_progress_event_data import MediaJobOutputProgressEventData - from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - from .media_job_scheduled_event_data import MediaJobScheduledEventData - from .media_job_processing_event_data import MediaJobProcessingEventData - from .media_job_canceling_event_data import MediaJobCancelingEventData - from .media_job_finished_event_data import MediaJobFinishedEventData - from .media_job_canceled_event_data import MediaJobCanceledEventData - from .media_job_errored_event_data import MediaJobErroredEventData - from .media_job_output_canceled_event_data import MediaJobOutputCanceledEventData - from .media_job_output_canceling_event_data import MediaJobOutputCancelingEventData - from .media_job_output_errored_event_data import MediaJobOutputErroredEventData - from .media_job_output_finished_event_data import MediaJobOutputFinishedEventData - from .media_job_output_processing_event_data import MediaJobOutputProcessingEventData - from .media_job_output_scheduled_event_data import MediaJobOutputScheduledEventData - from .media_live_event_encoder_connected_event_data import MediaLiveEventEncoderConnectedEventData - from .media_live_event_connection_rejected_event_data import MediaLiveEventConnectionRejectedEventData - from .media_live_event_encoder_disconnected_event_data import MediaLiveEventEncoderDisconnectedEventData - from .media_live_event_incoming_stream_received_event_data import MediaLiveEventIncomingStreamReceivedEventData - from .media_live_event_incoming_streams_out_of_sync_event_data import MediaLiveEventIncomingStreamsOutOfSyncEventData - from .media_live_event_incoming_video_streams_out_of_sync_event_data import MediaLiveEventIncomingVideoStreamsOutOfSyncEventData - from .media_live_event_incoming_data_chunk_dropped_event_data import MediaLiveEventIncomingDataChunkDroppedEventData - from .media_live_event_ingest_heartbeat_event_data import MediaLiveEventIngestHeartbeatEventData - from .media_live_event_track_discontinuity_detected_event_data import MediaLiveEventTrackDiscontinuityDetectedEventData - from .maps_geofence_entered_event_data import MapsGeofenceEnteredEventData - from .maps_geofence_exited_event_data import MapsGeofenceExitedEventData - from .maps_geofence_result_event_data import MapsGeofenceResultEventData - from .maps_geofence_geometry import MapsGeofenceGeometry - from .maps_geofence_event_properties import MapsGeofenceEventProperties - from .app_configuration_key_value_modified_event_data import AppConfigurationKeyValueModifiedEventData - from .app_configuration_key_value_deleted_event_data import AppConfigurationKeyValueDeletedEventData - from .signal_rservice_client_connection_connected_event_data import SignalRServiceClientConnectionConnectedEventData - from .signal_rservice_client_connection_disconnected_event_data import SignalRServiceClientConnectionDisconnectedEventData -from .event_grid_client_enums import ( - MediaJobState, - MediaJobErrorCode, +from .._generated.models import( + AppConfigurationKeyValueDeletedEventData, + AppConfigurationKeyValueModifiedEventData, + AppEventTypeDetail, + AppServicePlanEventTypeDetail, + ChatEventBaseProperties, + ChatMemberAddedToThreadWithUserEventData, + ChatMemberRemovedFromThreadForWithUserEventData, + ChatMessageDeletedEventData, + ChatMessageEditedEventData, + ChatMessageEventBaseProperties, + ChatMessageReceivedEventData, + ChatThreadCreatedWithUserEventData, + ChatThreadEventBaseProperties, + ChatThreadMemberProperties, + ChatThreadPropertiesUpdatedPerUserEventData, + ChatThreadWithUserDeletedEventData, + ContainerRegistryArtifactEventData, + ContainerRegistryArtifactEventTarget, + ContainerRegistryChartDeletedEventData, + ContainerRegistryChartPushedEventData, + ContainerRegistryEventActor, + ContainerRegistryEventData, + ContainerRegistryEventRequest, + ContainerRegistryEventSource, + ContainerRegistryEventTarget, + ContainerRegistryImageDeletedEventData, + ContainerRegistryImagePushedEventData, + DeviceConnectionStateEventInfo, + DeviceConnectionStateEventProperties, + DeviceLifeCycleEventProperties, + DeviceTelemetryEventProperties, + DeviceTwinInfo, + DeviceTwinInfoProperties, + DeviceTwinInfoX509Thumbprint, + DeviceTwinMetadata, + DeviceTwinProperties, + EventHubCaptureFileCreatedEventData, + IotHubDeviceConnectedEventData, + IotHubDeviceCreatedEventData, + IotHubDeviceDeletedEventData, + IotHubDeviceDisconnectedEventData, + IotHubDeviceTelemetryEventData, + KeyVaultCertificateExpiredEventData, + KeyVaultCertificateNearExpiryEventData, + KeyVaultCertificateNewVersionCreatedEventData, + KeyVaultKeyExpiredEventData, + KeyVaultKeyNearExpiryEventData, + KeyVaultKeyNewVersionCreatedEventData, + KeyVaultSecretExpiredEventData, + KeyVaultSecretNearExpiryEventData, + KeyVaultSecretNewVersionCreatedEventData, + MachineLearningServicesDatasetDriftDetectedEventData, + MachineLearningServicesModelDeployedEventData, + MachineLearningServicesModelRegisteredEventData, + MachineLearningServicesRunCompletedEventData, + MachineLearningServicesRunStatusChangedEventData, + MapsGeofenceEnteredEventData, + MapsGeofenceEventProperties, + MapsGeofenceExitedEventData, + MapsGeofenceGeometry, + MapsGeofenceResultEventData, + MediaJobCanceledEventData, + MediaJobCancelingEventData, + MediaJobError, + MediaJobErrorDetail, + MediaJobErroredEventData, + MediaJobFinishedEventData, + MediaJobOutput, + MediaJobOutputAsset, + MediaJobOutputCanceledEventData, + MediaJobOutputCancelingEventData, + MediaJobOutputErroredEventData, + MediaJobOutputFinishedEventData, + MediaJobOutputProcessingEventData, + MediaJobOutputProgressEventData, + MediaJobOutputScheduledEventData, + MediaJobOutputStateChangeEventData, + MediaJobProcessingEventData, + MediaJobScheduledEventData, + MediaJobStateChangeEventData, + MediaLiveEventConnectionRejectedEventData, + MediaLiveEventEncoderConnectedEventData, + MediaLiveEventEncoderDisconnectedEventData, + MediaLiveEventIncomingDataChunkDroppedEventData, + MediaLiveEventIncomingStreamReceivedEventData, + MediaLiveEventIncomingStreamsOutOfSyncEventData, + MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, + MediaLiveEventIngestHeartbeatEventData, + MediaLiveEventTrackDiscontinuityDetectedEventData, + RedisExportRDBCompletedEventData, + RedisImportRDBCompletedEventData, + RedisPatchingCompletedEventData, + RedisScalingCompletedEventData, + ResourceActionCancelData, + ResourceActionFailureData, + ResourceActionSuccessData, + ResourceDeleteCancelData, + ResourceDeleteFailureData, + ResourceDeleteSuccessData, + ResourceWriteCancelData, + ResourceWriteFailureData, + ResourceWriteSuccessData, + SMSDeliveryAttemptProperties, + SMSDeliveryReportReceivedEventData, + SMSEventBaseProperties, + SMSReceivedEventData, + ServiceBusActiveMessagesAvailableWithNoListenersEventData, + ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, + SignalRServiceClientConnectionConnectedEventData, + SignalRServiceClientConnectionDisconnectedEventData, + StorageBlobCreatedEventData, + StorageBlobDeletedEventData, + StorageBlobRenamedEventData, + StorageDirectoryCreatedEventData, + StorageDirectoryDeletedEventData, + StorageDirectoryRenamedEventData, + StorageLifecyclePolicyActionSummaryDetail, + StorageLifecyclePolicyCompletedEventData, + SubscriptionDeletedEventData, + SubscriptionValidationEventData, + SubscriptionValidationResponse, + WebAppServicePlanUpdatedEventData, + WebAppServicePlanUpdatedEventDataSku, + WebAppUpdatedEventData, + WebBackupOperationCompletedEventData, + WebBackupOperationFailedEventData, + WebBackupOperationStartedEventData, + WebRestoreOperationCompletedEventData, + WebRestoreOperationFailedEventData, + WebRestoreOperationStartedEventData, + WebSlotSwapCompletedEventData, + WebSlotSwapFailedEventData, + WebSlotSwapStartedEventData, + WebSlotSwapWithPreviewCancelledEventData, + WebSlotSwapWithPreviewStartedEventData, +) + +from .._generated.models._event_grid_publisher_client_enums import ( + AppAction, + AppServicePlanAction, + AsyncStatus, MediaJobErrorCategory, + MediaJobErrorCode, MediaJobRetry, + MediaJobState, + StampKind, ) __all__ = [ - 'StorageBlobCreatedEventData', - 'StorageBlobDeletedEventData', + 'AppConfigurationKeyValueDeletedEventData', + 'AppConfigurationKeyValueModifiedEventData', + 'AppEventTypeDetail', + 'AppServicePlanEventTypeDetail', + 'ChatEventBaseProperties', + 'ChatMemberAddedToThreadWithUserEventData', + 'ChatMemberRemovedFromThreadForWithUserEventData', + 'ChatMessageDeletedEventData', + 'ChatMessageEditedEventData', + 'ChatMessageEventBaseProperties', + 'ChatMessageReceivedEventData', + 'ChatThreadCreatedWithUserEventData', + 'ChatThreadEventBaseProperties', + 'ChatThreadMemberProperties', + 'ChatThreadPropertiesUpdatedPerUserEventData', + 'ChatThreadWithUserDeletedEventData', + 'ContainerRegistryArtifactEventData', + 'ContainerRegistryArtifactEventTarget', + 'ContainerRegistryChartDeletedEventData', + 'ContainerRegistryChartPushedEventData', + 'ContainerRegistryEventActor', + 'ContainerRegistryEventData', + 'ContainerRegistryEventRequest', + 'ContainerRegistryEventSource', + 'ContainerRegistryEventTarget', + 'ContainerRegistryImageDeletedEventData', + 'ContainerRegistryImagePushedEventData', + 'DeviceConnectionStateEventInfo', + 'DeviceConnectionStateEventProperties', + 'DeviceLifeCycleEventProperties', + 'DeviceTelemetryEventProperties', + 'DeviceTwinInfo', + 'DeviceTwinInfoProperties', + 'DeviceTwinInfoX509Thumbprint', + 'DeviceTwinMetadata', + 'DeviceTwinProperties', 'EventHubCaptureFileCreatedEventData', - 'ResourceWriteSuccessData', - 'ResourceWriteFailureData', - 'ResourceWriteCancelData', - 'ResourceDeleteSuccessData', - 'ResourceDeleteFailureData', - 'ResourceDeleteCancelData', - 'ResourceActionSuccessData', - 'ResourceActionFailureData', - 'ResourceActionCancelData', - 'EventGridEvent', - 'SubscriptionValidationEventData', - 'SubscriptionValidationResponse', - 'SubscriptionDeletedEventData', + 'IotHubDeviceConnectedEventData', 'IotHubDeviceCreatedEventData', 'IotHubDeviceDeletedEventData', - 'IotHubDeviceConnectedEventData', 'IotHubDeviceDisconnectedEventData', 'IotHubDeviceTelemetryEventData', - 'DeviceTwinMetadata', - 'DeviceTwinProperties', - 'DeviceTwinInfoProperties', - 'DeviceTwinInfoX509Thumbprint', - 'DeviceTwinInfo', - 'DeviceLifeCycleEventProperties', - 'DeviceConnectionStateEventInfo', - 'DeviceConnectionStateEventProperties', - 'DeviceTelemetryEventProperties', - 'ContainerRegistryImagePushedEventData', - 'ContainerRegistryImageDeletedEventData', - 'ContainerRegistryChartPushedEventData', - 'ContainerRegistryChartDeletedEventData', - 'ContainerRegistryEventTarget', - 'ContainerRegistryEventRequest', - 'ContainerRegistryEventActor', - 'ContainerRegistryEventSource', - 'ContainerRegistryEventData', - 'ContainerRegistryArtifactEventTarget', - 'ContainerRegistryArtifactEventData', - 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', - 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', - 'MediaJobStateChangeEventData', - 'MediaJobErrorDetail', + 'KeyVaultCertificateExpiredEventData', + 'KeyVaultCertificateNearExpiryEventData', + 'KeyVaultCertificateNewVersionCreatedEventData', + 'KeyVaultKeyExpiredEventData', + 'KeyVaultKeyNearExpiryEventData', + 'KeyVaultKeyNewVersionCreatedEventData', + 'KeyVaultSecretExpiredEventData', + 'KeyVaultSecretNearExpiryEventData', + 'KeyVaultSecretNewVersionCreatedEventData', + 'MachineLearningServicesDatasetDriftDetectedEventData', + 'MachineLearningServicesModelDeployedEventData', + 'MachineLearningServicesModelRegisteredEventData', + 'MachineLearningServicesRunCompletedEventData', + 'MachineLearningServicesRunStatusChangedEventData', + 'MapsGeofenceEnteredEventData', + 'MapsGeofenceEventProperties', + 'MapsGeofenceExitedEventData', + 'MapsGeofenceGeometry', + 'MapsGeofenceResultEventData', + 'MediaJobCanceledEventData', + 'MediaJobCancelingEventData', 'MediaJobError', + 'MediaJobErrorDetail', + 'MediaJobErroredEventData', + 'MediaJobFinishedEventData', 'MediaJobOutput', 'MediaJobOutputAsset', - 'MediaJobOutputProgressEventData', - 'MediaJobOutputStateChangeEventData', - 'MediaJobScheduledEventData', - 'MediaJobProcessingEventData', - 'MediaJobCancelingEventData', - 'MediaJobFinishedEventData', - 'MediaJobCanceledEventData', - 'MediaJobErroredEventData', 'MediaJobOutputCanceledEventData', 'MediaJobOutputCancelingEventData', 'MediaJobOutputErroredEventData', 'MediaJobOutputFinishedEventData', 'MediaJobOutputProcessingEventData', + 'MediaJobOutputProgressEventData', 'MediaJobOutputScheduledEventData', - 'MediaLiveEventEncoderConnectedEventData', + 'MediaJobOutputStateChangeEventData', + 'MediaJobProcessingEventData', + 'MediaJobScheduledEventData', + 'MediaJobStateChangeEventData', 'MediaLiveEventConnectionRejectedEventData', + 'MediaLiveEventEncoderConnectedEventData', 'MediaLiveEventEncoderDisconnectedEventData', + 'MediaLiveEventIncomingDataChunkDroppedEventData', 'MediaLiveEventIncomingStreamReceivedEventData', 'MediaLiveEventIncomingStreamsOutOfSyncEventData', 'MediaLiveEventIncomingVideoStreamsOutOfSyncEventData', - 'MediaLiveEventIncomingDataChunkDroppedEventData', 'MediaLiveEventIngestHeartbeatEventData', 'MediaLiveEventTrackDiscontinuityDetectedEventData', - 'MapsGeofenceEnteredEventData', - 'MapsGeofenceExitedEventData', - 'MapsGeofenceResultEventData', - 'MapsGeofenceGeometry', - 'MapsGeofenceEventProperties', - 'AppConfigurationKeyValueModifiedEventData', - 'AppConfigurationKeyValueDeletedEventData', + 'RedisExportRDBCompletedEventData', + 'RedisImportRDBCompletedEventData', + 'RedisPatchingCompletedEventData', + 'RedisScalingCompletedEventData', + 'ResourceActionCancelData', + 'ResourceActionFailureData', + 'ResourceActionSuccessData', + 'ResourceDeleteCancelData', + 'ResourceDeleteFailureData', + 'ResourceDeleteSuccessData', + 'ResourceWriteCancelData', + 'ResourceWriteFailureData', + 'ResourceWriteSuccessData', + 'SMSDeliveryAttemptProperties', + 'SMSDeliveryReportReceivedEventData', + 'SMSEventBaseProperties', + 'SMSReceivedEventData', + 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', + 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', 'SignalRServiceClientConnectionConnectedEventData', 'SignalRServiceClientConnectionDisconnectedEventData', - 'MediaJobState', - 'MediaJobErrorCode', + 'StorageBlobCreatedEventData', + 'StorageBlobDeletedEventData', + 'StorageBlobRenamedEventData', + 'StorageDirectoryCreatedEventData', + 'StorageDirectoryDeletedEventData', + 'StorageDirectoryRenamedEventData', + 'StorageLifecyclePolicyActionSummaryDetail', + 'StorageLifecyclePolicyCompletedEventData', + 'SubscriptionDeletedEventData', + 'SubscriptionValidationEventData', + 'SubscriptionValidationResponse', + 'WebAppServicePlanUpdatedEventData', + 'WebAppServicePlanUpdatedEventDataSku', + 'WebAppUpdatedEventData', + 'WebBackupOperationCompletedEventData', + 'WebBackupOperationFailedEventData', + 'WebBackupOperationStartedEventData', + 'WebRestoreOperationCompletedEventData', + 'WebRestoreOperationFailedEventData', + 'WebRestoreOperationStartedEventData', + 'WebSlotSwapCompletedEventData', + 'WebSlotSwapFailedEventData', + 'WebSlotSwapStartedEventData', + 'WebSlotSwapWithPreviewCancelledEventData', + 'WebSlotSwapWithPreviewStartedEventData', + 'AppAction', + 'AppServicePlanAction', + 'AsyncStatus', 'MediaJobErrorCategory', + 'MediaJobErrorCode', 'MediaJobRetry', + 'MediaJobState', + 'StampKind', ] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data.py deleted file mode 100644 index 8a0adb6c209ab..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data.py +++ /dev/null @@ -1,38 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppConfigurationKeyValueDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.AppConfiguration.KeyValueDeleted event. - - :param key: The key used to identify the key-value that was deleted. - :type key: str - :param label: The label, if any, used to identify the key-value that was - deleted. - :type label: str - :param etag: The etag representing the key-value that was deleted. - :type etag: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppConfigurationKeyValueDeletedEventData, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.label = kwargs.get('label', None) - self.etag = kwargs.get('etag', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data_py3.py deleted file mode 100644 index 28ac0ab4055ff..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data_py3.py +++ /dev/null @@ -1,38 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppConfigurationKeyValueDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.AppConfiguration.KeyValueDeleted event. - - :param key: The key used to identify the key-value that was deleted. - :type key: str - :param label: The label, if any, used to identify the key-value that was - deleted. - :type label: str - :param etag: The etag representing the key-value that was deleted. - :type etag: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, label: str=None, etag: str=None, **kwargs) -> None: - super(AppConfigurationKeyValueDeletedEventData, self).__init__(**kwargs) - self.key = key - self.label = label - self.etag = etag diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data.py deleted file mode 100644 index e0147ee242b20..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data.py +++ /dev/null @@ -1,38 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppConfigurationKeyValueModifiedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.AppConfiguration.KeyValueModified event. - - :param key: The key used to identify the key-value that was modified. - :type key: str - :param label: The label, if any, used to identify the key-value that was - modified. - :type label: str - :param etag: The etag representing the new state of the key-value. - :type etag: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppConfigurationKeyValueModifiedEventData, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.label = kwargs.get('label', None) - self.etag = kwargs.get('etag', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data_py3.py deleted file mode 100644 index b37c56469de8e..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data_py3.py +++ /dev/null @@ -1,38 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppConfigurationKeyValueModifiedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.AppConfiguration.KeyValueModified event. - - :param key: The key used to identify the key-value that was modified. - :type key: str - :param label: The label, if any, used to identify the key-value that was - modified. - :type label: str - :param etag: The etag representing the new state of the key-value. - :type etag: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, label: str=None, etag: str=None, **kwargs) -> None: - super(AppConfigurationKeyValueModifiedEventData, self).__init__(**kwargs) - self.key = key - self.label = label - self.etag = etag diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data.py deleted file mode 100644 index 464d9ede72151..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data.py +++ /dev/null @@ -1,40 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryArtifactEventData(Model): - """The content of the event request message. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryArtifactEventData, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.timestamp = kwargs.get('timestamp', None) - self.action = kwargs.get('action', None) - self.target = kwargs.get('target', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data_py3.py deleted file mode 100644 index abd508e82b8e5..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data_py3.py +++ /dev/null @@ -1,40 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryArtifactEventData(Model): - """The content of the event request message. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: - super(ContainerRegistryArtifactEventData, self).__init__(**kwargs) - self.id = id - self.timestamp = timestamp - self.action = action - self.target = target diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target.py deleted file mode 100644 index 661b8c55564ad..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target.py +++ /dev/null @@ -1,52 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryArtifactEventTarget(Model): - """The target of the event. - - :param media_type: The MIME type of the artifact. - :type media_type: str - :param size: The size in bytes of the artifact. - :type size: long - :param digest: The digest of the artifact. - :type digest: str - :param repository: The repository name of the artifact. - :type repository: str - :param tag: The tag of the artifact. - :type tag: str - :param name: The name of the artifact. - :type name: str - :param version: The version of the artifact. - :type version: str - """ - - _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'long'}, - 'digest': {'key': 'digest', 'type': 'str'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryArtifactEventTarget, self).__init__(**kwargs) - self.media_type = kwargs.get('media_type', None) - self.size = kwargs.get('size', None) - self.digest = kwargs.get('digest', None) - self.repository = kwargs.get('repository', None) - self.tag = kwargs.get('tag', None) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target_py3.py deleted file mode 100644 index 1acf124735a7c..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target_py3.py +++ /dev/null @@ -1,52 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryArtifactEventTarget(Model): - """The target of the event. - - :param media_type: The MIME type of the artifact. - :type media_type: str - :param size: The size in bytes of the artifact. - :type size: long - :param digest: The digest of the artifact. - :type digest: str - :param repository: The repository name of the artifact. - :type repository: str - :param tag: The tag of the artifact. - :type tag: str - :param name: The name of the artifact. - :type name: str - :param version: The version of the artifact. - :type version: str - """ - - _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'long'}, - 'digest': {'key': 'digest', 'type': 'str'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, media_type: str=None, size: int=None, digest: str=None, repository: str=None, tag: str=None, name: str=None, version: str=None, **kwargs) -> None: - super(ContainerRegistryArtifactEventTarget, self).__init__(**kwargs) - self.media_type = media_type - self.size = size - self.digest = digest - self.repository = repository - self.tag = tag - self.name = name - self.version = version diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data.py deleted file mode 100644 index bfca65e364b95..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data.py +++ /dev/null @@ -1,37 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_artifact_event_data import ContainerRegistryArtifactEventData - - -class ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ChartDeleted event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryChartDeletedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data_py3.py deleted file mode 100644 index 7c8b2d18d26a8..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data_py3.py +++ /dev/null @@ -1,37 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_artifact_event_data_py3 import ContainerRegistryArtifactEventData - - -class ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ChartDeleted event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: - super(ContainerRegistryChartDeletedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data.py deleted file mode 100644 index 5a2b4b37e6cf6..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data.py +++ /dev/null @@ -1,37 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_artifact_event_data import ContainerRegistryArtifactEventData - - -class ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ChartPushed event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryChartPushedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data_py3.py deleted file mode 100644 index ecce11098dac2..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data_py3.py +++ /dev/null @@ -1,37 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_artifact_event_data_py3 import ContainerRegistryArtifactEventData - - -class ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ChartPushed event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: - super(ContainerRegistryChartPushedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor.py deleted file mode 100644 index 4fcf82f6a7fc8..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor.py +++ /dev/null @@ -1,30 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventActor(Model): - """The agent that initiated the event. For most situations, this could be from - the authorization context of the request. - - :param name: The subject or username associated with the request context - that generated the event. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventActor, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor_py3.py deleted file mode 100644 index 419b4e917e604..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor_py3.py +++ /dev/null @@ -1,30 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventActor(Model): - """The agent that initiated the event. For most situations, this could be from - the authorization context of the request. - - :param name: The subject or username associated with the request context - that generated the event. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(ContainerRegistryEventActor, self).__init__(**kwargs) - self.name = name diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data.py deleted file mode 100644 index f2b7d10a3f3f1..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data.py +++ /dev/null @@ -1,54 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventData(Model): - """The content of the event request message. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventData, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.timestamp = kwargs.get('timestamp', None) - self.action = kwargs.get('action', None) - self.target = kwargs.get('target', None) - self.request = kwargs.get('request', None) - self.actor = kwargs.get('actor', None) - self.source = kwargs.get('source', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data_py3.py deleted file mode 100644 index 1729ad8c9cba6..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data_py3.py +++ /dev/null @@ -1,54 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventData(Model): - """The content of the event request message. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: - super(ContainerRegistryEventData, self).__init__(**kwargs) - self.id = id - self.timestamp = timestamp - self.action = action - self.target = target - self.request = request - self.actor = actor - self.source = source diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request.py deleted file mode 100644 index 51d0917c1eb5f..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request.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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventRequest(Model): - """The request that generated the event. - - :param id: The ID of the request that initiated the event. - :type id: str - :param addr: The IP or hostname and possibly port of the client connection - that initiated the event. This is the RemoteAddr from the standard http - request. - :type addr: str - :param host: The externally accessible hostname of the registry instance, - as specified by the http host header on incoming requests. - :type host: str - :param method: The request method that generated the event. - :type method: str - :param useragent: The user agent header of the request. - :type useragent: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'addr': {'key': 'addr', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'useragent': {'key': 'useragent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventRequest, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.addr = kwargs.get('addr', None) - self.host = kwargs.get('host', None) - self.method = kwargs.get('method', None) - self.useragent = kwargs.get('useragent', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request_py3.py deleted file mode 100644 index 4f14fff4ad67f..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request_py3.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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventRequest(Model): - """The request that generated the event. - - :param id: The ID of the request that initiated the event. - :type id: str - :param addr: The IP or hostname and possibly port of the client connection - that initiated the event. This is the RemoteAddr from the standard http - request. - :type addr: str - :param host: The externally accessible hostname of the registry instance, - as specified by the http host header on incoming requests. - :type host: str - :param method: The request method that generated the event. - :type method: str - :param useragent: The user agent header of the request. - :type useragent: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'addr': {'key': 'addr', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'useragent': {'key': 'useragent', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, addr: str=None, host: str=None, method: str=None, useragent: str=None, **kwargs) -> None: - super(ContainerRegistryEventRequest, self).__init__(**kwargs) - self.id = id - self.addr = addr - self.host = host - self.method = method - self.useragent = useragent diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source.py deleted file mode 100644 index 4cd58ec011016..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source.py +++ /dev/null @@ -1,36 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventSource(Model): - """The registry node that generated the event. Put differently, while the - actor initiates the event, the source generates it. - - :param addr: The IP or hostname and the port of the registry node that - generated the event. Generally, this will be resolved by os.Hostname() - along with the running port. - :type addr: str - :param instance_id: The running instance of an application. Changes after - each restart. - :type instance_id: str - """ - - _attribute_map = { - 'addr': {'key': 'addr', 'type': 'str'}, - 'instance_id': {'key': 'instanceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventSource, self).__init__(**kwargs) - self.addr = kwargs.get('addr', None) - self.instance_id = kwargs.get('instance_id', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source_py3.py deleted file mode 100644 index b12c6c354a617..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source_py3.py +++ /dev/null @@ -1,36 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventSource(Model): - """The registry node that generated the event. Put differently, while the - actor initiates the event, the source generates it. - - :param addr: The IP or hostname and the port of the registry node that - generated the event. Generally, this will be resolved by os.Hostname() - along with the running port. - :type addr: str - :param instance_id: The running instance of an application. Changes after - each restart. - :type instance_id: str - """ - - _attribute_map = { - 'addr': {'key': 'addr', 'type': 'str'}, - 'instance_id': {'key': 'instanceID', 'type': 'str'}, - } - - def __init__(self, *, addr: str=None, instance_id: str=None, **kwargs) -> None: - super(ContainerRegistryEventSource, self).__init__(**kwargs) - self.addr = addr - self.instance_id = instance_id diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target.py deleted file mode 100644 index fd8c0448169c4..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target.py +++ /dev/null @@ -1,53 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventTarget(Model): - """The target of the event. - - :param media_type: The MIME type of the referenced object. - :type media_type: str - :param size: The number of bytes of the content. Same as Length field. - :type size: long - :param digest: The digest of the content, as defined by the Registry V2 - HTTP API Specification. - :type digest: str - :param length: The number of bytes of the content. Same as Size field. - :type length: long - :param repository: The repository name. - :type repository: str - :param url: The direct URL to the content. - :type url: str - :param tag: The tag name. - :type tag: str - """ - - _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'long'}, - 'digest': {'key': 'digest', 'type': 'str'}, - 'length': {'key': 'length', 'type': 'long'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventTarget, self).__init__(**kwargs) - self.media_type = kwargs.get('media_type', None) - self.size = kwargs.get('size', None) - self.digest = kwargs.get('digest', None) - self.length = kwargs.get('length', None) - self.repository = kwargs.get('repository', None) - self.url = kwargs.get('url', None) - self.tag = kwargs.get('tag', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target_py3.py deleted file mode 100644 index accbe49f96155..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target_py3.py +++ /dev/null @@ -1,53 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventTarget(Model): - """The target of the event. - - :param media_type: The MIME type of the referenced object. - :type media_type: str - :param size: The number of bytes of the content. Same as Length field. - :type size: long - :param digest: The digest of the content, as defined by the Registry V2 - HTTP API Specification. - :type digest: str - :param length: The number of bytes of the content. Same as Size field. - :type length: long - :param repository: The repository name. - :type repository: str - :param url: The direct URL to the content. - :type url: str - :param tag: The tag name. - :type tag: str - """ - - _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'long'}, - 'digest': {'key': 'digest', 'type': 'str'}, - 'length': {'key': 'length', 'type': 'long'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, *, media_type: str=None, size: int=None, digest: str=None, length: int=None, repository: str=None, url: str=None, tag: str=None, **kwargs) -> None: - super(ContainerRegistryEventTarget, self).__init__(**kwargs) - self.media_type = media_type - self.size = size - self.digest = digest - self.length = length - self.repository = repository - self.url = url - self.tag = tag diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data.py deleted file mode 100644 index 5db3644bb11f5..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data.py +++ /dev/null @@ -1,48 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_event_data import ContainerRegistryEventData - - -class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ImageDeleted event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryImageDeletedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py deleted file mode 100644 index 7365ea5c6a989..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py +++ /dev/null @@ -1,48 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_event_data_py3 import ContainerRegistryEventData - - -class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ImageDeleted event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: - super(ContainerRegistryImageDeletedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, request=request, actor=actor, source=source, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data.py deleted file mode 100644 index 6ddc5985f4dcc..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data.py +++ /dev/null @@ -1,48 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_event_data import ContainerRegistryEventData - - -class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ImagePushed event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryImagePushedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py deleted file mode 100644 index f12aa21fc809c..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py +++ /dev/null @@ -1,48 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_event_data_py3 import ContainerRegistryEventData - - -class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ImagePushed event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: - super(ContainerRegistryImagePushedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, request=request, actor=actor, source=source, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py deleted file mode 100644 index 7a110cab64afa..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py +++ /dev/null @@ -1,31 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceConnectionStateEventInfo(Model): - """Information about the device connection state event. - - :param sequence_number: Sequence number is string representation of a - hexadecimal number. string compare can be used to identify the larger - number because both in ASCII and HEX numbers come after alphabets. If you - are converting the string to hex, then the number is a 256 bit number. - :type sequence_number: str - """ - - _attribute_map = { - 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) - self.sequence_number = kwargs.get('sequence_number', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py deleted file mode 100644 index 0ef8c03b20746..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py +++ /dev/null @@ -1,31 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceConnectionStateEventInfo(Model): - """Information about the device connection state event. - - :param sequence_number: Sequence number is string representation of a - hexadecimal number. string compare can be used to identify the larger - number because both in ASCII and HEX numbers come after alphabets. If you - are converting the string to hex, then the number is a 256 bit number. - :type sequence_number: str - """ - - _attribute_map = { - 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, - } - - def __init__(self, *, sequence_number: str=None, **kwargs) -> None: - super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) - self.sequence_number = sequence_number diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py deleted file mode 100644 index 04a5a1aefcb07..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py +++ /dev/null @@ -1,50 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceConnectionStateEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device connection - state event (DeviceConnected, DeviceDisconnected). - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, **kwargs): - super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) - self.device_id = kwargs.get('device_id', None) - self.module_id = kwargs.get('module_id', None) - self.hub_name = kwargs.get('hub_name', None) - self.device_connection_state_event_info = kwargs.get('device_connection_state_event_info', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py deleted file mode 100644 index b8c339e55f647..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py +++ /dev/null @@ -1,50 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceConnectionStateEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device connection - state event (DeviceConnected, DeviceDisconnected). - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: - super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) - self.device_id = device_id - self.module_id = module_id - self.hub_name = hub_name - self.device_connection_state_event_info = device_connection_state_event_info diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py deleted file mode 100644 index b6cf0e6f29610..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceLifeCycleEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device life cycle - event (DeviceCreated, DeviceDeleted). - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, **kwargs): - super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) - self.device_id = kwargs.get('device_id', None) - self.hub_name = kwargs.get('hub_name', None) - self.twin = kwargs.get('twin', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py deleted file mode 100644 index f203cf9f1005e..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceLifeCycleEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device life cycle - event (DeviceCreated, DeviceDeleted). - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: - super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) - self.device_id = device_id - self.hub_name = hub_name - self.twin = twin diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py deleted file mode 100644 index 5ef54c29c86d3..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py +++ /dev/null @@ -1,39 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTelemetryEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device telemetry - event (DeviceTelemetry). - - :param body: The content of the message from the device. - :type body: object - :param properties: Application properties are user-defined strings that - can be added to the message. These fields are optional. - :type properties: dict[str, str] - :param system_properties: System properties help identify contents and - source of the messages. - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DeviceTelemetryEventProperties, self).__init__(**kwargs) - self.body = kwargs.get('body', None) - self.properties = kwargs.get('properties', None) - self.system_properties = kwargs.get('system_properties', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py deleted file mode 100644 index 57fdb9114dc55..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py +++ /dev/null @@ -1,39 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTelemetryEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device telemetry - event (DeviceTelemetry). - - :param body: The content of the message from the device. - :type body: object - :param properties: Application properties are user-defined strings that - can be added to the message. These fields are optional. - :type properties: dict[str, str] - :param system_properties: System properties help identify contents and - source of the messages. - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, *, body=None, properties=None, system_properties=None, **kwargs) -> None: - super(DeviceTelemetryEventProperties, self).__init__(**kwargs) - self.body = body - self.properties = properties - self.system_properties = system_properties diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info.py deleted file mode 100644 index a3c555d320cf6..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info.py +++ /dev/null @@ -1,78 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfo(Model): - """Information about the device twin, which is the cloud representation of - application device metadata. - - :param authentication_type: Authentication type used for this device: - either SAS, SelfSigned, or CertificateAuthority. - :type authentication_type: str - :param cloud_to_device_message_count: Count of cloud to device messages - sent to this device. - :type cloud_to_device_message_count: float - :param connection_state: Whether the device is connected or disconnected. - :type connection_state: str - :param device_id: The unique identifier of the device twin. - :type device_id: str - :param etag: A piece of information that describes the content of the - device twin. Each etag is guaranteed to be unique per device twin. - :type etag: str - :param last_activity_time: The ISO8601 timestamp of the last activity. - :type last_activity_time: str - :param properties: Properties JSON element. - :type properties: ~azure.eventgrid.models.DeviceTwinInfoProperties - :param status: Whether the device twin is enabled or disabled. - :type status: str - :param status_update_time: The ISO8601 timestamp of the last device twin - status update. - :type status_update_time: str - :param version: An integer that is incremented by one each time the device - twin is updated. - :type version: float - :param x509_thumbprint: The thumbprint is a unique value for the x509 - certificate, commonly used to find a particular certificate in a - certificate store. The thumbprint is dynamically generated using the SHA1 - algorithm, and does not physically exist in the certificate. - :type x509_thumbprint: - ~azure.eventgrid.models.DeviceTwinInfoX509Thumbprint - """ - - _attribute_map = { - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - 'cloud_to_device_message_count': {'key': 'cloudToDeviceMessageCount', 'type': 'float'}, - 'connection_state': {'key': 'connectionState', 'type': 'str'}, - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'last_activity_time': {'key': 'lastActivityTime', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DeviceTwinInfoProperties'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_update_time': {'key': 'statusUpdateTime', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'float'}, - 'x509_thumbprint': {'key': 'x509Thumbprint', 'type': 'DeviceTwinInfoX509Thumbprint'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinInfo, self).__init__(**kwargs) - self.authentication_type = kwargs.get('authentication_type', None) - self.cloud_to_device_message_count = kwargs.get('cloud_to_device_message_count', None) - self.connection_state = kwargs.get('connection_state', None) - self.device_id = kwargs.get('device_id', None) - self.etag = kwargs.get('etag', None) - self.last_activity_time = kwargs.get('last_activity_time', None) - self.properties = kwargs.get('properties', None) - self.status = kwargs.get('status', None) - self.status_update_time = kwargs.get('status_update_time', None) - self.version = kwargs.get('version', None) - self.x509_thumbprint = kwargs.get('x509_thumbprint', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties.py deleted file mode 100644 index 707a8bfb287f0..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties.py +++ /dev/null @@ -1,34 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfoProperties(Model): - """Properties JSON element. - - :param desired: A portion of the properties that can be written only by - the application back-end, and read by the device. - :type desired: ~azure.eventgrid.models.DeviceTwinProperties - :param reported: A portion of the properties that can be written only by - the device, and read by the application back-end. - :type reported: ~azure.eventgrid.models.DeviceTwinProperties - """ - - _attribute_map = { - 'desired': {'key': 'desired', 'type': 'DeviceTwinProperties'}, - 'reported': {'key': 'reported', 'type': 'DeviceTwinProperties'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinInfoProperties, self).__init__(**kwargs) - self.desired = kwargs.get('desired', None) - self.reported = kwargs.get('reported', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties_py3.py deleted file mode 100644 index efb94dee3d97b..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties_py3.py +++ /dev/null @@ -1,34 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfoProperties(Model): - """Properties JSON element. - - :param desired: A portion of the properties that can be written only by - the application back-end, and read by the device. - :type desired: ~azure.eventgrid.models.DeviceTwinProperties - :param reported: A portion of the properties that can be written only by - the device, and read by the application back-end. - :type reported: ~azure.eventgrid.models.DeviceTwinProperties - """ - - _attribute_map = { - 'desired': {'key': 'desired', 'type': 'DeviceTwinProperties'}, - 'reported': {'key': 'reported', 'type': 'DeviceTwinProperties'}, - } - - def __init__(self, *, desired=None, reported=None, **kwargs) -> None: - super(DeviceTwinInfoProperties, self).__init__(**kwargs) - self.desired = desired - self.reported = reported diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py deleted file mode 100644 index e74f3c65e9943..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py +++ /dev/null @@ -1,78 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfo(Model): - """Information about the device twin, which is the cloud representation of - application device metadata. - - :param authentication_type: Authentication type used for this device: - either SAS, SelfSigned, or CertificateAuthority. - :type authentication_type: str - :param cloud_to_device_message_count: Count of cloud to device messages - sent to this device. - :type cloud_to_device_message_count: float - :param connection_state: Whether the device is connected or disconnected. - :type connection_state: str - :param device_id: The unique identifier of the device twin. - :type device_id: str - :param etag: A piece of information that describes the content of the - device twin. Each etag is guaranteed to be unique per device twin. - :type etag: str - :param last_activity_time: The ISO8601 timestamp of the last activity. - :type last_activity_time: str - :param properties: Properties JSON element. - :type properties: ~azure.eventgrid.models.DeviceTwinInfoProperties - :param status: Whether the device twin is enabled or disabled. - :type status: str - :param status_update_time: The ISO8601 timestamp of the last device twin - status update. - :type status_update_time: str - :param version: An integer that is incremented by one each time the device - twin is updated. - :type version: float - :param x509_thumbprint: The thumbprint is a unique value for the x509 - certificate, commonly used to find a particular certificate in a - certificate store. The thumbprint is dynamically generated using the SHA1 - algorithm, and does not physically exist in the certificate. - :type x509_thumbprint: - ~azure.eventgrid.models.DeviceTwinInfoX509Thumbprint - """ - - _attribute_map = { - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - 'cloud_to_device_message_count': {'key': 'cloudToDeviceMessageCount', 'type': 'float'}, - 'connection_state': {'key': 'connectionState', 'type': 'str'}, - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'last_activity_time': {'key': 'lastActivityTime', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DeviceTwinInfoProperties'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_update_time': {'key': 'statusUpdateTime', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'float'}, - 'x509_thumbprint': {'key': 'x509Thumbprint', 'type': 'DeviceTwinInfoX509Thumbprint'}, - } - - def __init__(self, *, authentication_type: str=None, cloud_to_device_message_count: float=None, connection_state: str=None, device_id: str=None, etag: str=None, last_activity_time: str=None, properties=None, status: str=None, status_update_time: str=None, version: float=None, x509_thumbprint=None, **kwargs) -> None: - super(DeviceTwinInfo, self).__init__(**kwargs) - self.authentication_type = authentication_type - self.cloud_to_device_message_count = cloud_to_device_message_count - self.connection_state = connection_state - self.device_id = device_id - self.etag = etag - self.last_activity_time = last_activity_time - self.properties = properties - self.status = status - self.status_update_time = status_update_time - self.version = version - self.x509_thumbprint = x509_thumbprint diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint.py deleted file mode 100644 index abeb5e343bfa1..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint.py +++ /dev/null @@ -1,36 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfoX509Thumbprint(Model): - """The thumbprint is a unique value for the x509 certificate, commonly used to - find a particular certificate in a certificate store. The thumbprint is - dynamically generated using the SHA1 algorithm, and does not physically - exist in the certificate. - - :param primary_thumbprint: Primary thumbprint for the x509 certificate. - :type primary_thumbprint: str - :param secondary_thumbprint: Secondary thumbprint for the x509 - certificate. - :type secondary_thumbprint: str - """ - - _attribute_map = { - 'primary_thumbprint': {'key': 'primaryThumbprint', 'type': 'str'}, - 'secondary_thumbprint': {'key': 'secondaryThumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinInfoX509Thumbprint, self).__init__(**kwargs) - self.primary_thumbprint = kwargs.get('primary_thumbprint', None) - self.secondary_thumbprint = kwargs.get('secondary_thumbprint', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint_py3.py deleted file mode 100644 index 8255b523b0ba2..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint_py3.py +++ /dev/null @@ -1,36 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfoX509Thumbprint(Model): - """The thumbprint is a unique value for the x509 certificate, commonly used to - find a particular certificate in a certificate store. The thumbprint is - dynamically generated using the SHA1 algorithm, and does not physically - exist in the certificate. - - :param primary_thumbprint: Primary thumbprint for the x509 certificate. - :type primary_thumbprint: str - :param secondary_thumbprint: Secondary thumbprint for the x509 - certificate. - :type secondary_thumbprint: str - """ - - _attribute_map = { - 'primary_thumbprint': {'key': 'primaryThumbprint', 'type': 'str'}, - 'secondary_thumbprint': {'key': 'secondaryThumbprint', 'type': 'str'}, - } - - def __init__(self, *, primary_thumbprint: str=None, secondary_thumbprint: str=None, **kwargs) -> None: - super(DeviceTwinInfoX509Thumbprint, self).__init__(**kwargs) - self.primary_thumbprint = primary_thumbprint - self.secondary_thumbprint = secondary_thumbprint diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata.py deleted file mode 100644 index 59219bd36fe2e..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata.py +++ /dev/null @@ -1,29 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinMetadata(Model): - """Metadata information for the properties JSON document. - - :param last_updated: The ISO8601 timestamp of the last time the properties - were updated. - :type last_updated: str - """ - - _attribute_map = { - 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinMetadata, self).__init__(**kwargs) - self.last_updated = kwargs.get('last_updated', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata_py3.py deleted file mode 100644 index 8abb65fda8e2f..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata_py3.py +++ /dev/null @@ -1,29 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinMetadata(Model): - """Metadata information for the properties JSON document. - - :param last_updated: The ISO8601 timestamp of the last time the properties - were updated. - :type last_updated: str - """ - - _attribute_map = { - 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, - } - - def __init__(self, *, last_updated: str=None, **kwargs) -> None: - super(DeviceTwinMetadata, self).__init__(**kwargs) - self.last_updated = last_updated diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties.py deleted file mode 100644 index 9b207d5868edb..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties.py +++ /dev/null @@ -1,33 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinProperties(Model): - """A portion of the properties that can be written only by the application - back-end, and read by the device. - - :param metadata: Metadata information for the properties JSON document. - :type metadata: ~azure.eventgrid.models.DeviceTwinMetadata - :param version: Version of device twin properties. - :type version: float - """ - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'DeviceTwinMetadata'}, - 'version': {'key': 'version', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinProperties, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.version = kwargs.get('version', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties_py3.py deleted file mode 100644 index d28f52af8f848..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties_py3.py +++ /dev/null @@ -1,33 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinProperties(Model): - """A portion of the properties that can be written only by the application - back-end, and read by the device. - - :param metadata: Metadata information for the properties JSON document. - :type metadata: ~azure.eventgrid.models.DeviceTwinMetadata - :param version: Version of device twin properties. - :type version: float - """ - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'DeviceTwinMetadata'}, - 'version': {'key': 'version', 'type': 'float'}, - } - - def __init__(self, *, metadata=None, version: float=None, **kwargs) -> None: - super(DeviceTwinProperties, self).__init__(**kwargs) - self.metadata = metadata - self.version = version diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py deleted file mode 100644 index eabef54f1c863..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py +++ /dev/null @@ -1,51 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class MediaJobState(str, Enum): - - canceled = "Canceled" #: The job was canceled. This is a final state for the job. - canceling = "Canceling" #: The job is in the process of being canceled. This is a transient state for the job. - error = "Error" #: The job has encountered an error. This is a final state for the job. - finished = "Finished" #: The job is finished. This is a final state for the job. - processing = "Processing" #: The job is processing. This is a transient state for the job. - queued = "Queued" #: The job is in a queued state, waiting for resources to become available. This is a transient state. - scheduled = "Scheduled" #: The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states. - - -class MediaJobErrorCode(str, Enum): - - service_error = "ServiceError" #: Fatal service error, please contact support. - service_transient_error = "ServiceTransientError" #: Transient error, please retry, if retry is unsuccessful, please contact support. - download_not_accessible = "DownloadNotAccessible" #: While trying to download the input files, the files were not accessible, please check the availability of the source. - download_transient_error = "DownloadTransientError" #: While trying to download the input files, there was an issue during transfer (storage service, network errors), see details and check your source. - upload_not_accessible = "UploadNotAccessible" #: While trying to upload the output files, the destination was not reachable, please check the availability of the destination. - upload_transient_error = "UploadTransientError" #: While trying to upload the output files, there was an issue during transfer (storage service, network errors), see details and check your destination. - configuration_unsupported = "ConfigurationUnsupported" #: There was a problem with the combination of input files and the configuration settings applied, fix the configuration settings and retry with the same input, or change input to match the configuration. - content_malformed = "ContentMalformed" #: There was a problem with the input content (for example: zero byte files, or corrupt/non-decodable files), check the input files. - content_unsupported = "ContentUnsupported" #: There was a problem with the format of the input (not valid media file, or an unsupported file/codec), check the validity of the input files. - - -class MediaJobErrorCategory(str, Enum): - - service = "Service" #: The error is service related. - download = "Download" #: The error is download related. - upload = "Upload" #: The error is upload related. - configuration = "Configuration" #: The error is configuration related. - content = "Content" #: The error is related to data in the input files. - - -class MediaJobRetry(str, Enum): - - do_not_retry = "DoNotRetry" #: Issue needs to be investigated and then the job resubmitted with corrections or retried once the underlying issue has been corrected. - may_retry = "MayRetry" #: Issue may be resolved after waiting for a period of time and resubmitting the same Job. diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event.py deleted file mode 100644 index f4828c24dd380..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event.py +++ /dev/null @@ -1,71 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventGridEvent(Model): - """Properties of an event published to an Event Grid topic. - - 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 id: Required. An unique identifier for the event. - :type id: str - :param topic: The resource path of the event source. - :type topic: str - :param subject: Required. A resource path relative to the topic path. - :type subject: str - :param data: Required. Event data specific to the event type. - :type data: object - :param event_type: Required. The type of the event that occurred. - :type event_type: str - :param event_time: Required. The time (in UTC) the event was generated. - :type event_time: datetime - :ivar metadata_version: The schema version of the event metadata. - :vartype metadata_version: str - :param data_version: Required. The schema version of the data object. - :type data_version: str - """ - - _validation = { - 'id': {'required': True}, - 'subject': {'required': True}, - 'data': {'required': True}, - 'event_type': {'required': True}, - 'event_time': {'required': True}, - 'metadata_version': {'readonly': True}, - 'data_version': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'topic': {'key': 'topic', 'type': 'str'}, - 'subject': {'key': 'subject', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'object'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, - 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, - 'data_version': {'key': 'dataVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventGridEvent, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.topic = kwargs.get('topic', None) - self.subject = kwargs.get('subject', None) - self.data = kwargs.get('data', None) - self.event_type = kwargs.get('event_type', None) - self.event_time = kwargs.get('event_time', None) - self.metadata_version = None - self.data_version = kwargs.get('data_version', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event_py3.py deleted file mode 100644 index 1f54ddad918ac..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event_py3.py +++ /dev/null @@ -1,71 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventGridEvent(Model): - """Properties of an event published to an Event Grid topic. - - 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 id: Required. An unique identifier for the event. - :type id: str - :param topic: The resource path of the event source. - :type topic: str - :param subject: Required. A resource path relative to the topic path. - :type subject: str - :param data: Required. Event data specific to the event type. - :type data: object - :param event_type: Required. The type of the event that occurred. - :type event_type: str - :param event_time: Required. The time (in UTC) the event was generated. - :type event_time: datetime - :ivar metadata_version: The schema version of the event metadata. - :vartype metadata_version: str - :param data_version: Required. The schema version of the data object. - :type data_version: str - """ - - _validation = { - 'id': {'required': True}, - 'subject': {'required': True}, - 'data': {'required': True}, - 'event_type': {'required': True}, - 'event_time': {'required': True}, - 'metadata_version': {'readonly': True}, - 'data_version': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'topic': {'key': 'topic', 'type': 'str'}, - 'subject': {'key': 'subject', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'object'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, - 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, - 'data_version': {'key': 'dataVersion', 'type': 'str'}, - } - - def __init__(self, *, id: str, subject: str, data, event_type: str, event_time, data_version: str, topic: str=None, **kwargs) -> None: - super(EventGridEvent, self).__init__(**kwargs) - self.id = id - self.topic = topic - self.subject = subject - self.data = data - self.event_type = event_type - self.event_time = event_time - self.metadata_version = None - self.data_version = data_version diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data.py deleted file mode 100644 index 7cca05430f968..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data.py +++ /dev/null @@ -1,61 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubCaptureFileCreatedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.EventHub.CaptureFileCreated event. - - :param fileurl: The path to the capture file. - :type fileurl: str - :param file_type: The file type of the capture file. - :type file_type: str - :param partition_id: The shard ID. - :type partition_id: str - :param size_in_bytes: The file size. - :type size_in_bytes: int - :param event_count: The number of events in the file. - :type event_count: int - :param first_sequence_number: The smallest sequence number from the queue. - :type first_sequence_number: int - :param last_sequence_number: The last sequence number from the queue. - :type last_sequence_number: int - :param first_enqueue_time: The first time from the queue. - :type first_enqueue_time: datetime - :param last_enqueue_time: The last time from the queue. - :type last_enqueue_time: datetime - """ - - _attribute_map = { - 'fileurl': {'key': 'fileurl', 'type': 'str'}, - 'file_type': {'key': 'fileType', 'type': 'str'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'size_in_bytes': {'key': 'sizeInBytes', 'type': 'int'}, - 'event_count': {'key': 'eventCount', 'type': 'int'}, - 'first_sequence_number': {'key': 'firstSequenceNumber', 'type': 'int'}, - 'last_sequence_number': {'key': 'lastSequenceNumber', 'type': 'int'}, - 'first_enqueue_time': {'key': 'firstEnqueueTime', 'type': 'iso-8601'}, - 'last_enqueue_time': {'key': 'lastEnqueueTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(EventHubCaptureFileCreatedEventData, self).__init__(**kwargs) - self.fileurl = kwargs.get('fileurl', None) - self.file_type = kwargs.get('file_type', None) - self.partition_id = kwargs.get('partition_id', None) - self.size_in_bytes = kwargs.get('size_in_bytes', None) - self.event_count = kwargs.get('event_count', None) - self.first_sequence_number = kwargs.get('first_sequence_number', None) - self.last_sequence_number = kwargs.get('last_sequence_number', None) - self.first_enqueue_time = kwargs.get('first_enqueue_time', None) - self.last_enqueue_time = kwargs.get('last_enqueue_time', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data_py3.py deleted file mode 100644 index 673a61b031e9b..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data_py3.py +++ /dev/null @@ -1,61 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubCaptureFileCreatedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.EventHub.CaptureFileCreated event. - - :param fileurl: The path to the capture file. - :type fileurl: str - :param file_type: The file type of the capture file. - :type file_type: str - :param partition_id: The shard ID. - :type partition_id: str - :param size_in_bytes: The file size. - :type size_in_bytes: int - :param event_count: The number of events in the file. - :type event_count: int - :param first_sequence_number: The smallest sequence number from the queue. - :type first_sequence_number: int - :param last_sequence_number: The last sequence number from the queue. - :type last_sequence_number: int - :param first_enqueue_time: The first time from the queue. - :type first_enqueue_time: datetime - :param last_enqueue_time: The last time from the queue. - :type last_enqueue_time: datetime - """ - - _attribute_map = { - 'fileurl': {'key': 'fileurl', 'type': 'str'}, - 'file_type': {'key': 'fileType', 'type': 'str'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'size_in_bytes': {'key': 'sizeInBytes', 'type': 'int'}, - 'event_count': {'key': 'eventCount', 'type': 'int'}, - 'first_sequence_number': {'key': 'firstSequenceNumber', 'type': 'int'}, - 'last_sequence_number': {'key': 'lastSequenceNumber', 'type': 'int'}, - 'first_enqueue_time': {'key': 'firstEnqueueTime', 'type': 'iso-8601'}, - 'last_enqueue_time': {'key': 'lastEnqueueTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, fileurl: str=None, file_type: str=None, partition_id: str=None, size_in_bytes: int=None, event_count: int=None, first_sequence_number: int=None, last_sequence_number: int=None, first_enqueue_time=None, last_enqueue_time=None, **kwargs) -> None: - super(EventHubCaptureFileCreatedEventData, self).__init__(**kwargs) - self.fileurl = fileurl - self.file_type = file_type - self.partition_id = partition_id - self.size_in_bytes = size_in_bytes - self.event_count = event_count - self.first_sequence_number = first_sequence_number - self.last_sequence_number = last_sequence_number - self.first_enqueue_time = first_enqueue_time - self.last_enqueue_time = last_enqueue_time diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py deleted file mode 100644 index 9f48f9c10abcd..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_connection_state_event_properties import DeviceConnectionStateEventProperties - - -class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): - """Event data for Microsoft.Devices.DeviceConnected event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceConnectedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py deleted file mode 100644 index 3c4791507b54c..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties - - -class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): - """Event data for Microsoft.Devices.DeviceConnected event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: - super(IotHubDeviceConnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py deleted file mode 100644 index df911f0b04568..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py +++ /dev/null @@ -1,38 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties - - -class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): - """Event data for Microsoft.Devices.DeviceCreated event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceCreatedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py deleted file mode 100644 index e8d497edc97ea..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py +++ /dev/null @@ -1,38 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties - - -class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): - """Event data for Microsoft.Devices.DeviceCreated event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: - super(IotHubDeviceCreatedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py deleted file mode 100644 index 92d7e5c9c67f1..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py +++ /dev/null @@ -1,38 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties - - -class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): - """Event data for Microsoft.Devices.DeviceDeleted event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceDeletedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py deleted file mode 100644 index 635003d7176c4..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py +++ /dev/null @@ -1,38 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties - - -class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): - """Event data for Microsoft.Devices.DeviceDeleted event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: - super(IotHubDeviceDeletedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py deleted file mode 100644 index 0de85a3a601fd..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_connection_state_event_properties import DeviceConnectionStateEventProperties - - -class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): - """Event data for Microsoft.Devices.DeviceDisconnected event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceDisconnectedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py deleted file mode 100644 index d340d625e90ce..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties - - -class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): - """Event data for Microsoft.Devices.DeviceDisconnected event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: - super(IotHubDeviceDisconnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py deleted file mode 100644 index 68327f1102459..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py +++ /dev/null @@ -1,35 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_telemetry_event_properties import DeviceTelemetryEventProperties - - -class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): - """Event data for Microsoft.Devices.DeviceTelemetry event. - - :param body: The content of the message from the device. - :type body: object - :param properties: Application properties are user-defined strings that - can be added to the message. These fields are optional. - :type properties: dict[str, str] - :param system_properties: System properties help identify contents and - source of the messages. - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceTelemetryEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py deleted file mode 100644 index 99ff68ce25947..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py +++ /dev/null @@ -1,35 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_telemetry_event_properties_py3 import DeviceTelemetryEventProperties - - -class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): - """Event data for Microsoft.Devices.DeviceTelemetry event. - - :param body: The content of the message from the device. - :type body: object - :param properties: Application properties are user-defined strings that - can be added to the message. These fields are optional. - :type properties: dict[str, str] - :param system_properties: System properties help identify contents and - source of the messages. - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, *, body=None, properties=None, system_properties=None, **kwargs) -> None: - super(IotHubDeviceTelemetryEventData, self).__init__(body=body, properties=properties, system_properties=system_properties, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data.py deleted file mode 100644 index ad261166eab6b..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data.py +++ /dev/null @@ -1,44 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties import MapsGeofenceEventProperties - - -class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceEntered event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceEnteredEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data_py3.py deleted file mode 100644 index 4a49e99df5abc..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data_py3.py +++ /dev/null @@ -1,44 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties - - -class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceEntered event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: - super(MapsGeofenceEnteredEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties.py deleted file mode 100644 index a09219f411ca2..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties.py +++ /dev/null @@ -1,48 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MapsGeofenceEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a Geofence event - (GeofenceEntered, GeofenceExited, GeofenceResult). - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceEventProperties, self).__init__(**kwargs) - self.expired_geofence_geometry_id = kwargs.get('expired_geofence_geometry_id', None) - self.geometries = kwargs.get('geometries', None) - self.invalid_period_geofence_geometry_id = kwargs.get('invalid_period_geofence_geometry_id', None) - self.is_event_published = kwargs.get('is_event_published', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties_py3.py deleted file mode 100644 index aaf8b3a60c08a..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties_py3.py +++ /dev/null @@ -1,48 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MapsGeofenceEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a Geofence event - (GeofenceEntered, GeofenceExited, GeofenceResult). - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: - super(MapsGeofenceEventProperties, self).__init__(**kwargs) - self.expired_geofence_geometry_id = expired_geofence_geometry_id - self.geometries = geometries - self.invalid_period_geofence_geometry_id = invalid_period_geofence_geometry_id - self.is_event_published = is_event_published diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data.py deleted file mode 100644 index f7c5aa0fc15ae..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data.py +++ /dev/null @@ -1,44 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties import MapsGeofenceEventProperties - - -class MapsGeofenceExitedEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceExited event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceExitedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data_py3.py deleted file mode 100644 index 6bec05c2212fe..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data_py3.py +++ /dev/null @@ -1,44 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties - - -class MapsGeofenceExitedEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceExited event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: - super(MapsGeofenceExitedEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry.py deleted file mode 100644 index b7cff8da378ab..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry.py +++ /dev/null @@ -1,58 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MapsGeofenceGeometry(Model): - """The geofence geometry. - - :param device_id: ID of the device. - :type device_id: str - :param distance: Distance from the coordinate to the closest border of the - geofence. Positive means the coordinate is outside of the geofence. If the - coordinate is outside of the geofence, but more than the value of - searchBuffer away from the closest geofence border, then the value is 999. - Negative means the coordinate is inside of the geofence. If the coordinate - is inside the polygon, but more than the value of searchBuffer away from - the closest geofencing border,then the value is -999. A value of 999 means - that there is great confidence the coordinate is well outside the - geofence. A value of -999 means that there is great confidence the - coordinate is well within the geofence. - :type distance: float - :param geometry_id: The unique ID for the geofence geometry. - :type geometry_id: str - :param nearest_lat: Latitude of the nearest point of the geometry. - :type nearest_lat: float - :param nearest_lon: Longitude of the nearest point of the geometry. - :type nearest_lon: float - :param ud_id: The unique id returned from user upload service when - uploading a geofence. Will not be included in geofencing post API. - :type ud_id: str - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'distance': {'key': 'distance', 'type': 'float'}, - 'geometry_id': {'key': 'geometryId', 'type': 'str'}, - 'nearest_lat': {'key': 'nearestLat', 'type': 'float'}, - 'nearest_lon': {'key': 'nearestLon', 'type': 'float'}, - 'ud_id': {'key': 'udId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceGeometry, self).__init__(**kwargs) - self.device_id = kwargs.get('device_id', None) - self.distance = kwargs.get('distance', None) - self.geometry_id = kwargs.get('geometry_id', None) - self.nearest_lat = kwargs.get('nearest_lat', None) - self.nearest_lon = kwargs.get('nearest_lon', None) - self.ud_id = kwargs.get('ud_id', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry_py3.py deleted file mode 100644 index bd66900050538..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry_py3.py +++ /dev/null @@ -1,58 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MapsGeofenceGeometry(Model): - """The geofence geometry. - - :param device_id: ID of the device. - :type device_id: str - :param distance: Distance from the coordinate to the closest border of the - geofence. Positive means the coordinate is outside of the geofence. If the - coordinate is outside of the geofence, but more than the value of - searchBuffer away from the closest geofence border, then the value is 999. - Negative means the coordinate is inside of the geofence. If the coordinate - is inside the polygon, but more than the value of searchBuffer away from - the closest geofencing border,then the value is -999. A value of 999 means - that there is great confidence the coordinate is well outside the - geofence. A value of -999 means that there is great confidence the - coordinate is well within the geofence. - :type distance: float - :param geometry_id: The unique ID for the geofence geometry. - :type geometry_id: str - :param nearest_lat: Latitude of the nearest point of the geometry. - :type nearest_lat: float - :param nearest_lon: Longitude of the nearest point of the geometry. - :type nearest_lon: float - :param ud_id: The unique id returned from user upload service when - uploading a geofence. Will not be included in geofencing post API. - :type ud_id: str - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'distance': {'key': 'distance', 'type': 'float'}, - 'geometry_id': {'key': 'geometryId', 'type': 'str'}, - 'nearest_lat': {'key': 'nearestLat', 'type': 'float'}, - 'nearest_lon': {'key': 'nearestLon', 'type': 'float'}, - 'ud_id': {'key': 'udId', 'type': 'str'}, - } - - def __init__(self, *, device_id: str=None, distance: float=None, geometry_id: str=None, nearest_lat: float=None, nearest_lon: float=None, ud_id: str=None, **kwargs) -> None: - super(MapsGeofenceGeometry, self).__init__(**kwargs) - self.device_id = device_id - self.distance = distance - self.geometry_id = geometry_id - self.nearest_lat = nearest_lat - self.nearest_lon = nearest_lon - self.ud_id = ud_id diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data.py deleted file mode 100644 index a609225c822e6..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data.py +++ /dev/null @@ -1,44 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties import MapsGeofenceEventProperties - - -class MapsGeofenceResultEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceResult event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceResultEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data_py3.py deleted file mode 100644 index 24a1bebf7180d..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data_py3.py +++ /dev/null @@ -1,44 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties - - -class MapsGeofenceResultEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceResult event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: - super(MapsGeofenceResultEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data.py deleted file mode 100644 index f8a820f2b8fbf..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data.py +++ /dev/null @@ -1,49 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobCanceledEventData(MediaJobStateChangeEventData): - """Job canceled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, **kwargs): - super(MediaJobCanceledEventData, self).__init__(**kwargs) - self.outputs = kwargs.get('outputs', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data_py3.py deleted file mode 100644 index 2febfeb9d2d58..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data_py3.py +++ /dev/null @@ -1,49 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobCanceledEventData(MediaJobStateChangeEventData): - """Job canceled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: - super(MediaJobCanceledEventData, self).__init__(correlation_data=correlation_data, **kwargs) - self.outputs = outputs diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data.py deleted file mode 100644 index 4c25c6c2cae94..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobCancelingEventData(MediaJobStateChangeEventData): - """Job canceling event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobCancelingEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data_py3.py deleted file mode 100644 index 1ed04a59b0c56..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data_py3.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobCancelingEventData(MediaJobStateChangeEventData): - """Job canceling event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, *, correlation_data=None, **kwargs) -> None: - super(MediaJobCancelingEventData, self).__init__(correlation_data=correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error.py deleted file mode 100644 index 2a4c16b338892..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error.py +++ /dev/null @@ -1,63 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobError(Model): - """Details of JobOutput errors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code describing the error. Possible values include: - 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', - 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', - 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' - :vartype code: str or ~azure.eventgrid.models.MediaJobErrorCode - :ivar message: A human-readable language-dependent representation of the - error. - :vartype message: str - :ivar category: Helps with categorization of errors. Possible values - include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' - :vartype category: str or ~azure.eventgrid.models.MediaJobErrorCategory - :ivar retry: Indicates that it may be possible to retry the Job. If retry - is unsuccessful, please contact Azure support via Azure Portal. Possible - values include: 'DoNotRetry', 'MayRetry' - :vartype retry: str or ~azure.eventgrid.models.MediaJobRetry - :ivar details: An array of details about specific errors that led to this - reported error. - :vartype details: list[~azure.eventgrid.models.MediaJobErrorDetail] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'category': {'readonly': True}, - 'retry': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'MediaJobErrorCode'}, - 'message': {'key': 'message', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'MediaJobErrorCategory'}, - 'retry': {'key': 'retry', 'type': 'MediaJobRetry'}, - 'details': {'key': 'details', 'type': '[MediaJobErrorDetail]'}, - } - - def __init__(self, **kwargs): - super(MediaJobError, self).__init__(**kwargs) - self.code = None - self.message = None - self.category = None - self.retry = None - self.details = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail.py deleted file mode 100644 index acbb98e6c4373..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail.py +++ /dev/null @@ -1,40 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobErrorDetail(Model): - """Details of JobOutput errors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code describing the error detail. - :vartype code: str - :ivar message: A human-readable representation of the error. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaJobErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail_py3.py deleted file mode 100644 index 9c419b996addb..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail_py3.py +++ /dev/null @@ -1,40 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobErrorDetail(Model): - """Details of JobOutput errors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code describing the error detail. - :vartype code: str - :ivar message: A human-readable representation of the error. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaJobErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_py3.py deleted file mode 100644 index afd055ba62ecf..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_py3.py +++ /dev/null @@ -1,63 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobError(Model): - """Details of JobOutput errors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code describing the error. Possible values include: - 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', - 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', - 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' - :vartype code: str or ~azure.eventgrid.models.MediaJobErrorCode - :ivar message: A human-readable language-dependent representation of the - error. - :vartype message: str - :ivar category: Helps with categorization of errors. Possible values - include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' - :vartype category: str or ~azure.eventgrid.models.MediaJobErrorCategory - :ivar retry: Indicates that it may be possible to retry the Job. If retry - is unsuccessful, please contact Azure support via Azure Portal. Possible - values include: 'DoNotRetry', 'MayRetry' - :vartype retry: str or ~azure.eventgrid.models.MediaJobRetry - :ivar details: An array of details about specific errors that led to this - reported error. - :vartype details: list[~azure.eventgrid.models.MediaJobErrorDetail] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'category': {'readonly': True}, - 'retry': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'MediaJobErrorCode'}, - 'message': {'key': 'message', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'MediaJobErrorCategory'}, - 'retry': {'key': 'retry', 'type': 'MediaJobRetry'}, - 'details': {'key': 'details', 'type': '[MediaJobErrorDetail]'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaJobError, self).__init__(**kwargs) - self.code = None - self.message = None - self.category = None - self.retry = None - self.details = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data.py deleted file mode 100644 index 91b5cda1eeecb..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data.py +++ /dev/null @@ -1,49 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobErroredEventData(MediaJobStateChangeEventData): - """Job error state event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, **kwargs): - super(MediaJobErroredEventData, self).__init__(**kwargs) - self.outputs = kwargs.get('outputs', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data_py3.py deleted file mode 100644 index 2a2e7b7af0945..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data_py3.py +++ /dev/null @@ -1,49 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobErroredEventData(MediaJobStateChangeEventData): - """Job error state event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: - super(MediaJobErroredEventData, self).__init__(correlation_data=correlation_data, **kwargs) - self.outputs = outputs diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data.py deleted file mode 100644 index 29d2f2a1420e8..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data.py +++ /dev/null @@ -1,49 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobFinishedEventData(MediaJobStateChangeEventData): - """Job finished event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, **kwargs): - super(MediaJobFinishedEventData, self).__init__(**kwargs) - self.outputs = kwargs.get('outputs', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data_py3.py deleted file mode 100644 index 9e9ee8d588c06..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data_py3.py +++ /dev/null @@ -1,49 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobFinishedEventData(MediaJobStateChangeEventData): - """Job finished event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: - super(MediaJobFinishedEventData, self).__init__(correlation_data=correlation_data, **kwargs) - self.outputs = outputs diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py deleted file mode 100644 index ec105fd697ddc..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py +++ /dev/null @@ -1,61 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutput(Model): - """The event data for a Job output. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MediaJobOutputAsset - - All required parameters must be populated in order to send to Azure. - - :param error: Gets the Job output error. - :type error: ~azure.eventgrid.models.MediaJobError - :param label: Gets the Job output label. - :type label: str - :param progress: Required. Gets the Job output progress. - :type progress: long - :param state: Required. Gets the Job output state. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :type state: str or ~azure.eventgrid.models.MediaJobState - :param odatatype: Required. Constant filled by server. - :type odatatype: str - """ - - _validation = { - 'progress': {'required': True}, - 'state': {'required': True}, - 'odatatype': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'MediaJobError'}, - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - } - - _subtype_map = { - 'odatatype': {'#Microsoft.Media.JobOutputAsset': 'MediaJobOutputAsset'} - } - - def __init__(self, **kwargs): - super(MediaJobOutput, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - self.label = kwargs.get('label', None) - self.progress = kwargs.get('progress', None) - self.state = kwargs.get('state', None) - self.odatatype = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset.py deleted file mode 100644 index efe51ce529f55..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset.py +++ /dev/null @@ -1,54 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output import MediaJobOutput - - -class MediaJobOutputAsset(MediaJobOutput): - """The event data for a Job output asset. - - All required parameters must be populated in order to send to Azure. - - :param error: Gets the Job output error. - :type error: ~azure.eventgrid.models.MediaJobError - :param label: Gets the Job output label. - :type label: str - :param progress: Required. Gets the Job output progress. - :type progress: long - :param state: Required. Gets the Job output state. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :type state: str or ~azure.eventgrid.models.MediaJobState - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param asset_name: Gets the Job output asset name. - :type asset_name: str - """ - - _validation = { - 'progress': {'required': True}, - 'state': {'required': True}, - 'odatatype': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'MediaJobError'}, - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - 'asset_name': {'key': 'assetName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputAsset, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.odatatype = '#Microsoft.Media.JobOutputAsset' diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset_py3.py deleted file mode 100644 index de6fc83d47c80..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset_py3.py +++ /dev/null @@ -1,54 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_py3 import MediaJobOutput - - -class MediaJobOutputAsset(MediaJobOutput): - """The event data for a Job output asset. - - All required parameters must be populated in order to send to Azure. - - :param error: Gets the Job output error. - :type error: ~azure.eventgrid.models.MediaJobError - :param label: Gets the Job output label. - :type label: str - :param progress: Required. Gets the Job output progress. - :type progress: long - :param state: Required. Gets the Job output state. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :type state: str or ~azure.eventgrid.models.MediaJobState - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param asset_name: Gets the Job output asset name. - :type asset_name: str - """ - - _validation = { - 'progress': {'required': True}, - 'state': {'required': True}, - 'odatatype': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'MediaJobError'}, - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - 'asset_name': {'key': 'assetName', 'type': 'str'}, - } - - def __init__(self, *, progress: int, state, error=None, label: str=None, asset_name: str=None, **kwargs) -> None: - super(MediaJobOutputAsset, self).__init__(error=error, label=label, progress=progress, state=state, **kwargs) - self.asset_name = asset_name - self.odatatype = '#Microsoft.Media.JobOutputAsset' diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data.py deleted file mode 100644 index c082ca91470fa..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputCanceledEventData(MediaJobOutputStateChangeEventData): - """Job output canceled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputCanceledEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data_py3.py deleted file mode 100644 index 07fe3029aeb50..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data_py3.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputCanceledEventData(MediaJobOutputStateChangeEventData): - """Job output canceled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputCanceledEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data.py deleted file mode 100644 index 5b8f61dc14320..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputCancelingEventData(MediaJobOutputStateChangeEventData): - """Job output canceling event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputCancelingEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data_py3.py deleted file mode 100644 index 440bb91f08f4c..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data_py3.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputCancelingEventData(MediaJobOutputStateChangeEventData): - """Job output canceling event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputCancelingEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data.py deleted file mode 100644 index b6e9bf9f4bf07..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputErroredEventData(MediaJobOutputStateChangeEventData): - """Job output error event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputErroredEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data_py3.py deleted file mode 100644 index c6f8c6ed5eb23..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data_py3.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputErroredEventData(MediaJobOutputStateChangeEventData): - """Job output error event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputErroredEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data.py deleted file mode 100644 index ad08587a4d2a6..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputFinishedEventData(MediaJobOutputStateChangeEventData): - """Job output finished event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputFinishedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data_py3.py deleted file mode 100644 index d973441dfb22f..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data_py3.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputFinishedEventData(MediaJobOutputStateChangeEventData): - """Job output finished event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputFinishedEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data.py deleted file mode 100644 index 40bc096008887..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputProcessingEventData(MediaJobOutputStateChangeEventData): - """Job output processing event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputProcessingEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data_py3.py deleted file mode 100644 index ccf97c3470ecc..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data_py3.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputProcessingEventData(MediaJobOutputStateChangeEventData): - """Job output processing event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputProcessingEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data.py deleted file mode 100644 index 37c2c96624210..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data.py +++ /dev/null @@ -1,36 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutputProgressEventData(Model): - """Job Output Progress Event Data. - - :param label: Gets the Job output label. - :type label: str - :param progress: Gets the Job output progress. - :type progress: long - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputProgressEventData, self).__init__(**kwargs) - self.label = kwargs.get('label', None) - self.progress = kwargs.get('progress', None) - self.job_correlation_data = kwargs.get('job_correlation_data', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data_py3.py deleted file mode 100644 index 3f23816b7c37e..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data_py3.py +++ /dev/null @@ -1,36 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutputProgressEventData(Model): - """Job Output Progress Event Data. - - :param label: Gets the Job output label. - :type label: str - :param progress: Gets the Job output progress. - :type progress: long - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, label: str=None, progress: int=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputProgressEventData, self).__init__(**kwargs) - self.label = label - self.progress = progress - self.job_correlation_data = job_correlation_data diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_py3.py deleted file mode 100644 index 8be196363b908..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_py3.py +++ /dev/null @@ -1,61 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutput(Model): - """The event data for a Job output. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MediaJobOutputAsset - - All required parameters must be populated in order to send to Azure. - - :param error: Gets the Job output error. - :type error: ~azure.eventgrid.models.MediaJobError - :param label: Gets the Job output label. - :type label: str - :param progress: Required. Gets the Job output progress. - :type progress: long - :param state: Required. Gets the Job output state. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :type state: str or ~azure.eventgrid.models.MediaJobState - :param odatatype: Required. Constant filled by server. - :type odatatype: str - """ - - _validation = { - 'progress': {'required': True}, - 'state': {'required': True}, - 'odatatype': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'MediaJobError'}, - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - } - - _subtype_map = { - 'odatatype': {'#Microsoft.Media.JobOutputAsset': 'MediaJobOutputAsset'} - } - - def __init__(self, *, progress: int, state, error=None, label: str=None, **kwargs) -> None: - super(MediaJobOutput, self).__init__(**kwargs) - self.error = error - self.label = label - self.progress = progress - self.state = state - self.odatatype = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data.py deleted file mode 100644 index add4742a19e39..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputScheduledEventData(MediaJobOutputStateChangeEventData): - """Job output scheduled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputScheduledEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data_py3.py deleted file mode 100644 index a0ebd525de326..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data_py3.py +++ /dev/null @@ -1,42 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputScheduledEventData(MediaJobOutputStateChangeEventData): - """Job output scheduled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputScheduledEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data.py deleted file mode 100644 index f60b5b944a157..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data.py +++ /dev/null @@ -1,46 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutputStateChangeEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Media.JobOutputStateChange event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputStateChangeEventData, self).__init__(**kwargs) - self.previous_state = None - self.output = kwargs.get('output', None) - self.job_correlation_data = kwargs.get('job_correlation_data', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data_py3.py deleted file mode 100644 index 7c66b5dde9df3..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data_py3.py +++ /dev/null @@ -1,46 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutputStateChangeEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Media.JobOutputStateChange event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputStateChangeEventData, self).__init__(**kwargs) - self.previous_state = None - self.output = output - self.job_correlation_data = job_correlation_data diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data.py deleted file mode 100644 index 9723cb17d9c57..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobProcessingEventData(MediaJobStateChangeEventData): - """Job processing event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobProcessingEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data_py3.py deleted file mode 100644 index 6fa5a6bada00e..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data_py3.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobProcessingEventData(MediaJobStateChangeEventData): - """Job processing event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, *, correlation_data=None, **kwargs) -> None: - super(MediaJobProcessingEventData, self).__init__(correlation_data=correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data.py deleted file mode 100644 index e7f3ac435b4b8..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobScheduledEventData(MediaJobStateChangeEventData): - """Job scheduled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobScheduledEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data_py3.py deleted file mode 100644 index a48b518f50d72..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data_py3.py +++ /dev/null @@ -1,45 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobScheduledEventData(MediaJobStateChangeEventData): - """Job scheduled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, *, correlation_data=None, **kwargs) -> None: - super(MediaJobScheduledEventData, self).__init__(correlation_data=correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py deleted file mode 100644 index 180cc78a98fab..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py +++ /dev/null @@ -1,49 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobStateChangeEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Media.JobStateChange event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobStateChangeEventData, self).__init__(**kwargs) - self.previous_state = None - self.state = None - self.correlation_data = kwargs.get('correlation_data', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py deleted file mode 100644 index 669d790a18436..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py +++ /dev/null @@ -1,49 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobStateChangeEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Media.JobStateChange event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, *, correlation_data=None, **kwargs) -> None: - super(MediaJobStateChangeEventData, self).__init__(**kwargs) - self.previous_state = None - self.state = None - self.correlation_data = correlation_data diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py deleted file mode 100644 index 76a49ae592bdd..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py +++ /dev/null @@ -1,55 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventConnectionRejectedEventData(Model): - """Encoder connection rejected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar result_code: Gets the result code. - :vartype result_code: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'result_code': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventConnectionRejectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None - self.result_code = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data_py3.py deleted file mode 100644 index 3727fde97d6b6..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data_py3.py +++ /dev/null @@ -1,55 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventConnectionRejectedEventData(Model): - """Encoder connection rejected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar result_code: Gets the result code. - :vartype result_code: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'result_code': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventConnectionRejectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None - self.result_code = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data.py deleted file mode 100644 index 8b89a722d1171..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data.py +++ /dev/null @@ -1,50 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventEncoderConnectedEventData(Model): - """Encoder connect event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventEncoderConnectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data_py3.py deleted file mode 100644 index 64d9148ba7129..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data_py3.py +++ /dev/null @@ -1,50 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventEncoderConnectedEventData(Model): - """Encoder connect event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventEncoderConnectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data.py deleted file mode 100644 index 8fd787e6ebfa0..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data.py +++ /dev/null @@ -1,55 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventEncoderDisconnectedEventData(Model): - """Encoder disconnected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar result_code: Gets the result code. - :vartype result_code: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'result_code': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventEncoderDisconnectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None - self.result_code = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data_py3.py deleted file mode 100644 index 14df222bddacf..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data_py3.py +++ /dev/null @@ -1,55 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventEncoderDisconnectedEventData(Model): - """Encoder disconnected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar result_code: Gets the result code. - :vartype result_code: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'result_code': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventEncoderDisconnectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None - self.result_code = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data.py deleted file mode 100644 index 6210002346cd3..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data.py +++ /dev/null @@ -1,61 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingDataChunkDroppedEventData(Model): - """Ingest fragment dropped event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Gets the timestamp of the data chunk dropped. - :vartype timestamp: str - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar timescale: Gets the timescale of the Timestamp. - :vartype timescale: str - :ivar result_code: Gets the result code for fragment drop operation. - :vartype result_code: str - :ivar track_name: Gets the name of the track for which fragment is - dropped. - :vartype track_name: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'track_type': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'timescale': {'readonly': True}, - 'result_code': {'readonly': True}, - 'track_name': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIncomingDataChunkDroppedEventData, self).__init__(**kwargs) - self.timestamp = None - self.track_type = None - self.bitrate = None - self.timescale = None - self.result_code = None - self.track_name = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data_py3.py deleted file mode 100644 index 00fed549af42f..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data_py3.py +++ /dev/null @@ -1,61 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingDataChunkDroppedEventData(Model): - """Ingest fragment dropped event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Gets the timestamp of the data chunk dropped. - :vartype timestamp: str - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar timescale: Gets the timescale of the Timestamp. - :vartype timescale: str - :ivar result_code: Gets the result code for fragment drop operation. - :vartype result_code: str - :ivar track_name: Gets the name of the track for which fragment is - dropped. - :vartype track_name: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'track_type': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'timescale': {'readonly': True}, - 'result_code': {'readonly': True}, - 'track_name': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIncomingDataChunkDroppedEventData, self).__init__(**kwargs) - self.timestamp = None - self.track_type = None - self.bitrate = None - self.timescale = None - self.result_code = None - self.track_name = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data.py deleted file mode 100644 index 756218ad5856b..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data.py +++ /dev/null @@ -1,75 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingStreamReceivedEventData(Model): - """Encoder connect event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar timestamp: Gets the first timestamp of the data chunk received. - :vartype timestamp: str - :ivar duration: Gets the duration of the first data chunk. - :vartype duration: str - :ivar timescale: Gets the timescale in which timestamp is represented. - :vartype timescale: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'duration': {'readonly': True}, - 'timescale': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIncomingStreamReceivedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.track_type = None - self.track_name = None - self.bitrate = None - self.encoder_ip = None - self.encoder_port = None - self.timestamp = None - self.duration = None - self.timescale = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data_py3.py deleted file mode 100644 index 928dfc6661582..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data_py3.py +++ /dev/null @@ -1,75 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingStreamReceivedEventData(Model): - """Encoder connect event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar timestamp: Gets the first timestamp of the data chunk received. - :vartype timestamp: str - :ivar duration: Gets the duration of the first data chunk. - :vartype duration: str - :ivar timescale: Gets the timescale in which timestamp is represented. - :vartype timescale: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'duration': {'readonly': True}, - 'timescale': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIncomingStreamReceivedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.track_type = None - self.track_name = None - self.bitrate = None - self.encoder_ip = None - self.encoder_port = None - self.timestamp = None - self.duration = None - self.timescale = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data.py deleted file mode 100644 index c0fef1d78f95e..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data.py +++ /dev/null @@ -1,65 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingStreamsOutOfSyncEventData(Model): - """Incoming streams out of sync event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_last_timestamp: Gets the minimum last timestamp received. - :vartype min_last_timestamp: str - :ivar type_of_stream_with_min_last_timestamp: Gets the type of stream with - minimum last timestamp. - :vartype type_of_stream_with_min_last_timestamp: str - :ivar max_last_timestamp: Gets the maximum timestamp among all the tracks - (audio or video). - :vartype max_last_timestamp: str - :ivar type_of_stream_with_max_last_timestamp: Gets the type of stream with - maximum last timestamp. - :vartype type_of_stream_with_max_last_timestamp: str - :ivar timescale_of_min_last_timestamp: Gets the timescale in which - "MinLastTimestamp" is represented. - :vartype timescale_of_min_last_timestamp: str - :ivar timescale_of_max_last_timestamp: Gets the timescale in which - "MaxLastTimestamp" is represented. - :vartype timescale_of_max_last_timestamp: str - """ - - _validation = { - 'min_last_timestamp': {'readonly': True}, - 'type_of_stream_with_min_last_timestamp': {'readonly': True}, - 'max_last_timestamp': {'readonly': True}, - 'type_of_stream_with_max_last_timestamp': {'readonly': True}, - 'timescale_of_min_last_timestamp': {'readonly': True}, - 'timescale_of_max_last_timestamp': {'readonly': True}, - } - - _attribute_map = { - 'min_last_timestamp': {'key': 'minLastTimestamp', 'type': 'str'}, - 'type_of_stream_with_min_last_timestamp': {'key': 'typeOfStreamWithMinLastTimestamp', 'type': 'str'}, - 'max_last_timestamp': {'key': 'maxLastTimestamp', 'type': 'str'}, - 'type_of_stream_with_max_last_timestamp': {'key': 'typeOfStreamWithMaxLastTimestamp', 'type': 'str'}, - 'timescale_of_min_last_timestamp': {'key': 'timescaleOfMinLastTimestamp', 'type': 'str'}, - 'timescale_of_max_last_timestamp': {'key': 'timescaleOfMaxLastTimestamp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIncomingStreamsOutOfSyncEventData, self).__init__(**kwargs) - self.min_last_timestamp = None - self.type_of_stream_with_min_last_timestamp = None - self.max_last_timestamp = None - self.type_of_stream_with_max_last_timestamp = None - self.timescale_of_min_last_timestamp = None - self.timescale_of_max_last_timestamp = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data_py3.py deleted file mode 100644 index 0d1a4789aa37b..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data_py3.py +++ /dev/null @@ -1,65 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingStreamsOutOfSyncEventData(Model): - """Incoming streams out of sync event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_last_timestamp: Gets the minimum last timestamp received. - :vartype min_last_timestamp: str - :ivar type_of_stream_with_min_last_timestamp: Gets the type of stream with - minimum last timestamp. - :vartype type_of_stream_with_min_last_timestamp: str - :ivar max_last_timestamp: Gets the maximum timestamp among all the tracks - (audio or video). - :vartype max_last_timestamp: str - :ivar type_of_stream_with_max_last_timestamp: Gets the type of stream with - maximum last timestamp. - :vartype type_of_stream_with_max_last_timestamp: str - :ivar timescale_of_min_last_timestamp: Gets the timescale in which - "MinLastTimestamp" is represented. - :vartype timescale_of_min_last_timestamp: str - :ivar timescale_of_max_last_timestamp: Gets the timescale in which - "MaxLastTimestamp" is represented. - :vartype timescale_of_max_last_timestamp: str - """ - - _validation = { - 'min_last_timestamp': {'readonly': True}, - 'type_of_stream_with_min_last_timestamp': {'readonly': True}, - 'max_last_timestamp': {'readonly': True}, - 'type_of_stream_with_max_last_timestamp': {'readonly': True}, - 'timescale_of_min_last_timestamp': {'readonly': True}, - 'timescale_of_max_last_timestamp': {'readonly': True}, - } - - _attribute_map = { - 'min_last_timestamp': {'key': 'minLastTimestamp', 'type': 'str'}, - 'type_of_stream_with_min_last_timestamp': {'key': 'typeOfStreamWithMinLastTimestamp', 'type': 'str'}, - 'max_last_timestamp': {'key': 'maxLastTimestamp', 'type': 'str'}, - 'type_of_stream_with_max_last_timestamp': {'key': 'typeOfStreamWithMaxLastTimestamp', 'type': 'str'}, - 'timescale_of_min_last_timestamp': {'key': 'timescaleOfMinLastTimestamp', 'type': 'str'}, - 'timescale_of_max_last_timestamp': {'key': 'timescaleOfMaxLastTimestamp', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIncomingStreamsOutOfSyncEventData, self).__init__(**kwargs) - self.min_last_timestamp = None - self.type_of_stream_with_min_last_timestamp = None - self.max_last_timestamp = None - self.type_of_stream_with_max_last_timestamp = None - self.timescale_of_min_last_timestamp = None - self.timescale_of_max_last_timestamp = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data.py deleted file mode 100644 index e29df8e47d3fd..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data.py +++ /dev/null @@ -1,60 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(Model): - """Incoming video stream out of synch event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar first_timestamp: Gets the first timestamp received for one of the - quality levels. - :vartype first_timestamp: str - :ivar first_duration: Gets the duration of the data chunk with first - timestamp. - :vartype first_duration: str - :ivar second_timestamp: Gets the timestamp received for some other quality - levels. - :vartype second_timestamp: str - :ivar second_duration: Gets the duration of the data chunk with second - timestamp. - :vartype second_duration: str - :ivar timescale: Gets the timescale in which both the timestamps and - durations are represented. - :vartype timescale: str - """ - - _validation = { - 'first_timestamp': {'readonly': True}, - 'first_duration': {'readonly': True}, - 'second_timestamp': {'readonly': True}, - 'second_duration': {'readonly': True}, - 'timescale': {'readonly': True}, - } - - _attribute_map = { - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'first_duration': {'key': 'firstDuration', 'type': 'str'}, - 'second_timestamp': {'key': 'secondTimestamp', 'type': 'str'}, - 'second_duration': {'key': 'secondDuration', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, self).__init__(**kwargs) - self.first_timestamp = None - self.first_duration = None - self.second_timestamp = None - self.second_duration = None - self.timescale = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data_py3.py deleted file mode 100644 index f0963a0d6ec27..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data_py3.py +++ /dev/null @@ -1,60 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(Model): - """Incoming video stream out of synch event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar first_timestamp: Gets the first timestamp received for one of the - quality levels. - :vartype first_timestamp: str - :ivar first_duration: Gets the duration of the data chunk with first - timestamp. - :vartype first_duration: str - :ivar second_timestamp: Gets the timestamp received for some other quality - levels. - :vartype second_timestamp: str - :ivar second_duration: Gets the duration of the data chunk with second - timestamp. - :vartype second_duration: str - :ivar timescale: Gets the timescale in which both the timestamps and - durations are represented. - :vartype timescale: str - """ - - _validation = { - 'first_timestamp': {'readonly': True}, - 'first_duration': {'readonly': True}, - 'second_timestamp': {'readonly': True}, - 'second_duration': {'readonly': True}, - 'timescale': {'readonly': True}, - } - - _attribute_map = { - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'first_duration': {'key': 'firstDuration', 'type': 'str'}, - 'second_timestamp': {'key': 'secondTimestamp', 'type': 'str'}, - 'second_duration': {'key': 'secondDuration', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, self).__init__(**kwargs) - self.first_timestamp = None - self.first_duration = None - self.second_timestamp = None - self.second_duration = None - self.timescale = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data.py deleted file mode 100644 index 67928e5bd9387..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data.py +++ /dev/null @@ -1,91 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIngestHeartbeatEventData(Model): - """Ingest fragment dropped event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar incoming_bitrate: Gets the incoming bitrate. - :vartype incoming_bitrate: long - :ivar last_timestamp: Gets the last timestamp. - :vartype last_timestamp: str - :ivar timescale: Gets the timescale of the last timestamp. - :vartype timescale: str - :ivar overlap_count: Gets the fragment Overlap count. - :vartype overlap_count: long - :ivar discontinuity_count: Gets the fragment Discontinuity count. - :vartype discontinuity_count: long - :ivar nonincreasing_count: Gets Non increasing count. - :vartype nonincreasing_count: long - :ivar unexpected_bitrate: Gets a value indicating whether unexpected - bitrate is present or not. - :vartype unexpected_bitrate: bool - :ivar state: Gets the state of the live event. - :vartype state: str - :ivar healthy: Gets a value indicating whether preview is healthy or not. - :vartype healthy: bool - """ - - _validation = { - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'incoming_bitrate': {'readonly': True}, - 'last_timestamp': {'readonly': True}, - 'timescale': {'readonly': True}, - 'overlap_count': {'readonly': True}, - 'discontinuity_count': {'readonly': True}, - 'nonincreasing_count': {'readonly': True}, - 'unexpected_bitrate': {'readonly': True}, - 'state': {'readonly': True}, - 'healthy': {'readonly': True}, - } - - _attribute_map = { - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'incoming_bitrate': {'key': 'incomingBitrate', 'type': 'long'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'overlap_count': {'key': 'overlapCount', 'type': 'long'}, - 'discontinuity_count': {'key': 'discontinuityCount', 'type': 'long'}, - 'nonincreasing_count': {'key': 'nonincreasingCount', 'type': 'long'}, - 'unexpected_bitrate': {'key': 'unexpectedBitrate', 'type': 'bool'}, - 'state': {'key': 'state', 'type': 'str'}, - 'healthy': {'key': 'healthy', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIngestHeartbeatEventData, self).__init__(**kwargs) - self.track_type = None - self.track_name = None - self.bitrate = None - self.incoming_bitrate = None - self.last_timestamp = None - self.timescale = None - self.overlap_count = None - self.discontinuity_count = None - self.nonincreasing_count = None - self.unexpected_bitrate = None - self.state = None - self.healthy = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data_py3.py deleted file mode 100644 index 6f9447c3a23ea..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data_py3.py +++ /dev/null @@ -1,91 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIngestHeartbeatEventData(Model): - """Ingest fragment dropped event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar incoming_bitrate: Gets the incoming bitrate. - :vartype incoming_bitrate: long - :ivar last_timestamp: Gets the last timestamp. - :vartype last_timestamp: str - :ivar timescale: Gets the timescale of the last timestamp. - :vartype timescale: str - :ivar overlap_count: Gets the fragment Overlap count. - :vartype overlap_count: long - :ivar discontinuity_count: Gets the fragment Discontinuity count. - :vartype discontinuity_count: long - :ivar nonincreasing_count: Gets Non increasing count. - :vartype nonincreasing_count: long - :ivar unexpected_bitrate: Gets a value indicating whether unexpected - bitrate is present or not. - :vartype unexpected_bitrate: bool - :ivar state: Gets the state of the live event. - :vartype state: str - :ivar healthy: Gets a value indicating whether preview is healthy or not. - :vartype healthy: bool - """ - - _validation = { - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'incoming_bitrate': {'readonly': True}, - 'last_timestamp': {'readonly': True}, - 'timescale': {'readonly': True}, - 'overlap_count': {'readonly': True}, - 'discontinuity_count': {'readonly': True}, - 'nonincreasing_count': {'readonly': True}, - 'unexpected_bitrate': {'readonly': True}, - 'state': {'readonly': True}, - 'healthy': {'readonly': True}, - } - - _attribute_map = { - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'incoming_bitrate': {'key': 'incomingBitrate', 'type': 'long'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'overlap_count': {'key': 'overlapCount', 'type': 'long'}, - 'discontinuity_count': {'key': 'discontinuityCount', 'type': 'long'}, - 'nonincreasing_count': {'key': 'nonincreasingCount', 'type': 'long'}, - 'unexpected_bitrate': {'key': 'unexpectedBitrate', 'type': 'bool'}, - 'state': {'key': 'state', 'type': 'str'}, - 'healthy': {'key': 'healthy', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIngestHeartbeatEventData, self).__init__(**kwargs) - self.track_type = None - self.track_name = None - self.bitrate = None - self.incoming_bitrate = None - self.last_timestamp = None - self.timescale = None - self.overlap_count = None - self.discontinuity_count = None - self.nonincreasing_count = None - self.unexpected_bitrate = None - self.state = None - self.healthy = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data.py deleted file mode 100644 index d60c04d8f294e..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data.py +++ /dev/null @@ -1,67 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventTrackDiscontinuityDetectedEventData(Model): - """Ingest track discontinuity detected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate. - :vartype bitrate: long - :ivar previous_timestamp: Gets the timestamp of the previous fragment. - :vartype previous_timestamp: str - :ivar new_timestamp: Gets the timestamp of the current fragment. - :vartype new_timestamp: str - :ivar timescale: Gets the timescale in which both timestamps and - discontinuity gap are represented. - :vartype timescale: str - :ivar discontinuity_gap: Gets the discontinuity gap between - PreviousTimestamp and NewTimestamp. - :vartype discontinuity_gap: str - """ - - _validation = { - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'previous_timestamp': {'readonly': True}, - 'new_timestamp': {'readonly': True}, - 'timescale': {'readonly': True}, - 'discontinuity_gap': {'readonly': True}, - } - - _attribute_map = { - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'previous_timestamp': {'key': 'previousTimestamp', 'type': 'str'}, - 'new_timestamp': {'key': 'newTimestamp', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'discontinuity_gap': {'key': 'discontinuityGap', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventTrackDiscontinuityDetectedEventData, self).__init__(**kwargs) - self.track_type = None - self.track_name = None - self.bitrate = None - self.previous_timestamp = None - self.new_timestamp = None - self.timescale = None - self.discontinuity_gap = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data_py3.py deleted file mode 100644 index 872d6094d5ce5..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data_py3.py +++ /dev/null @@ -1,67 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventTrackDiscontinuityDetectedEventData(Model): - """Ingest track discontinuity detected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate. - :vartype bitrate: long - :ivar previous_timestamp: Gets the timestamp of the previous fragment. - :vartype previous_timestamp: str - :ivar new_timestamp: Gets the timestamp of the current fragment. - :vartype new_timestamp: str - :ivar timescale: Gets the timescale in which both timestamps and - discontinuity gap are represented. - :vartype timescale: str - :ivar discontinuity_gap: Gets the discontinuity gap between - PreviousTimestamp and NewTimestamp. - :vartype discontinuity_gap: str - """ - - _validation = { - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'previous_timestamp': {'readonly': True}, - 'new_timestamp': {'readonly': True}, - 'timescale': {'readonly': True}, - 'discontinuity_gap': {'readonly': True}, - } - - _attribute_map = { - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'previous_timestamp': {'key': 'previousTimestamp', 'type': 'str'}, - 'new_timestamp': {'key': 'newTimestamp', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'discontinuity_gap': {'key': 'discontinuityGap', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventTrackDiscontinuityDetectedEventData, self).__init__(**kwargs) - self.track_type = None - self.track_name = None - self.bitrate = None - self.previous_timestamp = None - self.new_timestamp = None - self.timescale = None - self.discontinuity_gap = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py deleted file mode 100644 index 3a01e07bbf843..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionCancelData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Resources.ResourceActionCancel event. This is raised when a - resource action operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceActionCancelData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py deleted file mode 100644 index 7999e471f5425..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionCancelData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Resources.ResourceActionCancel event. This is raised when a - resource action operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceActionCancelData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py deleted file mode 100644 index bb3225665c81a..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceActionFailure event. This is raised when a - resource action operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceActionFailureData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py deleted file mode 100644 index 2c356d0b0340e..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceActionFailure event. This is raised when a - resource action operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceActionFailureData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py deleted file mode 100644 index 559817f997ca0..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceActionSuccess event. This is raised when a - resource action operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceActionSuccessData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py deleted file mode 100644 index 59e9f32f46fcf..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceActionSuccess event. This is raised when a - resource action operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceActionSuccessData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data.py deleted file mode 100644 index fe44a24f34827..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteCancelData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Resources.ResourceDeleteCancel event. This is raised when a - resource delete operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceDeleteCancelData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data_py3.py deleted file mode 100644 index d160235c5335d..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteCancelData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Resources.ResourceDeleteCancel event. This is raised when a - resource delete operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceDeleteCancelData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data.py deleted file mode 100644 index 1354bd7943fab..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceDeleteFailure event. This is raised when a - resource delete operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceDeleteFailureData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data_py3.py deleted file mode 100644 index 29524ca382b84..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceDeleteFailure event. This is raised when a - resource delete operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceDeleteFailureData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data.py deleted file mode 100644 index a8a114e554c65..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a - resource delete operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceDeleteSuccessData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data_py3.py deleted file mode 100644 index 6775b5666aa0b..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a - resource delete operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceDeleteSuccessData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data.py deleted file mode 100644 index 7e1b1e14e3513..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteCancelData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteCancel event. This is raised when a - resource create or update operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceWriteCancelData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data_py3.py deleted file mode 100644 index c2ab521c0495a..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteCancelData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteCancel event. This is raised when a - resource create or update operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceWriteCancelData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data.py deleted file mode 100644 index d36108de8d301..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteFailure event. This is raised when a - resource create or update operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceWriteFailureData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data_py3.py deleted file mode 100644 index ab45309bd1806..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteFailure event. This is raised when a - resource create or update operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceWriteFailureData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data.py deleted file mode 100644 index a38370581387a..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteSuccess event. This is raised when a - resource create or update operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceWriteSuccessData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data_py3.py deleted file mode 100644 index 0aed7ef74931a..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data_py3.py +++ /dev/null @@ -1,70 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteSuccess event. This is raised when a - resource create or update operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceWriteSuccessData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py deleted file mode 100644 index c409c8396a059..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py +++ /dev/null @@ -1,55 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. - - :param namespace_name: The namespace name of the Microsoft.ServiceBus - resource. - :type namespace_name: str - :param request_uri: The endpoint of the Microsoft.ServiceBus resource. - :type request_uri: str - :param entity_type: The entity type of the Microsoft.ServiceBus resource. - Could be one of 'queue' or 'subscriber'. - :type entity_type: str - :param queue_name: The name of the Microsoft.ServiceBus queue. If the - entity type is of type 'subscriber', then this value will be null. - :type queue_name: str - :param topic_name: The name of the Microsoft.ServiceBus topic. If the - entity type is of type 'queue', then this value will be null. - :type topic_name: str - :param subscription_name: The name of the Microsoft.ServiceBus topic's - subscription. If the entity type is of type 'queue', then this value will - be null. - :type subscription_name: str - """ - - _attribute_map = { - 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, - 'request_uri': {'key': 'requestUri', 'type': 'str'}, - 'entity_type': {'key': 'entityType', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'topic_name': {'key': 'topicName', 'type': 'str'}, - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) - self.namespace_name = kwargs.get('namespace_name', None) - self.request_uri = kwargs.get('request_uri', None) - self.entity_type = kwargs.get('entity_type', None) - self.queue_name = kwargs.get('queue_name', None) - self.topic_name = kwargs.get('topic_name', None) - self.subscription_name = kwargs.get('subscription_name', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py deleted file mode 100644 index 35a4108ae4d9f..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py +++ /dev/null @@ -1,55 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. - - :param namespace_name: The namespace name of the Microsoft.ServiceBus - resource. - :type namespace_name: str - :param request_uri: The endpoint of the Microsoft.ServiceBus resource. - :type request_uri: str - :param entity_type: The entity type of the Microsoft.ServiceBus resource. - Could be one of 'queue' or 'subscriber'. - :type entity_type: str - :param queue_name: The name of the Microsoft.ServiceBus queue. If the - entity type is of type 'subscriber', then this value will be null. - :type queue_name: str - :param topic_name: The name of the Microsoft.ServiceBus topic. If the - entity type is of type 'queue', then this value will be null. - :type topic_name: str - :param subscription_name: The name of the Microsoft.ServiceBus topic's - subscription. If the entity type is of type 'queue', then this value will - be null. - :type subscription_name: str - """ - - _attribute_map = { - 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, - 'request_uri': {'key': 'requestUri', 'type': 'str'}, - 'entity_type': {'key': 'entityType', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'topic_name': {'key': 'topicName', 'type': 'str'}, - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: - super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) - self.namespace_name = namespace_name - self.request_uri = request_uri - self.entity_type = entity_type - self.queue_name = queue_name - self.topic_name = topic_name - self.subscription_name = subscription_name diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py deleted file mode 100644 index 60310de45628a..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py +++ /dev/null @@ -1,55 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. - - :param namespace_name: The namespace name of the Microsoft.ServiceBus - resource. - :type namespace_name: str - :param request_uri: The endpoint of the Microsoft.ServiceBus resource. - :type request_uri: str - :param entity_type: The entity type of the Microsoft.ServiceBus resource. - Could be one of 'queue' or 'subscriber'. - :type entity_type: str - :param queue_name: The name of the Microsoft.ServiceBus queue. If the - entity type is of type 'subscriber', then this value will be null. - :type queue_name: str - :param topic_name: The name of the Microsoft.ServiceBus topic. If the - entity type is of type 'queue', then this value will be null. - :type topic_name: str - :param subscription_name: The name of the Microsoft.ServiceBus topic's - subscription. If the entity type is of type 'queue', then this value will - be null. - :type subscription_name: str - """ - - _attribute_map = { - 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, - 'request_uri': {'key': 'requestUri', 'type': 'str'}, - 'entity_type': {'key': 'entityType', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'topic_name': {'key': 'topicName', 'type': 'str'}, - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) - self.namespace_name = kwargs.get('namespace_name', None) - self.request_uri = kwargs.get('request_uri', None) - self.entity_type = kwargs.get('entity_type', None) - self.queue_name = kwargs.get('queue_name', None) - self.topic_name = kwargs.get('topic_name', None) - self.subscription_name = kwargs.get('subscription_name', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py deleted file mode 100644 index 3f8afafc482c9..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py +++ /dev/null @@ -1,55 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. - - :param namespace_name: The namespace name of the Microsoft.ServiceBus - resource. - :type namespace_name: str - :param request_uri: The endpoint of the Microsoft.ServiceBus resource. - :type request_uri: str - :param entity_type: The entity type of the Microsoft.ServiceBus resource. - Could be one of 'queue' or 'subscriber'. - :type entity_type: str - :param queue_name: The name of the Microsoft.ServiceBus queue. If the - entity type is of type 'subscriber', then this value will be null. - :type queue_name: str - :param topic_name: The name of the Microsoft.ServiceBus topic. If the - entity type is of type 'queue', then this value will be null. - :type topic_name: str - :param subscription_name: The name of the Microsoft.ServiceBus topic's - subscription. If the entity type is of type 'queue', then this value will - be null. - :type subscription_name: str - """ - - _attribute_map = { - 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, - 'request_uri': {'key': 'requestUri', 'type': 'str'}, - 'entity_type': {'key': 'entityType', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'topic_name': {'key': 'topicName', 'type': 'str'}, - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: - super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) - self.namespace_name = namespace_name - self.request_uri = request_uri - self.entity_type = entity_type - self.queue_name = queue_name - self.topic_name = topic_name - self.subscription_name = subscription_name diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data.py deleted file mode 100644 index f48d5ff56765d..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data.py +++ /dev/null @@ -1,41 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRServiceClientConnectionConnectedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.SignalRService.ClientConnectionConnected event. - - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param hub: The hub of connected client connection. - :type hub: str - :param connection_id: The connection Id of connected client connection. - :type connection_id: str - :param user_id: The user Id of connected client connection. - :type user_id: str - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'hub': {'key': 'hub', 'type': 'str'}, - 'connection_id': {'key': 'connectionId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRServiceClientConnectionConnectedEventData, self).__init__(**kwargs) - self.timestamp = kwargs.get('timestamp', None) - self.hub = kwargs.get('hub', None) - self.connection_id = kwargs.get('connection_id', None) - self.user_id = kwargs.get('user_id', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data_py3.py deleted file mode 100644 index 2237e0ed5becf..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data_py3.py +++ /dev/null @@ -1,41 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRServiceClientConnectionConnectedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.SignalRService.ClientConnectionConnected event. - - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param hub: The hub of connected client connection. - :type hub: str - :param connection_id: The connection Id of connected client connection. - :type connection_id: str - :param user_id: The user Id of connected client connection. - :type user_id: str - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'hub': {'key': 'hub', 'type': 'str'}, - 'connection_id': {'key': 'connectionId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - } - - def __init__(self, *, timestamp=None, hub: str=None, connection_id: str=None, user_id: str=None, **kwargs) -> None: - super(SignalRServiceClientConnectionConnectedEventData, self).__init__(**kwargs) - self.timestamp = timestamp - self.hub = hub - self.connection_id = connection_id - self.user_id = user_id diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data.py deleted file mode 100644 index d888c23cd9dca..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data.py +++ /dev/null @@ -1,46 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRServiceClientConnectionDisconnectedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.SignalRService.ClientConnectionDisconnected event. - - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param hub: The hub of connected client connection. - :type hub: str - :param connection_id: The connection Id of connected client connection. - :type connection_id: str - :param user_id: The user Id of connected client connection. - :type user_id: str - :param error_message: The message of error that cause the client - connection disconnected. - :type error_message: str - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'hub': {'key': 'hub', 'type': 'str'}, - 'connection_id': {'key': 'connectionId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRServiceClientConnectionDisconnectedEventData, self).__init__(**kwargs) - self.timestamp = kwargs.get('timestamp', None) - self.hub = kwargs.get('hub', None) - self.connection_id = kwargs.get('connection_id', None) - self.user_id = kwargs.get('user_id', None) - self.error_message = kwargs.get('error_message', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data_py3.py deleted file mode 100644 index 44e722c83d3a3..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data_py3.py +++ /dev/null @@ -1,46 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRServiceClientConnectionDisconnectedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.SignalRService.ClientConnectionDisconnected event. - - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param hub: The hub of connected client connection. - :type hub: str - :param connection_id: The connection Id of connected client connection. - :type connection_id: str - :param user_id: The user Id of connected client connection. - :type user_id: str - :param error_message: The message of error that cause the client - connection disconnected. - :type error_message: str - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'hub': {'key': 'hub', 'type': 'str'}, - 'connection_id': {'key': 'connectionId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - } - - def __init__(self, *, timestamp=None, hub: str=None, connection_id: str=None, user_id: str=None, error_message: str=None, **kwargs) -> None: - super(SignalRServiceClientConnectionDisconnectedEventData, self).__init__(**kwargs) - self.timestamp = timestamp - self.hub = hub - self.connection_id = connection_id - self.user_id = user_id - self.error_message = error_message diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data.py deleted file mode 100644 index edb52bb6a7209..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data.py +++ /dev/null @@ -1,74 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageBlobCreatedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Storage.BlobCreated event. - - :param api: The name of the API/operation that triggered this event. - :type api: str - :param client_request_id: A request id provided by the client of the - storage API operation that triggered this event. - :type client_request_id: str - :param request_id: The request id generated by the Storage service for the - storage API operation that triggered this event. - :type request_id: str - :param e_tag: The etag of the object at the time this event was triggered. - :type e_tag: str - :param content_type: The content type of the blob. This is the same as - what would be returned in the Content-Type header from the blob. - :type content_type: str - :param content_length: The size of the blob in bytes. This is the same as - what would be returned in the Content-Length header from the blob. - :type content_length: long - :param blob_type: The type of blob. - :type blob_type: str - :param url: The path to the blob. - :type url: str - :param sequencer: An opaque string value representing the logical sequence - of events for any particular blob name. Users can use standard string - comparison to understand the relative sequence of two events on the same - blob name. - :type sequencer: str - :param storage_diagnostics: For service use only. Diagnostic data - occasionally included by the Azure Storage service. This property should - be ignored by event consumers. - :type storage_diagnostics: object - """ - - _attribute_map = { - 'api': {'key': 'api', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_length': {'key': 'contentLength', 'type': 'long'}, - 'blob_type': {'key': 'blobType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'sequencer': {'key': 'sequencer', 'type': 'str'}, - 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(StorageBlobCreatedEventData, self).__init__(**kwargs) - self.api = kwargs.get('api', None) - self.client_request_id = kwargs.get('client_request_id', None) - self.request_id = kwargs.get('request_id', None) - self.e_tag = kwargs.get('e_tag', None) - self.content_type = kwargs.get('content_type', None) - self.content_length = kwargs.get('content_length', None) - self.blob_type = kwargs.get('blob_type', None) - self.url = kwargs.get('url', None) - self.sequencer = kwargs.get('sequencer', None) - self.storage_diagnostics = kwargs.get('storage_diagnostics', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data_py3.py deleted file mode 100644 index 78914ab25fba8..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data_py3.py +++ /dev/null @@ -1,74 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageBlobCreatedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Storage.BlobCreated event. - - :param api: The name of the API/operation that triggered this event. - :type api: str - :param client_request_id: A request id provided by the client of the - storage API operation that triggered this event. - :type client_request_id: str - :param request_id: The request id generated by the Storage service for the - storage API operation that triggered this event. - :type request_id: str - :param e_tag: The etag of the object at the time this event was triggered. - :type e_tag: str - :param content_type: The content type of the blob. This is the same as - what would be returned in the Content-Type header from the blob. - :type content_type: str - :param content_length: The size of the blob in bytes. This is the same as - what would be returned in the Content-Length header from the blob. - :type content_length: long - :param blob_type: The type of blob. - :type blob_type: str - :param url: The path to the blob. - :type url: str - :param sequencer: An opaque string value representing the logical sequence - of events for any particular blob name. Users can use standard string - comparison to understand the relative sequence of two events on the same - blob name. - :type sequencer: str - :param storage_diagnostics: For service use only. Diagnostic data - occasionally included by the Azure Storage service. This property should - be ignored by event consumers. - :type storage_diagnostics: object - """ - - _attribute_map = { - 'api': {'key': 'api', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_length': {'key': 'contentLength', 'type': 'long'}, - 'blob_type': {'key': 'blobType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'sequencer': {'key': 'sequencer', 'type': 'str'}, - 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, - } - - def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, e_tag: str=None, content_type: str=None, content_length: int=None, blob_type: str=None, url: str=None, sequencer: str=None, storage_diagnostics=None, **kwargs) -> None: - super(StorageBlobCreatedEventData, self).__init__(**kwargs) - self.api = api - self.client_request_id = client_request_id - self.request_id = request_id - self.e_tag = e_tag - self.content_type = content_type - self.content_length = content_length - self.blob_type = blob_type - self.url = url - self.sequencer = sequencer - self.storage_diagnostics = storage_diagnostics diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data.py deleted file mode 100644 index 1b869057d2804..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data.py +++ /dev/null @@ -1,65 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageBlobDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Storage.BlobDeleted event. - - :param api: The name of the API/operation that triggered this event. - :type api: str - :param client_request_id: A request id provided by the client of the - storage API operation that triggered this event. - :type client_request_id: str - :param request_id: The request id generated by the Storage service for the - storage API operation that triggered this event. - :type request_id: str - :param content_type: The content type of the blob. This is the same as - what would be returned in the Content-Type header from the blob. - :type content_type: str - :param blob_type: The type of blob. - :type blob_type: str - :param url: The path to the blob. - :type url: str - :param sequencer: An opaque string value representing the logical sequence - of events for any particular blob name. Users can use standard string - comparison to understand the relative sequence of two events on the same - blob name. - :type sequencer: str - :param storage_diagnostics: For service use only. Diagnostic data - occasionally included by the Azure Storage service. This property should - be ignored by event consumers. - :type storage_diagnostics: object - """ - - _attribute_map = { - 'api': {'key': 'api', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'blob_type': {'key': 'blobType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'sequencer': {'key': 'sequencer', 'type': 'str'}, - 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(StorageBlobDeletedEventData, self).__init__(**kwargs) - self.api = kwargs.get('api', None) - self.client_request_id = kwargs.get('client_request_id', None) - self.request_id = kwargs.get('request_id', None) - self.content_type = kwargs.get('content_type', None) - self.blob_type = kwargs.get('blob_type', None) - self.url = kwargs.get('url', None) - self.sequencer = kwargs.get('sequencer', None) - self.storage_diagnostics = kwargs.get('storage_diagnostics', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data_py3.py deleted file mode 100644 index 7565e6572c244..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data_py3.py +++ /dev/null @@ -1,65 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageBlobDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Storage.BlobDeleted event. - - :param api: The name of the API/operation that triggered this event. - :type api: str - :param client_request_id: A request id provided by the client of the - storage API operation that triggered this event. - :type client_request_id: str - :param request_id: The request id generated by the Storage service for the - storage API operation that triggered this event. - :type request_id: str - :param content_type: The content type of the blob. This is the same as - what would be returned in the Content-Type header from the blob. - :type content_type: str - :param blob_type: The type of blob. - :type blob_type: str - :param url: The path to the blob. - :type url: str - :param sequencer: An opaque string value representing the logical sequence - of events for any particular blob name. Users can use standard string - comparison to understand the relative sequence of two events on the same - blob name. - :type sequencer: str - :param storage_diagnostics: For service use only. Diagnostic data - occasionally included by the Azure Storage service. This property should - be ignored by event consumers. - :type storage_diagnostics: object - """ - - _attribute_map = { - 'api': {'key': 'api', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'blob_type': {'key': 'blobType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'sequencer': {'key': 'sequencer', 'type': 'str'}, - 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, - } - - def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, content_type: str=None, blob_type: str=None, url: str=None, sequencer: str=None, storage_diagnostics=None, **kwargs) -> None: - super(StorageBlobDeletedEventData, self).__init__(**kwargs) - self.api = api - self.client_request_id = client_request_id - self.request_id = request_id - self.content_type = content_type - self.blob_type = blob_type - self.url = url - self.sequencer = sequencer - self.storage_diagnostics = storage_diagnostics diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py deleted file mode 100644 index 2aa366646706b..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py +++ /dev/null @@ -1,37 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.EventGrid.SubscriptionDeletedEvent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar event_subscription_id: The Azure resource ID of the deleted event - subscription. - :vartype event_subscription_id: str - """ - - _validation = { - 'event_subscription_id': {'readonly': True}, - } - - _attribute_map = { - 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionDeletedEventData, self).__init__(**kwargs) - self.event_subscription_id = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py deleted file mode 100644 index 133338d9d1128..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py +++ /dev/null @@ -1,37 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.EventGrid.SubscriptionDeletedEvent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar event_subscription_id: The Azure resource ID of the deleted event - subscription. - :vartype event_subscription_id: str - """ - - _validation = { - 'event_subscription_id': {'readonly': True}, - } - - _attribute_map = { - 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionDeletedEventData, self).__init__(**kwargs) - self.event_subscription_id = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py deleted file mode 100644 index f9d0bfe7c431d..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py +++ /dev/null @@ -1,50 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionValidationEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.EventGrid.SubscriptionValidationEvent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar validation_code: The validation code sent by Azure Event Grid to - validate an event subscription. To complete the validation handshake, the - subscriber must either respond with this validation code as part of the - validation response, or perform a GET request on the validationUrl - (available starting version 2018-05-01-preview). - :vartype validation_code: str - :ivar validation_url: The validation URL sent by Azure Event Grid - (available starting version 2018-05-01-preview). To complete the - validation handshake, the subscriber must either respond with the - validationCode as part of the validation response, or perform a GET - request on the validationUrl (available starting version - 2018-05-01-preview). - :vartype validation_url: str - """ - - _validation = { - 'validation_code': {'readonly': True}, - 'validation_url': {'readonly': True}, - } - - _attribute_map = { - 'validation_code': {'key': 'validationCode', 'type': 'str'}, - 'validation_url': {'key': 'validationUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionValidationEventData, self).__init__(**kwargs) - self.validation_code = None - self.validation_url = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py deleted file mode 100644 index b4302b98927b0..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py +++ /dev/null @@ -1,50 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionValidationEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.EventGrid.SubscriptionValidationEvent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar validation_code: The validation code sent by Azure Event Grid to - validate an event subscription. To complete the validation handshake, the - subscriber must either respond with this validation code as part of the - validation response, or perform a GET request on the validationUrl - (available starting version 2018-05-01-preview). - :vartype validation_code: str - :ivar validation_url: The validation URL sent by Azure Event Grid - (available starting version 2018-05-01-preview). To complete the - validation handshake, the subscriber must either respond with the - validationCode as part of the validation response, or perform a GET - request on the validationUrl (available starting version - 2018-05-01-preview). - :vartype validation_url: str - """ - - _validation = { - 'validation_code': {'readonly': True}, - 'validation_url': {'readonly': True}, - } - - _attribute_map = { - 'validation_code': {'key': 'validationCode', 'type': 'str'}, - 'validation_url': {'key': 'validationUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionValidationEventData, self).__init__(**kwargs) - self.validation_code = None - self.validation_url = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py deleted file mode 100644 index 034d55d1faf18..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py +++ /dev/null @@ -1,32 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionValidationResponse(Model): - """To complete an event subscription validation handshake, a subscriber can - use either the validationCode or the validationUrl received in a - SubscriptionValidationEvent. When the validationCode is used, the - SubscriptionValidationResponse can be used to build the response. - - :param validation_response: The validation response sent by the subscriber - to Azure Event Grid to complete the validation of an event subscription. - :type validation_response: str - """ - - _attribute_map = { - 'validation_response': {'key': 'validationResponse', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionValidationResponse, self).__init__(**kwargs) - self.validation_response = kwargs.get('validation_response', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py deleted file mode 100644 index dc76e2a5ca6f6..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py +++ /dev/null @@ -1,32 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionValidationResponse(Model): - """To complete an event subscription validation handshake, a subscriber can - use either the validationCode or the validationUrl received in a - SubscriptionValidationEvent. When the validationCode is used, the - SubscriptionValidationResponse can be used to build the response. - - :param validation_response: The validation response sent by the subscriber - to Azure Event Grid to complete the validation of an event subscription. - :type validation_response: str - """ - - _attribute_map = { - 'validation_response': {'key': 'validationResponse', 'type': 'str'}, - } - - def __init__(self, *, validation_response: str=None, **kwargs) -> None: - super(SubscriptionValidationResponse, self).__init__(**kwargs) - self.validation_response = validation_response diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/version.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/version.py deleted file mode 100644 index d24076f8d84b8..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/version.py +++ /dev/null @@ -1,13 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "1.3.0" - diff --git a/sdk/eventgrid/azure-eventgrid/dev_requirements.txt b/sdk/eventgrid/azure-eventgrid/dev_requirements.txt index f6457a93d5e82..2d79b6ebd683c 100644 --- a/sdk/eventgrid/azure-eventgrid/dev_requirements.txt +++ b/sdk/eventgrid/azure-eventgrid/dev_requirements.txt @@ -1 +1,5 @@ --e ../../../tools/azure-sdk-tools \ No newline at end of file +-e ../../../tools/azure-devtools +-e ../../../tools/azure-sdk-tools +-e ../../core/azure-core +-e ../../identity/azure-identity +-e ../azure-mgmt-eventgrid diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs1_publish_custom_events_to_a_topic.py b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs1_publish_custom_events_to_a_topic.py new file mode 100644 index 0000000000000..9fb0cd9e559e3 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs1_publish_custom_events_to_a_topic.py @@ -0,0 +1,36 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: cs1_publish_custom_events_to_a_topic.py +DESCRIPTION: + These samples demonstrate sending an EventGrid Event. +USAGE: + python cs1_publish_custom_events_to_a_topic.py + Set the environment variables with your own values before running the sample: + 1) EG_ACCESS_KEY - The access key of your eventgrid account. + 2) EG_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". +""" + +from azure.eventgrid import EventGridPublisherClient, EventGridEvent, CloudEvent +from azure.core.credentials import AzureKeyCredential + +topic_key = os.environ["EG_ACCESS_KEY"] +topic_hostname = os.environ["EG_TOPIC_HOSTNAME"] + +credential = AzureKeyCredential(topic_key) +client = EventGridPublisherClient(topic_hostname, credential) + +client.send([ + EventGridEvent( + event_type="Contoso.Items.ItemReceived", + data={ + "itemSku": "Contoso Item SKU #1" + }, + subject="Door1", + data_version="2.0" + ) +]) \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs1b_publish_custom_events_to_a_topic_with_signature.py b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs1b_publish_custom_events_to_a_topic_with_signature.py new file mode 100644 index 0000000000000..fc28c92e07267 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs1b_publish_custom_events_to_a_topic_with_signature.py @@ -0,0 +1,38 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: cs1b_publish_custom_events_to_a_topic_with_signature.py +DESCRIPTION: + These samples demonstrate sending an EventGrid Event using a shared access signature for authentication. +USAGE: + python cs1b_publish_custom_events_to_a_topic_with_signature.py + Set the environment variables with your own values before running the sample: + 1) EG_ACCESS_KEY - The access key of your eventgrid account. + 2) EG_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". +""" + +from azure.eventgrid import EventGridPublisherClient, EventGridEvent, CloudEvent, generate_shared_access_signature, EventGridSharedAccessSignatureCredential +from azure.core.credentials import AzureKeyCredential + +topic_key = os.environ["EG_ACCESS_KEY"] +topic_hostname = os.environ["EG_TOPIC_HOSTNAME"] +expiration_date_utc = dt.datetime.now(tzutc()) + timedelta(hours=1) + +signature = generate_shared_access_signature(topic_hostname, topic_key, expiration_date_utc) +credential = EventGridSharedAccessSignatureCredential(signature) +client = EventGridPublisherClient(topic_hostname, credential) + +client.send([ + EventGridEvent( + event_type="Contoso.Items.ItemReceived", + data={ + "itemSku": "Contoso Item SKU #1" + }, + subject="Door1", + data_version="2.0" + ) +]) \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs2_publish_custom_events_to_a_domain_topic.py b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs2_publish_custom_events_to_a_domain_topic.py new file mode 100644 index 0000000000000..0cbb9397c0fcf --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs2_publish_custom_events_to_a_domain_topic.py @@ -0,0 +1,46 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: cs2_publish_custom_events_to_a_domain_topic.py +DESCRIPTION: + These samples demonstrate creating a list of EventGrid Events and sending them as a list. +USAGE: + python cs2_publish_custom_events_to_a_domain_topic.py + Set the environment variables with your own values before running the sample: + 1) EG_ACCESS_KEY - The access key of your eventgrid account. + 2) EG_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". +""" + +from azure.eventgrid import EventGridPublisherClient, EventGridEvent +from azure.core.credentials import AzureKeyCredential + +domain_key = os.environ["EG_ACCESS_KEY"] +domain_hostname = os.environ["EG_TOPIC_HOSTNAME"] + +credential = AzureKeyCredential(domain_key) +client = EventGridPublisherClient(domain_hostname, credential) + +client.send([ + EventGridEvent( + topic="MyCustomDomainTopic1", + event_type="Contoso.Items.ItemReceived", + data={ + "itemSku": "Contoso Item SKU #1" + }, + subject="Door1", + data_version="2.0" + ), + EventGridEvent( + topic="MyCustomDomainTopic2", + event_type="Contoso.Items.ItemReceived", + data={ + "itemSku": "Contoso Item SKU #2" + }, + subject="Door1", + data_version="2.0" + ) +]) diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_consume_system_events.py b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_consume_system_events.py new file mode 100644 index 0000000000000..1e325bfc06663 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_consume_system_events.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: cs3_consume_system_events.py +DESCRIPTION: + These samples demonstrate deserializing a message from system event. +USAGE: + python cs3_consume_system_events.py +""" +import os +from azure.eventgrid import EventGridConsumer + +consumer = EventGridConsumer() + +# returns List[DeserializedEvent] +deserialized_events = consumer.decode_eventgrid_event(service_bus_received_message) + +# EventGridEvent schema, Storage.BlobCreated event +for event in deserialized_events: + + # both allow access to raw properties as strings + time_string = event.event_time + time_string = event["event_time"] + + # model returns EventGridEvent object + event_grid_event = event.model + + # all model properties are strongly typed + datetime_object = event.model.time + storage_blobcreated_object = event.model.data diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_event_grid_event_system_event.json b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_event_grid_event_system_event.json new file mode 100644 index 0000000000000..9825e4d7be352 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_event_grid_event_system_event.json @@ -0,0 +1,23 @@ +{ +"topic": "/subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/xstoretestaccount", +"subject": "/blobServices/default/containers/oc2d2817345i200097container/blobs/oc2d2817345i20002296blob", +"eventType": "Microsoft.Storage.BlobCreated", +"eventTime": "2017-06-26T18:41:00.9584103Z", +"id": "831e1650-001e-001b-66ab-eeb76e069631", +"data": { + "api": "PutBlockList", + "clientRequestId": "6d79dbfb-0e37-4fc4-981f-442c9ca65760", + "requestId": "831e1650-001e-001b-66ab-eeb76e000000", + "eTag": "0x8D4BCC2E4835CD0", + "contentType": "application/octet-stream", + "contentLength": 524288, + "blobType": "BlockBlob", + "url": "https://oc2d2817345i60006.blob.core.windows.net/oc2d2817345i200097container/oc2d2817345i20002296blob", + "sequencer": "00000000000004420000000000028963", + "storageDiagnostics": { + "batchId": "b68529f3-68cd-4744-baa4-3c0498ec19f0" + } +}, +"dataVersion": "", +"metadataVersion": "1" +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_system_event.json b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_system_event.json new file mode 100644 index 0000000000000..3c802ac5e451d --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs3_system_event.json @@ -0,0 +1,23 @@ +{ + "specversion": "1.0", + "type": "Microsoft.Storage.BlobCreated", + "source": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}", + "id": "9aeb0fdf-c01e-0131-0922-9eb54906e209", + "time": "2019-11-18T15:13:39.4589254Z", + "subject": "blobServices/default/containers/{storage-container}/blobs/{new-file}", + "dataschema": "#", + "data": { + "api": "PutBlockList", + "clientRequestId": "4c5dd7fb-2c48-4a27-bb30-5361b5de920a", + "requestId": "9aeb0fdf-c01e-0131-0922-9eb549000000", + "eTag": "0x8D76C39E4407333", + "contentType": "image/png", + "contentLength": 30699, + "blobType": "BlockBlob", + "url": "https://gridtesting.blob.core.windows.net/testcontainer/{new-file}", + "sequencer": "000000000000000000000000000099240000000000c41c18", + "storageDiagnostics": { + "batchId": "681fe319-3006-00a8-0022-9e7cde000000" + } + } +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs4_consume_custom_events.py b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs4_consume_custom_events.py new file mode 100644 index 0000000000000..ea2fed0e39769 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs4_consume_custom_events.py @@ -0,0 +1,35 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: cs4_consume_custom_events.py +DESCRIPTION: + These samples demonstrate deserializing a custom event +USAGE: + python cs4_consume_custom_events.py +""" +import os +from azure.eventgrid import EventGridConsumer + +consumer = EventGridConsumer() + +# returns List[DeserializedEvent] +deserialized_events = consumer.decode_eventgrid_event(service_bus_received_message) + +# EventGridEvent schema, with custom event type +for event in deserialized_events: + + # both allow access to raw properties as strings + time_string = event.event_time + time_string = event["event_time"] + + # model returns EventGridEvent object + event_grid_event = event.model + + # returns { "itemSku": "Contoso Item SKU #1" } + data_dict = event.data + + # custom event not pre-defined in system event registry, returns None + returns_none = event.model.data diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs4_event_grid_event_custom_event.json b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs4_event_grid_event_custom_event.json new file mode 100644 index 0000000000000..30be4fbdd59b4 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs4_event_grid_event_custom_event.json @@ -0,0 +1,12 @@ +{ + "topic": "customeventexample.eastus-1.eventgrid.azure.net", + "subject": "Door1", + "eventType": "Contoso.Items.ItemReceived", + "eventTime": "2017-06-26T18:41:00.9584103Z", + "id": "831e1650-001e-001b-66ab-eeb76e069631", + "data": { + "itemSku": "Contoso Item SKU #1" + }, + "dataVersion": "2.0", + "metadataVersion": "1" +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs5_publish_events_using_cloud_events_1.0_schema.py b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs5_publish_events_using_cloud_events_1.0_schema.py new file mode 100644 index 0000000000000..674a3851b495a --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs5_publish_events_using_cloud_events_1.0_schema.py @@ -0,0 +1,35 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: cs5_publish_events_using_cloud_events_1.0_schema.py +DESCRIPTION: + These samples demonstrate creating a list of CloudEvents and sending then as a list. +USAGE: + python cs5_publish_events_using_cloud_events_1.0_schema.py + Set the environment variables with your own values before running the sample: + 1) CLOUD_ACCESS_KEY - The access key of your eventgrid account. + 2) CLOUD_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". +""" +from azure.eventgrid import EventGridPublisherClient, CloudEvent +from azure.core.credentials import AzureKeyCredential + +topic_key = os.environ["CLOUD_ACCESS_KEY"] +topic_hostname = os.environ["CLOUD_TOPIC_HOSTNAME"] + +credential = AzureKeyCredential(topic_key) +client = EventGridPublisherClient(topic_hostname, credential) + +client.send([ + CloudEvent( + type="Contoso.Items.ItemReceived", + source="/contoso/items", + data={ + "itemSku": "Contoso Item SKU #1" + }, + subject="Door1" + ) +]) diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_cloud_event_system_event.json b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_cloud_event_system_event.json new file mode 100644 index 0000000000000..3c802ac5e451d --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_cloud_event_system_event.json @@ -0,0 +1,23 @@ +{ + "specversion": "1.0", + "type": "Microsoft.Storage.BlobCreated", + "source": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}", + "id": "9aeb0fdf-c01e-0131-0922-9eb54906e209", + "time": "2019-11-18T15:13:39.4589254Z", + "subject": "blobServices/default/containers/{storage-container}/blobs/{new-file}", + "dataschema": "#", + "data": { + "api": "PutBlockList", + "clientRequestId": "4c5dd7fb-2c48-4a27-bb30-5361b5de920a", + "requestId": "9aeb0fdf-c01e-0131-0922-9eb549000000", + "eTag": "0x8D76C39E4407333", + "contentType": "image/png", + "contentLength": 30699, + "blobType": "BlockBlob", + "url": "https://gridtesting.blob.core.windows.net/testcontainer/{new-file}", + "sequencer": "000000000000000000000000000099240000000000c41c18", + "storageDiagnostics": { + "batchId": "681fe319-3006-00a8-0022-9e7cde000000" + } + } +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_consume_events_using_cloud_events_1.0_schema.py b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_consume_events_using_cloud_events_1.0_schema.py new file mode 100644 index 0000000000000..886b96d6b50eb --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_consume_events_using_cloud_events_1.0_schema.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: cs6_consume_events_using_cloud_events_1.0_schema.py +DESCRIPTION: + These samples demonstrate creating a list of CloudEvents and sending then as a list. +USAGE: + python cs6_consume_events_using_cloud_events_1.0_schema.py +""" +import os +from azure.eventgrid import EventGridConsumer + +consumer = EventGridConsumer() + +# returns List[DeserializedEvent] +deserialized_events = consumer.decode_eventgrid_event(service_bus_received_message) + +# CloudEvent schema +for event in deserialized_events: + + # both allow access to raw properties as strings + time_string = event.time + time_string = event["time"] + + # model returns CloudEvent object + cloud_event = event.model + + # all model properties are strongly typed + datetime_object = event.model.time + storage_blobcreated_object = event.model.data \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/consume_cloud_custom_data_sample.py b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/consume_cloud_custom_data_sample.py new file mode 100644 index 0000000000000..9553dce745f64 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/consume_cloud_custom_data_sample.py @@ -0,0 +1,35 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: consume_cloud_custom_data_sample.py +DESCRIPTION: + These samples demonstrate consuming custom cloud data +USAGE: + python consume_cloud_custom_data_sample.py + Set the environment variables with your own values before running the sample: +""" +import json +from azure.eventgrid import EventGridConsumer, CloudEvent + +# all types of CloudEvents below produce same DeserializedEvent +cloud_custom_dict = { + "id":"de0fd76c-4ef4-4dfb-ab3a-8f24a307e033", + "source":"https://egtest.dev/cloudcustomevent", + "data":{"team": "event grid squad"}, + "type":"Azure.Sdk.Sample", + "time":"2020-08-07T02:06:08.11969Z", + "specversion":"1.0" +} +cloud_custom_string = json.dumps(cloud_custom_dict) +cloud_custom_bytes = bytes(cloud_custom_string, "utf-8") + +client = EventGridConsumer() +deserialized_dict_event = client.decode_cloud_event(cloud_custom_dict) +deserialized_str_event = client.decode_cloud_event(cloud_custom_string) +deserialized_bytes_event = client.decode_cloud_event(cloud_custom_bytes) + +print(deserialized_bytes_event.model == deserialized_str_event.model) +print(deserialized_bytes_event.model == deserialized_dict_event.model) \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/consume_eg_storage_blob_created_data_sample.py b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/consume_eg_storage_blob_created_data_sample.py new file mode 100644 index 0000000000000..5a57a4ce9a388 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/consume_eg_storage_blob_created_data_sample.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: consume_eg_storage_blob_created_data_sample.py +DESCRIPTION: + These samples demonstrate consuming custom eventgrid event data. +USAGE: + python consume_eg_storage_blob_created_data_sample.py + Set the environment variables with your own values before running the sample: +""" +import json +from azure.eventgrid import EventGridConsumer, EventGridEvent, StorageBlobCreatedEventData + +# all types of EventGridEvents below produce same DeserializedEvent +eg_storage_dict = { + "id":"bbab6625-dc56-4b22-abeb-afcc72e5290c", + "subject":"/blobServices/default/containers/oc2d2817345i200097container/blobs/oc2d2817345i20002296blob", + "data":{ + "api":"PutBlockList", + "clientRequestId":"6d79dbfb-0e37-4fc4-981f-442c9ca65760", + "requestId":"831e1650-001e-001b-66ab-eeb76e000000", + "eTag":"0x8D4BCC2E4835CD0", + "contentType":"application/octet-stream", + "contentLength":524288, + "blobType":"BlockBlob", + "url":"https://oc2d2817345i60006.blob.core.windows.net/oc2d2817345i200097container/oc2d2817345i20002296blob", + "sequencer":"00000000000004420000000000028963", + "storageDiagnostics":{"batchId":"b68529f3-68cd-4744-baa4-3c0498ec19f0"} + }, + "eventType":"Microsoft.Storage.BlobCreated", + "dataVersion":"2.0", + "metadataVersion":"1", + "eventTime":"2020-08-07T02:28:23.867525Z", + "topic":"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/t-swpill-test/providers/Microsoft.EventGrid/topics/eventgridegsub" +} + +eg_storage_string = json.dumps(eg_storage_dict) +eg_storage_bytes = bytes(eg_storage_string, "utf-8") + +client = EventGridConsumer() +deserialized_dict_event = client.decode_eventgrid_event(eg_storage_dict) +deserialized_str_event = client.decode_eventgrid_event(eg_storage_string) +deserialized_bytes_event = client.decode_eventgrid_event(eg_storage_bytes) + +print(deserialized_bytes_event.model == deserialized_str_event.model) +print(deserialized_bytes_event.model == deserialized_dict_event.model) +print(deserialized_str_event.model.data.__class__ == StorageBlobCreatedEventData) \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_eventhub.py b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_eventhub.py new file mode 100644 index 0000000000000..556e3a6beb192 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_eventhub.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: consume_cloud_events_from_eventhub.py +DESCRIPTION: + These samples demonstrate receiving events from an Event Hub. +USAGE: + python consume_cloud_events_from_eventhub.py + Set the environment variables with your own values before running the sample: + 1) EVENT_HUB_CONN_STR: The connection string to the Event hub account + 3) EVENTHUB_NAME: The name of the eventhub account +""" +import os + +from azure.eventgrid import EventGridConsumer, CloudEvent, EventGridEvent +from azure.eventhub import EventHubConsumerClient + +CONNECTION_STR = os.environ["EVENT_HUB_CONN_STR"] +EVENTHUB_NAME = os.environ["EVENTHUB_NAME"] + + +def on_event(partition_context, event): + + dict_event = event.body_as_json()[0] + deserialized_event = eg_consumer.decode_eventgrid_event(dict_event) + if deserialized_event.model.__class__ == CloudEvent: + dict_event = deserialized_event.to_json() + print("event.type: {}\n".format(dict_event["type"])) + print("event.to_json(): {}\n".format(dict_event)) + print("model: {}\n".format(deserialized_event.model)) + print("model.data: {}\n".format(deserialized_event.model.data)) + else: + dict_event = deserialized_event.to_json() + print("event.to_json(): {}\n".format(dict_event)) + print("model: {}\n".format(deserialized_event.model)) + print("model.data: {}\n".format(deserialized_event.model.data)) + +eg_consumer = EventGridConsumer() +consumer_client = EventHubConsumerClient.from_connection_string( + conn_str=CONNECTION_STR, + consumer_group='$Default', + eventhub_name=EVENTHUB_NAME, +) + +with consumer_client: + event_list = consumer_client.receive( + on_event=on_event, + starting_position="-1", # "-1" is from the beginning of the partition. + prefetch=5 + ) diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_service_bus_queue.py b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_service_bus_queue.py new file mode 100644 index 0000000000000..17e902ef0ebf3 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_service_bus_queue.py @@ -0,0 +1,48 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: consume_cloud_events_from_eventhub.py +DESCRIPTION: + These samples demonstrate receiving events from Service Bus. +USAGE: + python consume_cloud_events_from_eventhub.py + Set the environment variables with your own values before running the sample: + 1) SB_CONN_STR: The connection string to the Service Bus account + 3) SERVICE_BUS_QUEUE_NAME: The name of the servicebus account +""" +import os + +from azure.core.pipeline.policies import AzureKeyCredentialPolicy +from azure.core.credentials import AzureKeyCredential + +from azure.eventgrid import EventGridConsumer, CloudEvent +from azure.servicebus import ServiceBusClient + +connection_str = os.environ['SB_CONN_STR'] +queue_name = os.environ['SERVICE_BUS_QUEUE_NAME'] + +sb_client = ServiceBusClient.from_connection_string(connection_str) +consumer = EventGridConsumer() +with sb_client: + receiver = sb_client.get_queue_receiver(queue_name, prefetch=10) + with receiver: + msgs = receiver.receive(max_batch_size=10, max_wait_time=1) + print("number of messages: {}".format(len(msgs))) + for msg in msgs: + # receive single dict message + if 'specversion' in msg: + deserialized_event = consumer.decode_cloud_event(str(msg)) + dict_event = deserialized_event.to_json() + print("event.to_json(): {}\n".format(dict_event)) + print("model: {}\n".format(deserialized_event.model)) + print("model.data: {}\n".format(deserialized_event.model.data)) + else: + deserialized_event = consumer.decode_eventgrid_event(str(msg)) + dict_event = deserialized_event.to_json() + print("event.to_json(): {}\n".format(dict_event)) + print("model: {}\n".format(deserialized_event.model)) + print("model.data: {}\n".format(deserialized_event.model.data)) + msg.complete() diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_storage_queue.py b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_storage_queue.py new file mode 100644 index 0000000000000..29e6247ca0442 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/consume_cloud_events_from_storage_queue.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: consume_cloud_events_from_eventhub.py +DESCRIPTION: + These samples demonstrate receiving events from a Storage Queue. +USAGE: + python consume_cloud_events_from_eventhub.py + Set the environment variables with your own values before running the sample: + 1) STORAGE_QUEUE_CONN_STR: The connection string to the storage account + 3) STORAGE_QUEUE_NAME: The name of the storage queue. +""" +import os +from azure.storage.queue import QueueServiceClient +from azure.eventgrid import EventGridConsumer, CloudEvent +from base64 import b64decode + +connection_str = os.environ["STORAGE_QUEUE_CONN_STR"] +queue_name = os.environ["STORAGE_QUEUE_NAME"] +queue_service = QueueServiceClient.from_connection_string(conn_str=connection_str) + +queue_client = queue_service.get_queue_client(queue_name) +consumer = EventGridConsumer() + +msgs = queue_client.receive_messages() +for msg in msgs: + # receive single dict message + if 'specversion' in msg: + deserialized_event = consumer.decode_cloud_event(b64decode(msg.content)) + dict_event = deserialized_event.to_json() + print("event.type: {}\n".format(dict_event["type"])) + print("event.to_json(): {}\n".format(dict_event)) + print("model: {}\n".format(deserialized_event.model)) + print("model.data: {}\n".format(deserialized_event.model.data)) + else: + deserialized_event = consumer.decode_eventgrid_event(b64decode(msg.content)) + dict_event = deserialized_event.to_json() + print("event.to_json(): {}\n".format(dict_event)) + print("model: {}\n".format(deserialized_event.model)) + print("model.data: {}\n".format(deserialized_event.model.data)) diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/.funcignore b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/.funcignore new file mode 100644 index 0000000000000..0678ea2b2270a --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/.funcignore @@ -0,0 +1,5 @@ +.git* +.vscode +local.settings.json +test +.venv \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/.gitignore b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/.gitignore new file mode 100644 index 0000000000000..a10127be5c965 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/.gitignore @@ -0,0 +1,130 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don’t work, or not +# install all needed dependencies. +#Pipfile.lock + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# Azure Functions artifacts +bin +obj +appsettings.json +local.settings.json +.python_packages \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/__init__.py b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/__init__.py new file mode 100644 index 0000000000000..95e1da605e45d --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/__init__.py @@ -0,0 +1,22 @@ +import json +import logging +import sys + +import azure.functions as func +from azure.eventgrid import EventGridConsumer + +def main(event: func.EventGridEvent): + logging.info(sys.version) + logging.info(event) + result = json.dumps({ + 'id': event.id, + 'data': event.get_json(), + 'topic': event.topic, + 'subject': event.subject, + 'event_type': event.event_type + }) + logging.info(result) + consumer = EventGridConsumer() + deserialized_event = consumer.deserialize_events(result) + ## can only be EventGridEvent + print("model: {}".format(event.model)) diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/function.json b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/function.json new file mode 100644 index 0000000000000..e2764c7fdba4f --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/function.json @@ -0,0 +1,10 @@ +{ + "scriptFile": "__init__.py", + "bindings": [ + { + "type": "eventGridTrigger", + "name": "event", + "direction": "in" + } + ] +} diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/host.json b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/host.json new file mode 100644 index 0000000000000..8f3cf9db3fbec --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/host.json @@ -0,0 +1,7 @@ +{ + "version": "2.0", + "extensionBundle": { + "id": "Microsoft.Azure.Functions.ExtensionBundle", + "version": "[1.*, 2.0.0)" + } +} \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/sample.dat b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/sample.dat new file mode 100644 index 0000000000000..5e172b50e0d5e --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/EventGridTrigger1/sample.dat @@ -0,0 +1,20 @@ +{ + 'topic': '/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/test/providers/Microsoft.EventHub/namespaces/test', + 'subject': 'eventhubs/test', + 'eventType': 'captureFileCreated', + 'eventTime': '2017-07-14T23:10:27.7689666Z', + 'id': '7b11c4ce-1c34-4416-848b-1730e766f126', + 'data': { + 'fileUrl': 'https://test.blob.core.windows.net/debugging/testblob.txt', + 'fileType': 'AzureBlockBlob', + 'partitionId': '1', + 'sizeInBytes': 0, + 'eventCount': 0, + 'firstSequenceNumber': -1, + 'lastSequenceNumber': -1, + 'firstEnqueueTime': '0001-01-01T00:00:00', + 'lastEnqueueTime': '0001-01-01T00:00:00' + }, + "dataVersion": "", + "metadataVersion": "1" +} diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/host.json b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/host.json new file mode 100644 index 0000000000000..6ab664374ff11 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/host.json @@ -0,0 +1,15 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + } + } + }, + "extensionBundle": { + "id": "Microsoft.Azure.Functions.ExtensionBundle", + "version": "[1.*, 2.0.0)" + } +} diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/proxies.json b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/proxies.json new file mode 100644 index 0000000000000..b385252f5ed78 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/proxies.json @@ -0,0 +1,4 @@ +{ + "$schema": "http://json.schemastore.org/proxies", + "proxies": {} +} diff --git a/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/requirements.txt b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/requirements.txt new file mode 100644 index 0000000000000..75db2c4f60f8a --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/consume_samples/e2e_samples/functionsapp/requirements.txt @@ -0,0 +1 @@ +azure-functions diff --git a/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_cloud_events_to_custom_topic_sample.py b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_cloud_events_to_custom_topic_sample.py new file mode 100644 index 0000000000000..c538cd235d734 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_cloud_events_to_custom_topic_sample.py @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: publish_cloud_events_to_custom_topic_sample.py +DESCRIPTION: + These samples demonstrate creating a list of CloudEvents and sending them as a list + to a custom topic. +USAGE: + python publish_cloud_events_to_custom_topic_sample.py + Set the environment variables with your own values before running the sample: + 1) CLOUD_ACCESS_KEY - The access key of your eventgrid account. + 2) CLOUD_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". +""" +import os +from random import randint, sample +import time + +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import EventGridPublisherClient, CloudEvent + +key = os.environ.get("CLOUD_ACCESS_KEY") +topic_hostname = os.environ["CLOUD_TOPIC_HOSTNAME"] + +# authenticate client +credential = AzureKeyCredential(key) +client = EventGridPublisherClient(topic_hostname, credential) + +team_members = ["Josh", "Kerri", "Kieran", "Laurent", "Lily", "Matt", "Soren", "Srikanta", "Swathi"] # possible values for data field + +def publish_event(): + # publish events + for _ in range(10): + event_list = [] # list of events to publish + # create events and append to list + for j in range(randint(1, 1)): + sample_members = sample(team_members, k=randint(1, 9)) # select random subset of team members + data_dict = {"team": sample_members} + event = CloudEvent( + type="Azure.Sdk.Sample", + source="https://egsample.dev/sampleevent", + data={"team": sample_members} + ) + event_list.append(event) + + # publish list of events + client.send(event_list) + print("Batch of size {} published".format(len(event_list))) + time.sleep(randint(1, 5)) + +if __name__ == "__main__": + publish_event() diff --git a/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_cloud_events_to_domain_topic_sample.py b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_cloud_events_to_domain_topic_sample.py new file mode 100644 index 0000000000000..54b5d23b1c8b2 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_cloud_events_to_domain_topic_sample.py @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: publish_cloud_events_to_domain_topic_sample.py +DESCRIPTION: + These samples demonstrate creating a list of CloudEvents and sending them as a list + to a domain topic. +USAGE: + python publish_cloud_events_to_domain_topic_sample.py + Set the environment variables with your own values before running the sample: + 1) DOMAIN_ACCESS_KEY - The access key of your eventgrid account. + 2) DOMAIN_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". + 3) DOMAIN_NAME - the name of the topic +""" +import sys +import os +from random import randint, sample +import time + +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import EventGridPublisherClient, CloudEvent + +domain_key = os.environ["DOMAIN_ACCESS_KEY"] +domain_topic_hostname = os.environ["DOMAIN_TOPIC_HOSTNAME"] +domain_name = os.environ["DOMAIN_NAME"] + + +# authenticate client +credential = AzureKeyCredential(domain_key) +client = EventGridPublisherClient(domain_topic_hostname, credential) + +def publish_event(): + # publish events + for _ in range(10): + + event_list = [] # list of events to publish + team_members = ["Josh", "Kerri", "Kieran", "Laurent", "Lily", "Matt", "Soren", "Srikanta", "Swathi"] # possible values for data field + + # create events and append to list + for j in range(randint(1, 3)): + sample_members = sample(team_members, k=randint(1, 9)) # select random subset of team members + event = CloudEvent( + type="Azure.Sdk.Demo", + source=domain_name, + data={"team": sample_members} + ) + event_list.append(event) + + # publish list of events + client.send(event_list) + print("Batch of size {} published".format(len(event_list))) + time.sleep(randint(1, 5)) + +if __name__ == '__main__': + publish_event() diff --git a/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_custom_schema_events_to_topic_sample.py b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_custom_schema_events_to_topic_sample.py new file mode 100644 index 0000000000000..4396938d8ee1a --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_custom_schema_events_to_topic_sample.py @@ -0,0 +1,60 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: publish_custom_schema_events_to_topic_sample.py +DESCRIPTION: + These samples demonstrate creating a list of Custom Events and sending them as a list. +USAGE: + python publish_custom_schema_events_to_topic_sample.py + Set the environment variables with your own values before running the sample: + 1) CUSTOM_SCHEMA_ACCESS_KEY - The access key of your eventgrid account. + 2) CUSTOM_SCHEMA_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". +""" +import os +from random import randint, sample +import time +import uuid +from msrest.serialization import UTC +import datetime as dt + +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import EventGridPublisherClient, CustomEvent + +key = os.environ["CUSTOM_SCHEMA_ACCESS_KEY"] +topic_hostname = os.environ["CUSTOM_SCHEMA_TOPIC_HOSTNAME"] + +def publish_event(): + # authenticate client + credential = AzureKeyCredential(key) + client = EventGridPublisherClient(topic_hostname, credential) + + custom_schema_event = { + "customSubject": "sample", + "customEventType": "sample.event", + "customDataVersion": "2.0", + "customId": uuid.uuid4(), + "customEventTime": dt.datetime.now(UTC()).isoformat(), + "customData": "sample data" + } + + # publish events + for _ in range(10): + + event_list = [] # list of events to publish + # create events and append to list + for j in range(randint(1, 3)): + event = CustomEvent(custom_schema_event) + event_list.append(event) + + # publish list of events + client.send(event_list) + print("Batch of size {} published".format(len(event_list))) + time.sleep(randint(1, 5)) + + +if __name__ == '__main__': + publish_event() diff --git a/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_event_grid_events_to_custom_topic_sample.py b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_event_grid_events_to_custom_topic_sample.py new file mode 100644 index 0000000000000..d10b5ca6e76ed --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_event_grid_events_to_custom_topic_sample.py @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: publish_event_grid_events_to_custom_topic_sample.py +DESCRIPTION: + These samples demonstrate creating a list of Eventgrid Events and sending them as a list + to custom topic. +USAGE: + python publish_event_grid_events_to_custom_topic_sample.py + Set the environment variables with your own values before running the sample: + 1) EG_ACCESS_KEY - The access key of your eventgrid account. + 2) EG_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". +""" +import os +from random import randint, sample +import time + +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import EventGridPublisherClient, EventGridEvent + +key = os.environ["EG_ACCESS_KEY"] +topic_hostname = os.environ["EG_TOPIC_HOSTNAME"] + +# authenticate client +credential = AzureKeyCredential(key) +client = EventGridPublisherClient(topic_hostname, credential) + +team_members = ["Josh", "Kerri", "Kieran", "Laurent", "Lily", "Matt", "Soren", "Srikanta", "Swathi"] # possible values for data field + +def publish_event(): + # publish events + while True: + + event_list = [] # list of events to publish + # create events and append to list + for j in range(randint(1, 3)): + sample_members = sample(team_members, k=randint(1, 9)) # select random subset of team members + event = EventGridEvent( + subject="Door1", + data={"team": sample_members}, + event_type="Azure.Sdk.Demo", + data_version="2.0" + ) + event_list.append(event) + + # publish list of events + client.send(event_list) + print("Batch of size {} published".format(len(event_list))) + time.sleep(randint(1, 5)) + +if __name__ == '__main__': + publish_event() diff --git a/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_with_shared_access_signature_sample.py b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_with_shared_access_signature_sample.py new file mode 100644 index 0000000000000..ba88862b96290 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_with_shared_access_signature_sample.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: publish_with_shared_access_signature_sample.py +DESCRIPTION: + These samples demonstrate creating a list of CloudEvents and publish them + using the shared access signature for authentication. +USAGE: + python publish_with_shared_access_signature_sample.py + Set the environment variables with your own values before running the sample: + 1) CLOUD_ACCESS_KEY - The access key of your eventgrid account. + 2) CLOUD_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "..eventgrid.azure.net". +""" +import os +from random import randint, sample +import time + +from dateutil.tz import tzutc +from datetime import timedelta +import datetime as dt + +from azure.eventgrid import EventGridPublisherClient, CloudEvent, generate_shared_access_signature, EventGridSharedAccessSignatureCredential + +key = os.environ["CLOUD_ACCESS_KEY"] +topic_hostname = os.environ["CLOUD_TOPIC_HOSTNAME"] +expiration_date_utc = dt.datetime.now(tzutc()) + timedelta(hours=1) + +signature = generate_shared_access_signature(topic_hostname, key, expiration_date_utc) + +# authenticate client +credential = EventGridSharedAccessSignatureCredential(signature) +client = EventGridPublisherClient(topic_hostname, credential) + +team_members = ["Josh", "Kerri", "Kieran", "Laurent", "Lily", "Matt", "Soren", "Srikanta", "Swathi"] # possible values for data field + +def publish_event(): + # publish events + for _ in range(10): + + event_list = [] # list of events to publish + # create events and append to list + for j in range(randint(1, 3)): + sample_members = sample(team_members, k=randint(1, 9)) # select random subset of team members + event = CloudEvent( + type="Azure.Sdk.Demo", + source="https://egdemo.dev/demowithsignature", + data={"team": sample_members} + ) + event_list.append(event) + + # publish list of events + client.send(event_list) + print("Batch of size {} published".format(len(event_list))) + time.sleep(randint(1, 5)) + +if __name__ == '__main__': + publish_event() diff --git a/sdk/eventgrid/azure-eventgrid/sdk_packaging.toml b/sdk/eventgrid/azure-eventgrid/sdk_packaging.toml index 892600b2e61c6..1e81955456391 100644 --- a/sdk/eventgrid/azure-eventgrid/sdk_packaging.toml +++ b/sdk/eventgrid/azure-eventgrid/sdk_packaging.toml @@ -1,6 +1,7 @@ [packaging] +auto_update = false package_name = "azure-eventgrid" package_pprint_name = "Event Grid" package_doc_id = "event-grid" -is_stable = true +is_stable = false is_arm = false diff --git a/sdk/eventgrid/azure-eventgrid/setup.py b/sdk/eventgrid/azure-eventgrid/setup.py index cf7a6fb13dad9..9353b747230e1 100644 --- a/sdk/eventgrid/azure-eventgrid/setup.py +++ b/sdk/eventgrid/azure-eventgrid/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -59,27 +61,27 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 5 - Production/Stable', + 'Development Status :: 4 - Beta', 'Programming Language :: Python', '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, packages=find_packages(exclude=[ 'tests', + 'samples', # Exclude packages that will be covered by PEP420 or nspkg 'azure', ]), install_requires=[ 'msrest>=0.5.0', - 'msrestazure>=0.4.32,<2.0.0', - 'azure-common~=1.1', + 'azure-core<2.0.0,>=1.7.0', ], extras_require={ ":python_version<'3.0'": ['azure-nspkg'], diff --git a/sdk/eventgrid/azure-eventgrid/swagger/README.PYTHON_T2.md b/sdk/eventgrid/azure-eventgrid/swagger/README.PYTHON_T2.md new file mode 100644 index 0000000000000..158cf41dde191 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/swagger/README.PYTHON_T2.md @@ -0,0 +1,36 @@ +# Azure EventGrid Client for Python + +> see https://aka.ms/autorest + +### Configuration + +```yaml +title: EventGridPublisherClient +description: EventGrid Python Publisher Client +generated-metadata: false +license-header: MICROSOFT_MIT_NO_VERSION +no-namespace-folders: true +output-folder: ../azure/eventgrid/_generated +source-code-folder-path: ./azure/eventgrid/_generated +input-file: + - https://raw.githubusercontent.com/t-swpill/azure-rest-api-specs/add-cloud-event-publish-to-event-grid/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Cache/stable/2018-01-01/RedisCache.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.KeyVault/stable/2018-01-01/KeyVault.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.MachineLearningServices/stable/2018-01-01/MachineLearningServices.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Maps/stable/2018-01-01/Maps.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Media/stable/2018-01-01/MediaServices.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Resources/stable/2018-01-01/Resources.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json + +python: true +v3: true +use: "@autorest/python@5.1.0-preview.1" +``` \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/tests/_mocks.py b/sdk/eventgrid/azure-eventgrid/tests/_mocks.py new file mode 100644 index 0000000000000..107d6d6175ede --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/_mocks.py @@ -0,0 +1,77 @@ +import json + + +# storage cloud event +cloud_storage_dict = { + "id":"a0517898-9fa4-4e70-b4a3-afda1dd68672", + "source":"/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}", + "data":{ + "api":"PutBlockList", + "client_request_id":"6d79dbfb-0e37-4fc4-981f-442c9ca65760", + "request_id":"831e1650-001e-001b-66ab-eeb76e000000", + "e_tag":"0x8D4BCC2E4835CD0", + "content_type":"application/octet-stream", + "content_length":524288, + "blob_type":"BlockBlob", + "url":"https://oc2d2817345i60006.blob.core.windows.net/oc2d2817345i200097container/oc2d2817345i20002296blob", + "sequencer":"00000000000004420000000000028963", + "storage_diagnostics":{"batchId":"b68529f3-68cd-4744-baa4-3c0498ec19f0"} + }, + "type":"Microsoft.Storage.BlobCreated", + "time":"2020-08-07T01:11:49.765846Z", + "specversion":"1.0" +} +cloud_storage_string = json.dumps(cloud_storage_dict) +cloud_storage_bytes = cloud_storage_string.encode("utf-8") + +# custom cloud event +cloud_custom_dict = { + "id":"de0fd76c-4ef4-4dfb-ab3a-8f24a307e033", + "source":"https://egtest.dev/cloudcustomevent", + "data":{"team": "event grid squad"}, + "type":"Azure.Sdk.Sample", + "time":"2020-08-07T02:06:08.11969Z", + "specversion":"1.0" +} +cloud_custom_string = json.dumps(cloud_custom_dict) +cloud_custom_bytes = cloud_custom_string.encode("utf-8") + +# storage eg event +eg_storage_dict = { + "id":"bbab6625-dc56-4b22-abeb-afcc72e5290c", + "subject":"/blobServices/default/containers/oc2d2817345i200097container/blobs/oc2d2817345i20002296blob", + "data":{ + "api":"PutBlockList", + "clientRequestId":"6d79dbfb-0e37-4fc4-981f-442c9ca65760", + "requestId":"831e1650-001e-001b-66ab-eeb76e000000", + "eTag":"0x8D4BCC2E4835CD0", + "contentType":"application/octet-stream", + "contentLength":524288, + "blobType":"BlockBlob", + "url":"https://oc2d2817345i60006.blob.core.windows.net/oc2d2817345i200097container/oc2d2817345i20002296blob", + "sequencer":"00000000000004420000000000028963", + "storageDiagnostics":{"batchId":"b68529f3-68cd-4744-baa4-3c0498ec19f0"} + }, + "eventType":"Microsoft.Storage.BlobCreated", + "dataVersion":"2.0", + "metadataVersion":"1", + "eventTime":"2020-08-07T02:28:23.867525Z", + "topic":"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/t-swpill-test/providers/Microsoft.EventGrid/topics/eventgridegsub" +} + +eg_storage_string = json.dumps(eg_storage_dict) +eg_storage_bytes = eg_storage_string.encode("utf-8") + +# custom eg event +eg_custom_dict = { + "id":"3a30afef-b604-4b67-973e-7dfff7e178a7", + "subject":"Test EG Custom Event", + "data":{"team":"event grid squad"}, + "eventType":"Azure.Sdk.Sample", + "dataVersion":"2.0", + "metadataVersion":"1", + "eventTime":"2020-08-07T02:19:05.16916Z", + "topic":"/subscriptions/f8aa80ae-d1c8-60ad-9bce-e1a850ba5b67/resourceGroups/sample-resource-group-test/providers/Microsoft.EventGrid/topics/egtopicsamplesub" +} +eg_custom_string = json.dumps(eg_custom_dict) +eg_custom_bytes = eg_custom_string.encode("utf-8") diff --git a/sdk/eventgrid/azure-eventgrid/tests/conftest.py b/sdk/eventgrid/azure-eventgrid/tests/conftest.py new file mode 100644 index 0000000000000..2e685fe040ddb --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/conftest.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import platform +import sys + + +# Ignore async tests for Python < 3.5 +collect_ignore_glob = [] +if sys.version_info < (3, 5): + collect_ignore_glob.append("*_async.py") diff --git a/sdk/eventgrid/azure-eventgrid/tests/eventgrid_preparer.py b/sdk/eventgrid/azure-eventgrid/tests/eventgrid_preparer.py new file mode 100644 index 0000000000000..d56af2bcebca2 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/eventgrid_preparer.py @@ -0,0 +1,98 @@ +import functools +import hashlib +import os +from collections import namedtuple + +from azure.mgmt.eventgrid import EventGridManagementClient +from azure.mgmt.eventgrid.models import Topic, InputSchema, JsonInputSchemaMapping, JsonField, JsonFieldWithDefault +from azure_devtools.scenario_tests.exceptions import AzureTestError + +from devtools_testutils import ( + ResourceGroupPreparer, AzureMgmtPreparer, FakeResource +) + +from devtools_testutils.resource_testcase import RESOURCE_GROUP_PARAM + +EVENTGRID_TOPIC_PARAM = 'eventgrid_topic' +EVENTGRID_TOPIC_LOCATION = 'westus' +CLOUD_EVENT_SCHEMA = InputSchema.cloud_event_schema_v1_0 +CUSTOM_EVENT_SCHEMA = InputSchema.custom_event_schema +ID_JSON_FIELD = JsonField(source_field='customId') +TOPIC_JSON_FIELD = JsonField(source_field='customTopic') +EVENT_TIME_JSON_FIELD = JsonField(source_field='customEventTime') +EVENT_TYPE_JSON_FIELD_WITH_DEFAULT = JsonFieldWithDefault(source_field='customEventType', default_value='') +SUBJECT_JSON_FIELD_WITH_DEFAULT = JsonFieldWithDefault(source_field='customSubject', default_value='') +DATA_VERSION_JSON_FIELD_WITH_DEFAULT = JsonFieldWithDefault(source_field='customDataVersion', default_value='') +CUSTOM_JSON_INPUT_SCHEMA_MAPPING = JsonInputSchemaMapping(id=ID_JSON_FIELD, topic=TOPIC_JSON_FIELD, event_time=EVENT_TIME_JSON_FIELD, event_type=EVENT_TYPE_JSON_FIELD_WITH_DEFAULT, subject=SUBJECT_JSON_FIELD_WITH_DEFAULT, data_version=DATA_VERSION_JSON_FIELD_WITH_DEFAULT) + + +class EventGridTopicPreparer(AzureMgmtPreparer): + def __init__(self, + name_prefix='', + use_cache=False, + parameter_location=EVENTGRID_TOPIC_LOCATION, + parameter_name=EVENTGRID_TOPIC_PARAM, + resource_group_parameter_name=RESOURCE_GROUP_PARAM, + disable_recording=True, playback_fake_resource=None, + client_kwargs=None, random_name_enabled=True): + super(EventGridTopicPreparer, self).__init__(name_prefix, random_name_length=24, + random_name_enabled=random_name_enabled, + disable_recording=disable_recording, + playback_fake_resource=playback_fake_resource, + client_kwargs=client_kwargs) + self.resource_group_parameter_name = resource_group_parameter_name + self.parameter_name = parameter_name + self.parameter_location = parameter_location + self.name_prefix = name_prefix + if random_name_enabled: + self.resource_moniker = self.name_prefix + "egtopic" + + self.set_cache(use_cache, name_prefix) + + def create_resource(self, name, **kwargs): + if self.is_live: + self.client = self.create_mgmt_client(EventGridManagementClient) + group = self._get_resource_group(**kwargs) + + if self.name_prefix.startswith("cloud"): + # Create a new topic and verify that it is created successfully + topic = Topic(location=self.parameter_location, tags=None, input_schema=CLOUD_EVENT_SCHEMA, input_schema_mapping=None) + elif self.name_prefix.startswith("custom"): + # Create a new topic and verify that it is created successfully + topic = Topic(location=self.parameter_location, tags=None, input_schema=CUSTOM_EVENT_SCHEMA, input_schema_mapping=CUSTOM_JSON_INPUT_SCHEMA_MAPPING) + else: + topic = Topic(location=self.parameter_location) + topic_operation = self.client.topics.create_or_update( + group.name, + name, + topic, + {} + ) + self.resource = topic_operation.result() + key = self.client.topics.list_shared_access_keys(group.name, name) + self.primary_key = key.key1 + self.endpoint = self.resource.endpoint + else: + self.resource = FakeResource(name=name, id=name) + self.primary_key = "ZmFrZV9hY29jdW50X2tleQ==" # test key copied from sb_preparer + self.endpoint = "https://{}.westus-1.eventgrid.azure.net/api/events".format(name) + return { + self.parameter_name: self.resource, + '{}_primary_key'.format(self.parameter_name): self.primary_key, + '{}_endpoint'.format(self.parameter_name): self.endpoint, + } + + def remove_resource(self, name, **kwargs): + if self.is_live: + group = self._get_resource_group(**kwargs) + self.client.topics.delete(group.name, name, polling=False) + + def _get_resource_group(self, **kwargs): + try: + return kwargs.get(self.resource_group_parameter_name) + except KeyError: + template = 'To create this event grid topic resource, a resource group is required. Please add ' \ + 'decorator @{} in front of this event grid topic preparer.' + raise AzureTestError(template.format(ResourceGroupPreparer.__name__)) + +CachedEventGridTopicPreparer = functools.partial(EventGridTopicPreparer, use_cache=True) diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_good_credentials.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_good_credentials.yaml new file mode 100644 index 0000000000000..089b5bc10bf10 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_good_credentials.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "06d9e910-81c1-4af0-9083-f4cc918301ea", "subject": "sample", "data": + {"sample": "0"}, "eventType": "Sample.Event", "eventTime": "2020-08-05T16:24:03.70737Z", + "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '188' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + aeg-sas-key: + - xQuFC1jawpZYmAOZrsTGkiUPcXSvDISI66PrlrQcM6Y= + method: POST + uri: https://eventgridtest52vpkcnitf5.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Wed, 05 Aug 2020 16:24:02 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_.yaml new file mode 100644 index 0000000000000..e0e1add967bcc --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "2b863329-4869-4f0e-b64a-b7ca52bfb872", "subject": "sample", "data": + {"sample": "0"}, "eventType": "Sample.Event", "eventTime": "2020-08-05T16:24:24.902399Z", + "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '189' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + aeg-sas-key: + - 8fgxUonulneikv0EvLHfgMGhw1K5MMsXWe16KNNdWg0= + method: POST + uri: https://eventgridtestwsljzbswegg.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Wed, 05 Aug 2020 16:24:24 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event.yaml new file mode 100644 index 0000000000000..a6cd0057d4f47 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "4fd97389-b193-44ca-bcc9-ed52d5195101", "source": "http://samplesource.dev", + "data": {"sample": "cloud"}, "type": "Sample.Cloud.Event", "time": "2020-08-05T21:07:00.18891Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '204' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + aeg-sas-key: + - cQXFSFmXpb3atzg/cNltZL9GqrNQSeBax/Uw+Y2HKHw= + method: POST + uri: https://cloudeventgridtestztxiam.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Wed, 05 Aug 2020 21:07:00 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event_data_dict.yaml new file mode 100644 index 0000000000000..cdc77fdc6fdbb --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event_data_dict.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "09ba13db-87a6-46e2-a751-788612217a2b", "source": "http://samplesource.dev", + "data": {"sample": "cloudevent"}, "type": "Sample.Cloud.Event", "time": "2020-08-05T21:23:31.005557Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '210' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + aeg-sas-key: + - TBW8YxO+xO4DAfWTwBz+SkOvRRCRe8u6jvfvWkVKvds= + method: POST + uri: https://cloudeventgridtestpgb34o.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Wed, 05 Aug 2020 21:23:31 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event_data_str.yaml new file mode 100644 index 0000000000000..36f0bbf08d9a1 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_cloud_event_data_str.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "51053de8-ebfe-47db-95fe-67882c8de067", "source": "http://samplesource.dev", + "data": "cloudevent", "type": "Sample.Cloud.Event", "time": "2020-08-05T21:23:50.780278Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '198' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + aeg-sas-key: + - eUWCGTSgST9ZprGj10Df1Q1cBY6gtu95nDvWfupM7S4= + method: POST + uri: https://cloudeventgridtestbxd5ay.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Wed, 05 Aug 2020 21:23:50 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_event_grid_event.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_event_grid_event.yaml new file mode 100644 index 0000000000000..c3a6d273eb80f --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_event_grid_event.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "8cf3b6a9-ae8c-41aa-be33-15dd34774b92", "subject": "sample", "data": + {"sample": "0"}, "eventType": "Sample.Event", "eventTime": "2020-08-05T21:07:20.073184Z", + "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '189' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + aeg-sas-key: + - f68bBwrYetWs4a0MIm4KRj2vZQtFLnBfI2dlStDpn/4= + method: POST + uri: https://eventgridtestat3wftu6mau.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Wed, 05 Aug 2020 21:07:20 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_event_grid_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_event_grid_event_data_dict.yaml new file mode 100644 index 0000000000000..1cc882b0bff92 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_client.test_eg_client_publish_event_grid_event_data_dict.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "98900358-4381-48c5-8205-4b6284397097", "subject": "sample", "data": + {"sample": "eventgridevent"}, "eventType": "Sample.EventGrid.Event", "eventTime": + "2020-08-05T21:24:09.350896Z", "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + aeg-sas-key: + - WyF/d4cVbqGKKFMu9P1zM4RGH8lbIvCSNS9B/7mFxWc= + method: POST + uri: https://eventgridtesthjrorjbmg2q.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Wed, 05 Aug 2020 21:24:08 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_cloud_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_cloud_event_data_dict.yaml new file mode 100644 index 0000000000000..bb9ded4301096 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_cloud_event_data_dict.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "45361ea3-f937-47fe-85fc-182c24b14fc5", "source": "http://samplesource.dev", + "data": {"sample": "cloudevent"}, "type": "Sample.Cloud.Event", "time": "2020-08-11T06:39:22.600597Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '210' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + aeg-sas-key: + - flIbhDLap/Ioym6KTtqsPbYUGYpL+AKCiVG/InyRHj4= + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Tue, 11 Aug 2020 06:39:21 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_cloud_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_cloud_event_data_str.yaml new file mode 100644 index 0000000000000..8e8eb4bdc4419 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_cloud_event_data_str.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "47f96517-0a4b-4c99-bad4-c3314818ed30", "source": "http://samplesource.dev", + "data": "cloudevent", "type": "Sample.Cloud.Event", "time": "2020-08-11T06:39:23.189542Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '198' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + aeg-sas-key: + - flIbhDLap/Ioym6KTtqsPbYUGYpL+AKCiVG/InyRHj4= + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Tue, 11 Aug 2020 06:39:22 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_custom_schema_event.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_custom_schema_event.yaml new file mode 100644 index 0000000000000..df085a6d16529 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_custom_schema_event.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"customSubject": "sample", "customEventType": "sample.event", "customDataVersion": + "2.0", "customId": "1234", "customEventTime": "2020-08-11T06:39:36.974650+00:00", + "customData": "sample data"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + aeg-sas-key: + - fxkmsikqjbH4ihoDP0Jqebsu6tQAS5+LcZEDKHN40Tc= + method: POST + uri: https://customeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Tue, 11 Aug 2020 06:39:36 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_event_grid_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_event_grid_event_data_dict.yaml new file mode 100644 index 0000000000000..80389ad9f7e5e --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_event_grid_event_data_dict.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "38eab883-eb07-4ae1-9ff4-12ebaf022113", "subject": "sample", "data": + {"sample": "eventgridevent"}, "eventType": "Sample.EventGrid.Event", "eventTime": + "2020-08-11T06:39:51.000672Z", "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + aeg-sas-key: + - mu+h0B1P+GXAS5TCSIJVZ/oZUf+Pur3p90WxHabL2MM= + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Tue, 11 Aug 2020 06:39:50 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_event_grid_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_event_grid_event_data_str.yaml new file mode 100644 index 0000000000000..282bd88f72800 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_event_grid_event_data_str.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "56a121b0-92b9-4921-b11b-2a99b0b4c5be", "subject": "sample", "data": + "eventgridevent", "eventType": "Sample.EventGrid.Event", "eventTime": "2020-08-11T06:39:51.543811Z", + "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '200' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + aeg-sas-key: + - mu+h0B1P+GXAS5TCSIJVZ/oZUf+Pur3p90WxHabL2MM= + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Tue, 11 Aug 2020 06:39:51 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_signature_credential.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_signature_credential.yaml new file mode 100644 index 0000000000000..4948c3eaecbee --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_eg_publisher_client_publish_signature_credential.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "849de85a-06ec-4d66-a41c-638ceb4ab7cb", "subject": "sample", "data": + {"sample": "eventgridevent"}, "eventType": "Sample.EventGrid.Event", "eventTime": + "2020-08-11T06:39:51.999494Z", "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + aeg-sas-token: + - r=https%3A%2F%2Feventgridtestmsevpyxtqca.westus-1.eventgrid.azure.net%2Fapi%2Fevents%3FapiVersion%3D2018-01-01&e=2020-08-11%2007%3A39%3A51.997500%2B00%3A00&s=uPP02vkTyXgAw66IZMR%2B8xG92iHk1Imn4nnIN8ruM%2Bw%3D + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Tue, 11 Aug 2020 06:39:51 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_as_list.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_as_list.yaml new file mode 100644 index 0000000000000..0622097e506ca --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_as_list.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"id": "4e7a9df5-8e28-42c8-adca-4412c93e92d5", "source": "http://samplesource.dev", + "data": "cloudevent", "type": "Sample.Cloud.Event", "time": "2020-09-03T21:37:13.810619Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '198' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:12 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_bytes.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_bytes.yaml new file mode 100644 index 0000000000000..fd0dc457c7d57 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_bytes.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"id": "a3f05c78-9a8d-44d8-a1a3-131b8da61192", "source": "http://samplesource.dev", + "data_base64": "Y2xvdWRldmVudA==", "type": "Sample.Cloud.Event", "time": "2020-09-04T17:06:31.601865Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '211' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Fri, 04 Sep 2020 17:06:29 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_dict.yaml new file mode 100644 index 0000000000000..bf49c8a35b19b --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_dict.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"id": "51c747e0-7e8f-467c-80e4-920fdf1d95d2", "source": "http://samplesource.dev", + "data": {"sample": "cloudevent"}, "type": "Sample.Cloud.Event", "time": "2020-09-03T21:37:14.383108Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '210' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:12 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_str.yaml new file mode 100644 index 0000000000000..2a45a2b2689f2 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_str.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"id": "eef0ee57-9833-44fd-9f52-d5f20b74267d", "source": "http://samplesource.dev", + "data": "cloudevent", "type": "Sample.Cloud.Event", "time": "2020-09-03T21:37:14.803665Z", + "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '198' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:13 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_with_extensions.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_with_extensions.yaml new file mode 100644 index 0000000000000..85d4e49a1f12f --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_data_with_extensions.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"reason_code": 204, "extension": "extension", "id": "9da8e4ce-df2c-4480-b809-c7132fb3ee74", + "source": "http://samplesource.dev", "data": "cloudevent", "type": "Sample.Cloud.Event", + "time": "2020-09-03T21:37:15.165652Z", "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '244' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:13 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_dict.yaml new file mode 100644 index 0000000000000..1d2d4283ad33a --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_cloud_event_dict.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: '[{"id": "1234", "source": "http://samplesource.dev", "data": "cloudevent", + "type": "Sample.Cloud.Event", "specversion": "1.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:13 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_custom_schema_event.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_custom_schema_event.yaml new file mode 100644 index 0000000000000..57321b5fe6488 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_custom_schema_event.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"customSubject": "sample", "customEventType": "sample.event", "customDataVersion": + "2.0", "customId": "1234", "customEventTime": "2020-09-03T21:37:32.440554+00:00", + "customData": "sample data"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://customeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:31 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_custom_schema_event_as_list.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_custom_schema_event_as_list.yaml new file mode 100644 index 0000000000000..02f25b5538f94 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_custom_schema_event_as_list.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"customSubject": "sample", "customEventType": "sample.event", "customDataVersion": + "2.0", "customId": "1234", "customEventTime": "2020-09-03T21:37:32.857620+00:00", + "customData": "sample data"}, {"customSubject": "sample2", "customEventType": + "sample.event", "customDataVersion": "2.0", "customId": "12345", "customEventTime": + "2020-09-03T21:37:32.857620+00:00", "customData": "sample data 2"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '396' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://customeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:31 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_as_list.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_as_list.yaml new file mode 100644 index 0000000000000..b965b6a539dca --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_as_list.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "a3ad167e-302d-4d3d-b5ee-d9e989aa277a", "subject": "sample", "data": + "eventgridevent", "eventType": "Sample.EventGrid.Event", "eventTime": "2020-09-03T21:37:46.777197Z", + "dataVersion": "2.0"}, {"id": "e36112d1-2413-462b-ac5a-8046bd7add59", "subject": + "sample2", "data": "eventgridevent2", "eventType": "Sample.EventGrid.Event", + "eventTime": "2020-09-03T21:37:46.778197Z", "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '402' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:45 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_dict.yaml new file mode 100644 index 0000000000000..c5f808f36297b --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_dict.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"id": "d686873c-334a-4456-b33a-f56c9103c084", "subject": "sample", "data": + {"sample": "eventgridevent"}, "eventType": "Sample.EventGrid.Event", "eventTime": + "2020-09-03T21:37:47.256176Z", "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:45 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_str.yaml new file mode 100644 index 0000000000000..1c02edf7725be --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_event_grid_event_data_str.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"id": "be71503b-2316-4d36-ba30-db189bb742ac", "subject": "sample", "data": + "eventgridevent", "eventType": "Sample.EventGrid.Event", "eventTime": "2020-09-03T21:37:47.663176Z", + "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '200' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:45 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_signature_credential.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_signature_credential.yaml new file mode 100644 index 0000000000000..631c1977b5bcf --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client.test_send_signature_credential.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '[{"id": "e8f4c1fb-ce80-470c-a6fb-997702c4cb12", "subject": "sample", "data": + {"sample": "eventgridevent"}, "eventType": "Sample.EventGrid.Event", "eventTime": + "2020-09-03T21:37:48.023188Z", "dataVersion": "2.0"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + aeg-sas-token: + - r=https%3A%2F%2Feventgridtestqagvsp23jey.westus-1.eventgrid.azure.net%2Fapi%2Fevents%3FapiVersion%3D2018-01-01&e=2020-09-03%2022%3A37%3A48.021190%2B00%3A00&s=Ws1vSY7xBzFYccOy3jTJVqnI5iqNDl1qp5R1jj2MUTg%3D + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Thu, 03 Sep 2020 21:37:46 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_as_list.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_as_list.yaml new file mode 100644 index 0000000000000..7fb1aa4083957 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_as_list.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"id": "48538bd7-cfcc-4244-a06a-80787bb464c2", "source": "http://samplesource.dev", + "data": "cloudevent", "type": "Sample.Cloud.Event", "time": "2020-09-03T21:37:48.405133Z", + "specversion": "1.0"}]' + headers: + Content-Length: + - '198' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:46 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestoc4o4l.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_bytes.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_bytes.yaml new file mode 100644 index 0000000000000..ce1bc2d85c64d --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_bytes.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"id": "13ae3fbd-e54d-4e18-87d7-3a84e8b8927f", "source": "http://samplesource.dev", + "data_base64": "Y2xvdWRldmVudA==", "type": "Sample.Cloud.Event", "time": "2020-09-04T17:09:37.664287Z", + "specversion": "1.0"}]' + headers: + Content-Length: + - '211' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Fri, 04 Sep 2020 17:09:35 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestdfyfhi.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_dict.yaml new file mode 100644 index 0000000000000..c420fc0b88e9e --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_dict.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"id": "f5255a4c-c870-451d-bb71-dae2f2a2287b", "source": "http://samplesource.dev", + "data": {"sample": "cloudevent"}, "type": "Sample.Cloud.Event", "time": "2020-09-03T21:37:48.640285Z", + "specversion": "1.0"}]' + headers: + Content-Length: + - '210' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:46 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestoc4o4l.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_str.yaml new file mode 100644 index 0000000000000..c69eec9dec62d --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_str.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"id": "7fa5bfc7-22e7-421a-8017-98e132d2270e", "source": "http://samplesource.dev", + "data": "cloudevent", "type": "Sample.Cloud.Event", "time": "2020-09-03T21:37:48.930286Z", + "specversion": "1.0"}]' + headers: + Content-Length: + - '198' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:47 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestoc4o4l.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_with_extensions.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_with_extensions.yaml new file mode 100644 index 0000000000000..a63ec994b6353 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_data_with_extensions.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"reason_code": 204, "extension": "extension", "id": "70db4803-6202-4e85-8c0d-0d32243d864d", + "source": "http://samplesource.dev", "data": "cloudevent", "type": "Sample.Cloud.Event", + "time": "2020-09-03T21:37:49.229285Z", "specversion": "1.0"}]' + headers: + Content-Length: + - '244' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:47 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestoc4o4l.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_dict.yaml new file mode 100644 index 0000000000000..c846a45e21010 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_cloud_event_dict.yaml @@ -0,0 +1,27 @@ +interactions: +- request: + body: '[{"id": "1234", "source": "http://samplesource.dev", "data": "cloudevent", + "type": "Sample.Cloud.Event", "specversion": "1.0"}]' + headers: + Content-Length: + - '127' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:47 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestoc4o4l.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_custom_schema_event.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_custom_schema_event.yaml new file mode 100644 index 0000000000000..6cc91a22b178f --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_custom_schema_event.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"customSubject": "sample", "customEventType": "sample.event", "customDataVersion": + "2.0", "customId": "1234", "customEventTime": "2020-09-03T21:37:49.762229+00:00", + "customData": "sample data"}]' + headers: + Content-Length: + - '196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://customeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:47 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://customeventgridtestyjs7n.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_custom_schema_event_as_list.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_custom_schema_event_as_list.yaml new file mode 100644 index 0000000000000..9ecb8d069b5f9 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_custom_schema_event_as_list.yaml @@ -0,0 +1,30 @@ +interactions: +- request: + body: '[{"customSubject": "sample", "customEventType": "sample.event", "customDataVersion": + "2.0", "customId": "1234", "customEventTime": "2020-09-03T21:37:50.025285+00:00", + "customData": "sample data"}, {"customSubject": "sample2", "customEventType": + "sample.event", "customDataVersion": "2.0", "customId": "12345", "customEventTime": + "2020-09-03T21:37:50.025285+00:00", "customData": "sample data 2"}]' + headers: + Content-Length: + - '396' + Content-Type: + - application/json + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://customeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:48 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://customeventgridtestyjs7n.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_as_list.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_as_list.yaml new file mode 100644 index 0000000000000..8e8b991cef0c1 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_as_list.yaml @@ -0,0 +1,30 @@ +interactions: +- request: + body: '[{"id": "3a5f4c79-11d8-440c-a050-6f0406220b28", "subject": "sample", "data": + "eventgridevent", "eventType": "Sample.EventGrid.Event", "eventTime": "2020-09-03T21:37:50.261291Z", + "dataVersion": "2.0"}, {"id": "70e96266-d9e5-47cb-bd2e-765048d2cea5", "subject": + "sample2", "data": "eventgridevent2", "eventType": "Sample.EventGrid.Event", + "eventTime": "2020-09-03T21:37:50.262227Z", "dataVersion": "2.0"}]' + headers: + Content-Length: + - '402' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:49 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://eventgridtestqagvsp23jey.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_dict.yaml new file mode 100644 index 0000000000000..63ab594518371 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_dict.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"id": "15dd698a-dfae-4b77-b74a-7ebbda98f3d5", "subject": "sample", "data": + {"sample": "eventgridevent"}, "eventType": "Sample.EventGrid.Event", "eventTime": + "2020-09-03T21:37:50.921288Z", "dataVersion": "2.0"}]' + headers: + Content-Length: + - '212' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:49 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://eventgridtestqagvsp23jey.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_str.yaml new file mode 100644 index 0000000000000..56f3200ad437e --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_event_grid_event_data_str.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"id": "45e66e3e-b349-4f9f-8aaf-c277ec452211", "subject": "sample", "data": + "eventgridevent", "eventType": "Sample.EventGrid.Event", "eventTime": "2020-09-03T21:37:51.163229Z", + "dataVersion": "2.0"}]' + headers: + Content-Length: + - '200' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:49 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://eventgridtestqagvsp23jey.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_signature_credential.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_signature_credential.yaml new file mode 100644 index 0000000000000..2cc7fa977214c --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_eg_publisher_client_async.test_send_signature_credential.yaml @@ -0,0 +1,30 @@ +interactions: +- request: + body: '[{"id": "3c575436-60e6-49e1-be49-91e96207a69c", "subject": "sample", "data": + {"sample": "eventgridevent"}, "eventType": "Sample.EventGrid.Event", "eventTime": + "2020-09-03T21:37:51.447285Z", "dataVersion": "2.0"}]' + headers: + Content-Length: + - '212' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/unknown Python/3.7.3 (Windows-10-10.0.18362-SP0) + aeg-sas-token: + - r=https%3A%2F%2Feventgridtestqagvsp23jey.westus-1.eventgrid.azure.net%2Fapi%2Fevents%3FapiVersion%3D2018-01-01&e=2020-09-03%2022%3A37%3A51.446284%2B00%3A00&s=MVgUMuibVdsa5f7YmaZDXPBQZPCUFR2paxC5lxJanAM%3D + method: POST + uri: https://eventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Thu, 03 Sep 2020 21:37:49 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://eventgridtestqagvsp23jey.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_azure_eventgrid.py b/sdk/eventgrid/azure-eventgrid/tests/test_azure_eventgrid.py deleted file mode 100644 index 01b3ce458351b..0000000000000 --- a/sdk/eventgrid/azure-eventgrid/tests/test_azure_eventgrid.py +++ /dev/null @@ -1,64 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from datetime import datetime - -from azure.eventgrid import EventGridClient -from msrest.authentication import TopicCredentials - -from azure_devtools.scenario_tests import ReplayableTest, AzureTestError - -from devtools_testutils import mgmt_settings_fake as fake_settings - - -class EventGridTest(ReplayableTest): - FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['aeg-sas-key'] - - def __init__(self, method_name): - self._fake_settings, self._real_settings = self._load_settings() - super(EventGridTest, self).__init__(method_name) - - @property - def settings(self): - if self.is_live: - if self._real_settings: - return self._real_settings - else: - raise AzureTestError('Need a mgmt_settings_real.py file to run tests live.') - else: - return self._fake_settings - - def _load_settings(self): - try: - from devtools_testutils import mgmt_settings_real as real_settings - return fake_settings, real_settings - except ImportError: - return fake_settings, None - - def test_event_grid_basic(self): - - credentials = TopicCredentials( - self.settings.EVENT_GRID_KEY - ) - event_grid_client = EventGridClient(credentials) - event_grid_client.publish_events( - "lmazuel-eventgrid-test.westus2-1.eventgrid.azure.net", - events=[{ - 'id' : "dbf93d79-3859-4cac-8055-51e3b6b54bea", - 'subject' : "My subject", - 'data': { - 'key': 'I accept any kind of data here' - }, - 'event_type': 'PersonalEventType', - 'event_time': datetime(2018, 1, 30), - 'data_version': 1 - }] - ) - diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py b/sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py new file mode 100644 index 0000000000000..344f5dd706348 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py @@ -0,0 +1,115 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import logging +import sys +import os +import pytest +import json +import datetime as dt + +from devtools_testutils import AzureMgmtTestCase +from msrest.serialization import UTC +from azure.eventgrid import EventGridConsumer, CloudEvent, EventGridEvent, StorageBlobCreatedEventData +from _mocks import ( + cloud_storage_dict, + cloud_storage_string, + cloud_storage_bytes, + cloud_custom_dict, + cloud_custom_string, + cloud_custom_bytes, + eg_custom_dict, + eg_custom_string, + eg_custom_bytes, + eg_storage_dict, + eg_storage_string, + eg_storage_bytes + ) + +class EventGridConsumerTests(AzureMgmtTestCase): + + # Cloud Event tests + def test_eg_consumer_cloud_storage_dict(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_cloud_event(cloud_storage_dict) + assert deserialized_event.__class__ == CloudEvent + assert deserialized_event.data.__class__ == StorageBlobCreatedEventData + + def test_eg_consumer_cloud_storage_string(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_cloud_event(cloud_storage_string) + assert deserialized_event.__class__ == CloudEvent + assert deserialized_event.data.__class__ == StorageBlobCreatedEventData + + def test_eg_consumer_cloud_storage_bytes(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_cloud_event(cloud_storage_bytes) + assert deserialized_event.__class__ == CloudEvent + assert deserialized_event.data.__class__ == StorageBlobCreatedEventData + + + def test_eg_consumer_cloud_custom_dict(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_cloud_event(cloud_custom_dict) + assert deserialized_event.__class__ == CloudEvent + assert deserialized_event.data is None + + + def test_eg_consumer_cloud_custom_string(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_cloud_event(cloud_custom_string) + assert deserialized_event.__class__ == CloudEvent + assert deserialized_event.data is None + + + def test_eg_consumer_cloud_custom_bytes(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_cloud_event(cloud_custom_bytes) + assert deserialized_event.__class__ == CloudEvent + assert deserialized_event.data is None + + # EG Event tests + + def test_eg_consumer_eg_storage_dict(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_eventgrid_event(eg_storage_dict) + assert deserialized_event.__class__ == EventGridEvent + assert deserialized_event.data.__class__ == StorageBlobCreatedEventData + + + def test_eg_consumer_eg_storage_string(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_eventgrid_event(eg_storage_string) + assert deserialized_event.__class__ == EventGridEvent + assert deserialized_event.data.__class__ == StorageBlobCreatedEventData + + + def test_eg_consumer_eg_storage_bytes(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_eventgrid_event(eg_storage_bytes) + assert deserialized_event.__class__ == EventGridEvent + assert deserialized_event.data.__class__ == StorageBlobCreatedEventData + + + def test_eg_consumer_eg_custom_dict(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_eventgrid_event(eg_custom_dict) + assert deserialized_event.__class__ == EventGridEvent + assert deserialized_event.data is None + + + def test_eg_consumer_eg_custom_string(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_eventgrid_event(eg_custom_string) + assert deserialized_event.__class__ == EventGridEvent + assert deserialized_event.data is None + + + def test_eg_consumer_eg_custom_bytes(self, **kwargs): + client = EventGridConsumer() + deserialized_event = client.decode_eventgrid_event(eg_custom_bytes) + assert deserialized_event.__class__ == EventGridEvent + assert deserialized_event.data is None diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client.py b/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client.py new file mode 100644 index 0000000000000..69369c0334ad8 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client.py @@ -0,0 +1,224 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import logging +import sys +import os +import pytest +from datetime import timedelta +from msrest.serialization import UTC +import datetime as dt + +from devtools_testutils import AzureMgmtTestCase, CachedResourceGroupPreparer + +from azure_devtools.scenario_tests import ReplayableTest +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import EventGridPublisherClient, CloudEvent, EventGridEvent, CustomEvent ,EventGridSharedAccessSignatureCredential, generate_shared_access_signature + +from eventgrid_preparer import ( + CachedEventGridTopicPreparer +) + +class EventGridPublisherClientTests(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['aeg-sas-key'] + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='eventgridtest') + def test_send_event_grid_event_data_dict(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + eg_event = EventGridEvent( + subject="sample", + data={"sample": "eventgridevent"}, + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + client.send(eg_event) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='eventgridtest') + def test_send_event_grid_event_data_as_list(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + eg_event1 = EventGridEvent( + subject="sample", + data="eventgridevent", + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + eg_event2 = EventGridEvent( + subject="sample2", + data="eventgridevent2", + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + client.send([eg_event1, eg_event2]) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='eventgridtest') + def test_send_event_grid_event_data_str(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + eg_event = EventGridEvent( + subject="sample", + data="eventgridevent", + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + client.send(eg_event) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_dict(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = {"sample": "cloudevent"}, + type="Sample.Cloud.Event" + ) + client.send(cloud_event) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_str(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = "cloudevent", + type="Sample.Cloud.Event" + ) + client.send(cloud_event) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_bytes(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = b"cloudevent", + type="Sample.Cloud.Event" + ) + client.send(cloud_event) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_as_list(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = "cloudevent", + type="Sample.Cloud.Event" + ) + client.send([cloud_event]) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_with_extensions(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = "cloudevent", + type="Sample.Cloud.Event", + extensions={ + 'reason_code':204, + 'extension':'hello' + } + ) + client.send([cloud_event]) + internal = cloud_event._to_generated().serialize() + assert 'reason_code' in internal + assert 'extension' in internal + assert internal['reason_code'] == 204 + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_dict(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event1 = { + "id": "1234", + "source": "http://samplesource.dev", + "specversion": "1.0", + "data": "cloudevent", + "type": "Sample.Cloud.Event" + } + client.send(cloud_event1) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='eventgridtest') + def test_send_signature_credential(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + expiration_date_utc = dt.datetime.now(UTC()) + timedelta(hours=1) + signature = generate_shared_access_signature(eventgrid_topic_endpoint, eventgrid_topic_primary_key, expiration_date_utc) + credential = EventGridSharedAccessSignatureCredential(signature) + client = EventGridPublisherClient(eventgrid_topic_endpoint, credential) + eg_event = EventGridEvent( + subject="sample", + data={"sample": "eventgridevent"}, + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + client.send(eg_event) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='customeventgridtest') + def test_send_custom_schema_event(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + custom_event = CustomEvent( + { + "customSubject": "sample", + "customEventType": "sample.event", + "customDataVersion": "2.0", + "customId": "1234", + "customEventTime": dt.datetime.now(UTC()).isoformat(), + "customData": "sample data" + } + ) + client.send(custom_event) + + @pytest.mark.liveTest + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='customeventgridtest') + def test_send_custom_schema_event_as_list(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + custom_event1 = CustomEvent( + { + "customSubject": "sample", + "customEventType": "sample.event", + "customDataVersion": "2.0", + "customId": "1234", + "customEventTime": dt.datetime.now(UTC()).isoformat(), + "customData": "sample data" + } + ) + custom_event2 = CustomEvent( + { + "customSubject": "sample2", + "customEventType": "sample.event", + "customDataVersion": "2.0", + "customId": "12345", + "customEventTime": dt.datetime.now(UTC()).isoformat(), + "customData": "sample data 2" + } + ) + client.send([custom_event1, custom_event2]) diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client_async.py b/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client_async.py new file mode 100644 index 0000000000000..fb4aebcc18e0c --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client_async.py @@ -0,0 +1,234 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import logging +import asyncio +import sys +import os +import pytest +from datetime import timedelta +from msrest.serialization import UTC +import datetime as dt + +from devtools_testutils import AzureMgmtTestCase, CachedResourceGroupPreparer + +from azure_devtools.scenario_tests import ReplayableTest +from azure.core.credentials import AzureKeyCredential +from azure.eventgrid import CloudEvent, EventGridEvent, CustomEvent ,EventGridSharedAccessSignatureCredential, generate_shared_access_signature +from azure.eventgrid.aio import EventGridPublisherClient + +from eventgrid_preparer import ( + CachedEventGridTopicPreparer +) + +class EventGridPublisherClientTests(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['aeg-sas-key'] + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='eventgridtest') + @pytest.mark.asyncio + async def test_send_event_grid_event_data_dict(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + eg_event = EventGridEvent( + subject="sample", + data={"sample": "eventgridevent"}, + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + await client.send(eg_event) + + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='eventgridtest') + @pytest.mark.asyncio + async def test_send_event_grid_event_data_as_list(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + eg_event1 = EventGridEvent( + subject="sample", + data="eventgridevent", + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + eg_event2 = EventGridEvent( + subject="sample2", + data="eventgridevent2", + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + await client.send([eg_event1, eg_event2]) + + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='eventgridtest') + @pytest.mark.asyncio + async def test_send_event_grid_event_data_str(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + eg_event = EventGridEvent( + subject="sample", + data="eventgridevent", + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + await client.send(eg_event) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_dict(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = {"sample": "cloudevent"}, + type="Sample.Cloud.Event" + ) + await client.send(cloud_event) + + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_str(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = "cloudevent", + type="Sample.Cloud.Event" + ) + await client.send(cloud_event) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_bytes(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = b"cloudevent", + type="Sample.Cloud.Event" + ) + await client.send(cloud_event) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_as_list(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = "cloudevent", + type="Sample.Cloud.Event" + ) + await client.send([cloud_event]) + + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_with_extensions(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event = CloudEvent( + source = "http://samplesource.dev", + data = "cloudevent", + type="Sample.Cloud.Event", + extensions={ + 'reason_code':204, + 'extension':'hello' + } + ) + await client.send([cloud_event]) + internal = cloud_event._to_generated().serialize() + assert 'reason_code' in internal + assert 'extension' in internal + assert internal['reason_code'] == 204 + + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_dict(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + cloud_event1 = { + "id": "1234", + "source": "http://samplesource.dev", + "specversion": "1.0", + "data": "cloudevent", + "type": "Sample.Cloud.Event" + } + await client.send(cloud_event1) + + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='eventgridtest') + @pytest.mark.asyncio + async def test_send_signature_credential(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + expiration_date_utc = dt.datetime.now(UTC()) + timedelta(hours=1) + signature = generate_shared_access_signature(eventgrid_topic_endpoint, eventgrid_topic_primary_key, expiration_date_utc) + credential = EventGridSharedAccessSignatureCredential(signature) + client = EventGridPublisherClient(eventgrid_topic_endpoint, credential) + eg_event = EventGridEvent( + subject="sample", + data={"sample": "eventgridevent"}, + event_type="Sample.EventGrid.Event", + data_version="2.0" + ) + await client.send(eg_event) + + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='customeventgridtest') + @pytest.mark.asyncio + async def test_send_custom_schema_event(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + custom_event = CustomEvent( + { + "customSubject": "sample", + "customEventType": "sample.event", + "customDataVersion": "2.0", + "customId": "1234", + "customEventTime": dt.datetime.now(UTC()).isoformat(), + "customData": "sample data" + } + ) + await client.send(custom_event) + + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='customeventgridtest') + @pytest.mark.asyncio + async def test_send_custom_schema_event_as_list(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + custom_event1 = CustomEvent( + { + "customSubject": "sample", + "customEventType": "sample.event", + "customDataVersion": "2.0", + "customId": "1234", + "customEventTime": dt.datetime.now(UTC()).isoformat(), + "customData": "sample data" + } + ) + custom_event2 = CustomEvent( + { + "customSubject": "sample2", + "customEventType": "sample.event", + "customDataVersion": "2.0", + "customId": "12345", + "customEventTime": dt.datetime.now(UTC()).isoformat(), + "customData": "sample data 2" + } + ) + await client.send([custom_event1, custom_event2]) diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_serialization.py b/sdk/eventgrid/azure-eventgrid/tests/test_serialization.py new file mode 100644 index 0000000000000..6642d3b3813f1 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/test_serialization.py @@ -0,0 +1,102 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import logging +import sys +import os +import pytest +import json +import base64 +import datetime as dt + +from devtools_testutils import AzureMgmtTestCase +from msrest.serialization import UTC +from azure.eventgrid import CloudEvent +from _mocks import ( + cloud_storage_dict, + cloud_storage_string, + cloud_storage_bytes, + ) + +class EventGridSerializationTests(AzureMgmtTestCase): + + def _assert_cloud_event_serialized(self, expected, actual): + assert expected['source'] == actual['source'] + assert expected['type'] == actual['type'] + assert actual['specversion'] == '1.0' + assert 'id' in actual + assert 'time' in actual + + # Cloud Event tests + def test_cloud_event_serialization_extension_bytes(self, **kwargs): + data = b"cloudevent" + cloud_event = CloudEvent( + source="http://samplesource.dev", + data=data, + type="Sample.Cloud.Event", + foo="bar", + extensions={'e1':1, 'e2':2} + ) + + cloud_event.subject = "subject" # to test explicit setting of prop + encoded = base64.b64encode(data).decode('utf-8') + internal = cloud_event._to_generated() + + assert internal.additional_properties is not None + assert 'foo' not in internal.additional_properties + assert 'e1' in internal.additional_properties + + json = internal.serialize() + + expected = { + 'source':'http://samplesource.dev', + 'data_base64': encoded, + 'type':'Sample.Cloud.Event', + 'reason_code':204, + 'e1':1, + 'e2':2 + } + + self._assert_cloud_event_serialized(expected, json) + assert expected['data_base64'] == json['data_base64'] + + + def test_cloud_event_serialization_extension_string(self, **kwargs): + data = "cloudevent" + cloud_event = CloudEvent( + source="http://samplesource.dev", + data=data, + type="Sample.Cloud.Event", + foo="bar", + extensions={'e1':1, 'e2':2} + ) + + cloud_event.subject = "subject" # to test explicit setting of prop + internal = cloud_event._to_generated() + + assert internal.additional_properties is not None + assert 'foo' not in internal.additional_properties + assert 'e1' in internal.additional_properties + + json = internal.serialize() + + expected = { + 'source':'http://samplesource.dev', + 'data': data, + 'type':'Sample.Cloud.Event', + 'reason_code':204, + 'e1':1, + 'e2':2 + } + + self._assert_cloud_event_serialized(expected, json) + if sys.version_info > (3, 5): + assert expected['data'] == json['data'] + else: + encoded = base64.b64encode(data).decode('utf-8') + expected['data_base64'] = encoded + assert expected['data_base64'] == json['data_base64'] + assert 'data' not in json diff --git a/sdk/eventgrid/ci.yml b/sdk/eventgrid/ci.yml index 847f719bf4619..ef518abd365df 100644 --- a/sdk/eventgrid/ci.yml +++ b/sdk/eventgrid/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -32,4 +31,4 @@ extends: - name: azure_mgmt_eventgrid safeName: azuremgmteventgrid - name: azure_eventgrid - safeName: azureeventgrid \ No newline at end of file + safeName: azureeventgrid diff --git a/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/CHANGELOG.md b/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/CHANGELOG.md index 524cf5a2bf1c2..446233b544d7a 100644 --- a/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/CHANGELOG.md +++ b/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.1 (Unreleased) +## 1.1.1 (2020-09-08) +**Bug fixes** +- Fixed a bug that may gradually slow down retrieving checkpoint data from the storage blob if the storage account "File share soft delete" is enabled. #12836 ## 1.1.0 (2020-03-09) diff --git a/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/README.md b/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/README.md index fd1fac190444b..7a0f80babfc2f 100644 --- a/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/README.md +++ b/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/README.md @@ -5,18 +5,18 @@ This Checkpoint Store package works as a plug-in package to `EventHubConsumerCli Please note that this is an async library, for sync version of the Azure EventHubs Checkpoint Store client library, please refer to [azure-eventhub-checkpointstoreblob](../azure-eventhub-checkpointstoreblob). -[Source code](./) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob-aio/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/5.0.1/azure.eventhub.aio.html#azure.eventhub.aio.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/en-us/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/en-us/azure/storage/) +[Source code](./) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob-aio/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/5.0.1/azure.eventhub.aio.html#azure.eventhub.aio.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/azure/storage/) ## Getting started ### Prerequisites - Python 3.5.3 or later. -- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/en-us/). +- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/). -- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. +- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. -- **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-create-account-block-blob). +- **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-blob-create-account-block-blob). ### Install the package diff --git a/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/azure/eventhub/extensions/checkpointstoreblobaio/_blobstoragecsaio.py b/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/azure/eventhub/extensions/checkpointstoreblobaio/_blobstoragecsaio.py index 8ee9aaca319ba..4b6f9b64addc7 100644 --- a/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/azure/eventhub/extensions/checkpointstoreblobaio/_blobstoragecsaio.py +++ b/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/azure/eventhub/extensions/checkpointstoreblobaio/_blobstoragecsaio.py @@ -8,7 +8,7 @@ import asyncio from azure.eventhub.exceptions import OwnershipLostError # type: ignore from azure.eventhub.aio import CheckpointStore # type: ignore # pylint: disable=no-name-in-module -from azure.core.exceptions import ResourceModifiedError, ResourceExistsError # type: ignore +from azure.core.exceptions import ResourceModifiedError, ResourceExistsError, ResourceNotFoundError # type: ignore from ._vendor.storage.blob.aio import ContainerClient, BlobClient from ._vendor.storage.blob._shared.base_client import parse_connection_str @@ -115,9 +115,14 @@ async def _upload_ownership( ownership["partition_id"], ) blob_name = blob_name.lower() - uploaded_blob_properties = await self._get_blob_client(blob_name).upload_blob( - data=UPLOAD_DATA, overwrite=True, metadata=metadata, **etag_match - ) + blob_client = self._get_blob_client(blob_name) + try: + uploaded_blob_properties = await blob_client.set_blob_metadata(metadata, **etag_match) + except ResourceNotFoundError: + logger.info("Upload ownership blob %r because it hasn't existed in the container yet.", blob_name) + uploaded_blob_properties = await blob_client.upload_blob( + data=UPLOAD_DATA, overwrite=True, metadata=metadata, **etag_match + ) ownership["etag"] = uploaded_blob_properties["etag"] ownership["last_modified_time"] = uploaded_blob_properties[ "last_modified" @@ -220,9 +225,14 @@ async def update_checkpoint(self, checkpoint: Dict[str, Any]) -> None: checkpoint["partition_id"], ) blob_name = blob_name.lower() - await self._get_blob_client(blob_name).upload_blob( - data=UPLOAD_DATA, overwrite=True, metadata=metadata - ) + blob_client = self._get_blob_client(blob_name) + try: + await blob_client.set_blob_metadata(metadata) + except ResourceNotFoundError: + logger.info("Upload checkpoint blob %r because it hasn't existed in the container yet.", blob_name) + await blob_client.upload_blob( + data=UPLOAD_DATA, overwrite=True, metadata=metadata + ) async def list_checkpoints( self, fully_qualified_namespace, eventhub_name, consumer_group diff --git a/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples/README.md b/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples/README.md index 2b56d91908f8d..ee5fd05996cce 100644 --- a/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples/README.md +++ b/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples/README.md @@ -19,11 +19,11 @@ These sample programs show how to use the async Python client libraries for Azur ## Prerequisites - Python2.7, Python 3.5.3 or later. -- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/en-us/). +- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/). -- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. +- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. -- **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-create-account-block-blob). +- **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-blob-create-account-block-blob). ## Setup diff --git a/sdk/eventhub/azure-eventhub-checkpointstoreblob/CHANGELOG.md b/sdk/eventhub/azure-eventhub-checkpointstoreblob/CHANGELOG.md index 02b68ca42fafa..3ed1b27d0e29f 100644 --- a/sdk/eventhub/azure-eventhub-checkpointstoreblob/CHANGELOG.md +++ b/sdk/eventhub/azure-eventhub-checkpointstoreblob/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.1.1 (Unreleased) - +## 1.1.1 (2020-09-08) +**Bug fixes** +- Fixed a bug that may gradually slow down retrieving checkpoint data from the storage blob if the storage account "File share soft delete" is enabled. #12836 ## 1.1.0 (2020-03-09) diff --git a/sdk/eventhub/azure-eventhub-checkpointstoreblob/README.md b/sdk/eventhub/azure-eventhub-checkpointstoreblob/README.md index 000a8e26ac671..e91b77ddcdae5 100644 --- a/sdk/eventhub/azure-eventhub-checkpointstoreblob/README.md +++ b/sdk/eventhub/azure-eventhub-checkpointstoreblob/README.md @@ -5,18 +5,18 @@ This Checkpoint Store package works as a plug-in package to `EventHubConsumerCli Please note that this is a sync library, for async version of the Azure EventHubs Checkpoint Store client library, please refer to [azure-eventhub-checkpointstoreblob-aio](../azure-eventhub-checkpointstoreblob-aio). -[Source code](./) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/5.0.1/azure.eventhub.html#azure.eventhub.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/en-us/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/en-us/azure/storage/) +[Source code](./) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/5.0.1/azure.eventhub.html#azure.eventhub.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/azure/storage/) ## Getting started ### Prerequisites - Python2.7, Python 3.5.3 or later. -- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/en-us/). +- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/). -- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. +- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. -- **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-create-account-block-blob). +- **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-blob-create-account-block-blob). ### Install the package diff --git a/sdk/eventhub/azure-eventhub-checkpointstoreblob/azure/eventhub/extensions/checkpointstoreblob/_blobstoragecs.py b/sdk/eventhub/azure-eventhub-checkpointstoreblob/azure/eventhub/extensions/checkpointstoreblob/_blobstoragecs.py index 3f11f9f2e08d0..e027fba3e5553 100644 --- a/sdk/eventhub/azure-eventhub-checkpointstoreblob/azure/eventhub/extensions/checkpointstoreblob/_blobstoragecs.py +++ b/sdk/eventhub/azure-eventhub-checkpointstoreblob/azure/eventhub/extensions/checkpointstoreblob/_blobstoragecs.py @@ -11,7 +11,7 @@ from azure.eventhub import CheckpointStore # type: ignore # pylint: disable=no-name-in-module from azure.eventhub.exceptions import OwnershipLostError # type: ignore -from azure.core.exceptions import ResourceModifiedError, ResourceExistsError # type: ignore +from azure.core.exceptions import ResourceModifiedError, ResourceExistsError, ResourceNotFoundError # type: ignore from ._vendor.storage.blob import BlobClient, ContainerClient from ._vendor.storage.blob._shared.base_client import parse_connection_str @@ -136,9 +136,14 @@ def _upload_ownership(self, ownership, metadata): ownership["partition_id"], ) blob_name = blob_name.lower() - uploaded_blob_properties = self._get_blob_client(blob_name).upload_blob( - data=UPLOAD_DATA, overwrite=True, metadata=metadata, **etag_match - ) + blob_client = self._get_blob_client(blob_name) + try: + uploaded_blob_properties = blob_client.set_blob_metadata(metadata, **etag_match) + except ResourceNotFoundError: + logger.info("Upload ownership blob %r because it hasn't existed in the container yet.", blob_name) + uploaded_blob_properties = blob_client.upload_blob( + data=UPLOAD_DATA, overwrite=True, metadata=metadata, **etag_match + ) ownership["etag"] = uploaded_blob_properties["etag"] ownership["last_modified_time"] = _to_timestamp( uploaded_blob_properties["last_modified"] @@ -235,9 +240,14 @@ def update_checkpoint(self, checkpoint): checkpoint["partition_id"], ) blob_name = blob_name.lower() - self._get_blob_client(blob_name).upload_blob( - data=UPLOAD_DATA, overwrite=True, metadata=metadata - ) + blob_client = self._get_blob_client(blob_name) + try: + blob_client.set_blob_metadata(metadata) + except ResourceNotFoundError: + logger.info("Upload checkpoint blob %r because it hasn't existed in the container yet.", blob_name) + blob_client.upload_blob( + data=UPLOAD_DATA, overwrite=True, metadata=metadata + ) def list_checkpoints( self, fully_qualified_namespace, eventhub_name, consumer_group diff --git a/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples/README.md b/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples/README.md index d7aa8ea0a1deb..f68cee06440de 100644 --- a/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples/README.md +++ b/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples/README.md @@ -19,11 +19,11 @@ These sample programs show how to use the sync Python client libraries for Azure ## Prerequisites - Python2.7, Python 3.5.3 or later. -- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/en-us/). +- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/). -- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. +- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. -- **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-create-account-block-blob). +- **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-blob-create-account-block-blob). ## Setup diff --git a/sdk/eventhub/azure-eventhub/CHANGELOG.md b/sdk/eventhub/azure-eventhub/CHANGELOG.md index 3d461a60e8dd7..803e2df81e700 100644 --- a/sdk/eventhub/azure-eventhub/CHANGELOG.md +++ b/sdk/eventhub/azure-eventhub/CHANGELOG.md @@ -155,7 +155,7 @@ after which the underlying connection will close if there is no further activity **Breaking changes** - Removed support for IoT Hub direct connection. - - [EventHubs compatible connection string](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-read-builtin) of an IotHub can be used to create `EventHubClient` and read properties or events from an IoT Hub. + - [EventHubs compatible connection string](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin) of an IotHub can be used to create `EventHubClient` and read properties or events from an IoT Hub. - Removed support for sending EventData to IoT Hub. - Removed parameter `exception` in method `close()` of `EventHubConsumer` and `EventHubProcuer`. - Updated uAMQP dependency to 1.2.3. @@ -194,7 +194,7 @@ after which the underlying connection will close if there is no further activity - `backoff_max`: The maximum delay time in total. - Added support for context manager on `EventHubClient`. - Added new error type `OperationTimeoutError` for send operation. -- Introduced a new class `EventProcessor` which replaces the older concept of [Event Processor Host](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-event-processor-host). This early preview is intended to allow users to test the new design using a single instance of `EventProcessor`. The ability to checkpoints to a durable store will be added in future updates. +- Introduced a new class `EventProcessor` which replaces the older concept of [Event Processor Host](https://docs.microsoft.com/azure/event-hubs/event-hubs-event-processor-host). This early preview is intended to allow users to test the new design using a single instance of `EventProcessor`. The ability to checkpoints to a durable store will be added in future updates. - `EventProcessor`: EventProcessor creates and runs consumers for all partitions of the eventhub. - `PartitionManager`: PartitionManager defines the interface for getting/claiming ownerships of partitions and updating checkpoints. - `PartitionProcessor`: PartitionProcessor defines the interface for processing events. diff --git a/sdk/eventhub/azure-eventhub/README.md b/sdk/eventhub/azure-eventhub/README.md index 4d02b4d92ee3f..7b5e59df699d0 100644 --- a/sdk/eventhub/azure-eventhub/README.md +++ b/sdk/eventhub/azure-eventhub/README.md @@ -4,7 +4,7 @@ Azure Event Hubs is a highly scalable publish-subscribe service that can ingest them to multiple consumers. This lets you process and analyze the massive amounts of data produced by your connected devices and applications. Once Event Hubs has collected the data, you can retrieve, transform, and store it by using any real-time analytics provider or with batching/storage adapters. If you would like to know more about Azure Event Hubs, -you may wish to review: [What is Event Hubs](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about)? +you may wish to review: [What is Event Hubs](https://docs.microsoft.com/azure/event-hubs/event-hubs-about)? The Azure Event Hubs client library allows for publishing and consuming of Azure Event Hubs events and may be used to: @@ -13,7 +13,7 @@ The Azure Event Hubs client library allows for publishing and consuming of Azure - Observe interesting operations and interactions happening within your business or other ecosystem, allowing loosely coupled systems to interact without the need to bind them together. - Receive events from one or more publishers, transform them to better meet the needs of your ecosystem, then publish the transformed events to a new stream for consumers to observe. -[Source code](./) | [Package (PyPi)](https://pypi.org/project/azure-eventhub/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/5.2.0b1/azure.eventhub.html) | [Product documentation](https://docs.microsoft.com/en-us/azure/event-hubs/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples) +[Source code](./) | [Package (PyPi)](https://pypi.org/project/azure-eventhub/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/5.2.0b1/azure.eventhub.html) | [Product documentation](https://docs.microsoft.com/azure/event-hubs/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples) ## Getting started ### Prerequisites @@ -24,7 +24,7 @@ If you do not have an existing Azure account, you may sign up for a free trial o - **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide -for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create). +for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. ### Install the package @@ -39,43 +39,20 @@ $ pip install azure-eventhub Interaction with Event Hubs starts with an instance of EventHubConsumerClient or EventHubProducerClient class. You need either the host name, SAS/AAD credential and event hub name or a connection string to instantiate the client object. -**Create client from connection string:** +**[Create client from connection string:](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub/samples/sync_samples/connection_string_authentication.py)** For the Event Hubs client library to interact with an Event Hub, the easiest means is to use a connection string, which is created automatically when creating an Event Hubs namespace. -If you aren't familiar with shared access policies in Azure, you may wish to follow the step-by-step guide to [get an Event Hubs connection string](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-get-connection-string). - - -```python -from azure.eventhub import EventHubConsumerClient, EventHubProducerClient - -connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>' -consumer_group = '<< CONSUMER GROUP >>' -eventhub_name = '<< NAME OF THE EVENT HUB >>' -producer_client = EventHubProducerClient.from_connection_string(connection_str, eventhub_name=eventhub_name) -consumer_client = EventHubConsumerClient.from_connection_string(connection_str, consumer_group, eventhub_name=eventhub_name) - -``` +If you aren't familiar with shared access policies in Azure, you may wish to follow the step-by-step guide to [get an Event Hubs connection string](https://docs.microsoft.com/azure/event-hubs/event-hubs-get-connection-string). - The `from_connection_string` method takes the connection string of the form `Endpoint=sb://.servicebus.windows.net/;SharedAccessKeyName=;SharedAccessKey=` and -entity name to your Event Hub instance. You can get the connection string from the [Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-get-connection-string#get-connection-string-from-the-portal). +entity name to your Event Hub instance. You can get the connection string from the [Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-get-connection-string#get-connection-string-from-the-portal). -**Create client using the azure-identity library:** +**[Create client using the azure-identity library:](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py)** -```python -from azure.eventhub import EventHubConsumerClient -from azure.identity import DefaultAzureCredential +Alternately, one can use a Credential object to authenticate via AAD with the azure-identity package. -credential = DefaultAzureCredential() - -fully_qualified_namespace = '<< HOSTNAME OF THE EVENT HUB >>' -eventhub_name = '<< NAME OF THE EVENT HUB >>' -consumer_group = '<< CONSUMER GROUP >>' -consumer_client = EventHubConsumerClient(fully_qualified_namespace, eventhub_name, consumer_group, credential) - -``` - -- This constructor takes the host name and entity name of your Event Hub instance and credential that implements the +- This constructor demonstrated in the sample linked above takes the host name and entity name of your Event Hub instance and credential that implements the [TokenCredential](../../core/azure-core/azure/core/credentials.py) protocol. There are implementations of the `TokenCredential` protocol available in the [azure-identity package](https://pypi.org/project/azure-identity/). The host name is of the format ``. @@ -104,7 +81,7 @@ There can be at most 5 concurrent readers on a partition per consumer group; how one active consumer for a given partition and consumer group pairing. Each active reader receives all of the events from its partition; if there are multiple readers on the same partition, then they will receive duplicate events. -For more concepts and deeper discussion, see: [Event Hubs Features](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features). +For more concepts and deeper discussion, see: [Event Hubs Features](https://docs.microsoft.com/azure/event-hubs/event-hubs-features). Also, the concepts for AMQP are well documented in [OASIS Advanced Messaging Queuing Protocol (AMQP) Version 1.0](http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-overview-v1.0-os.html). ## Examples @@ -160,6 +137,9 @@ with client: ### Consume events from an Event Hub +There are multiple ways to consume events from an EventHub. To simply trigger a callback when an event is received, +the `EventHubConsumerClient.receive` method will be of use as follows: + ```python import logging from azure.eventhub import EventHubConsumerClient @@ -187,6 +167,9 @@ with client: ### Consume events from an Event Hub in batches +Whereas the above sample triggers the callback for each message as it is received, the following sample +triggers the callback on a batch of events, attempting to receive a number at a time. + ```python import logging from azure.eventhub import EventHubConsumerClient @@ -248,6 +231,9 @@ if __name__ == '__main__': ### Consume events from an Event Hub asynchronously +This SDK supports both synchronous and asyncio based code. To receive as demonstrated in the samples above, but within +aio, one would need the following: + ```python import logging import asyncio @@ -281,6 +267,9 @@ if __name__ == '__main__': ### Consume events from an Event Hub in batches asynchronously +All synchronous functions are supported in aio as well. As demonstrated above for synchronous batch receipt, one can accomplish +the same within asyncio as follows: + ```python import logging import asyncio @@ -327,8 +316,8 @@ Search pypi with the prefix `azure-eventhub-checkpointstore` to find packages that support this and use the `CheckpointStore` implementation from one such package. Please note that both sync and async libraries are provided. In the below example, we create an instance of `EventHubConsumerClient` and use a `BlobCheckpointStore`. You need -to [create an Azure Storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal) -and a [Blob Container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) to run the code. +to [create an Azure Storage account](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal) +and a [Blob Container](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) to run the code. [Azure Blob Storage Checkpoint Store Async](../azure-eventhub-checkpointstoreblob-aio) and [Azure Blob Storage Checkpoint Store Sync](../azure-eventhub-checkpointstoreblob) @@ -378,7 +367,7 @@ if __name__ == '__main__': You can use `EventHubConsumerClient` to work with IoT Hub as well. This is useful for receiving telemetry data of IoT Hub from the linked EventHub. The associated connection string will not have send claims, hence sending events is not possible. -Please notice that the connection string needs to be for an [Event Hub-compatible endpoint](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-read-builtin), +Please notice that the connection string needs to be for an [Event Hub-compatible endpoint](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin), e.g. "Endpoint=sb://my-iothub-namespace-[uid].servicebus.windows.net/;SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key;EntityPath=my-iot-hub-name" There are two ways to get the Event Hubs compatible endpoint: diff --git a/sdk/eventhub/azure-eventhub/samples/README.md b/sdk/eventhub/azure-eventhub/samples/README.md index d2842e9a955a5..ac68f9b0ac713 100644 --- a/sdk/eventhub/azure-eventhub/samples/README.md +++ b/sdk/eventhub/azure-eventhub/samples/README.md @@ -52,10 +52,11 @@ Both [sync version](https://github.com/Azure/azure-sdk-for-python/tree/master/sd - [recv_for_period.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_for_period.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/async_samples/recv_for_period_async.py)) - Examples to receive events for a period of time: - Receive events for a period of time - - [client_identity_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/async_samples/client_identity_authentication_async.py)) - Examples for authentication by Azure Active Directory: - Authenticating and creating the client utilizing the `azure.identity` library +- [connection_string_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/sync_samples/connection_string_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/async_samples/connection_string_authentication_async.py)) - Examples for authentication by connection string: + - Authenticating and creating the client utilizing a connection string. - [proxy.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/sync_samples/proxy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/async_samples/proxy_async.py)) - Examples to send and receive events behind a proxy: - Send and receive events behind a proxy @@ -63,6 +64,9 @@ Both [sync version](https://github.com/Azure/azure-sdk-for-python/tree/master/sd - [iot_hub_connection_string_receive_async.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py) - Examples to receive events from an IoT Hub: - Convert an IoT Hub connection string to the built-in Event Hub endpoint and receive events from it +- [authenticate_with_sas_token.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/sync_samples/authenticate_with_sas_token.py) + - Utilize a SAS token to authenticate when creating an Event Hub client. + ## Prerequisites - Python 2.7, 3.5 or later. - **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. @@ -70,10 +74,10 @@ If you do not have an existing Azure account, you may sign up for a free trial o - **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide -for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create). +for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. -- **Azure Storage Account (Optional)**: To run receiving samples with blob checkpoint store for persist checkpoint, you need to [create an Azure Storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal) and a [Blob Container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container). +- **Azure Storage Account (Optional)**: To run receiving samples with blob checkpoint store for persist checkpoint, you need to [create an Azure Storage account](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal) and a [Blob Container](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container). ## Setup diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/authenticate_with_sas_token_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/authenticate_with_sas_token_async.py new file mode 100644 index 0000000000000..1ae8b38742e6d --- /dev/null +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/authenticate_with_sas_token_async.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +""" +Example to demonstrate utilizing SAS (Shared Access Signature) tokens to authenticate with ServiceBus +""" + +# pylint: disable=C0111 + +import asyncio +import os +import time +import hmac +import hashlib +import base64 +try: + from urllib.parse import quote as url_parse_quote +except ImportError: + from urllib import pathname2url as url_parse_quote + +from azure.core.credentials import AccessToken +from azure.eventhub.aio import EventHubConsumerClient + + +def generate_sas_token(uri, sas_name, sas_value, token_ttl): + """Performs the signing and encoding needed to generate a sas token from a sas key.""" + sas = sas_value.encode('utf-8') + expiry = str(int(time.time() + token_ttl)) + string_to_sign = (uri + '\n' + expiry).encode('utf-8') + signed_hmac_sha256 = hmac.HMAC(sas, string_to_sign, hashlib.sha256) + signature = url_parse_quote(base64.b64encode(signed_hmac_sha256.digest())) + return 'SharedAccessSignature sr={}&sig={}&se={}&skn={}'.format(uri, signature, expiry, sas_name) + + +class CustomizedSASCredential(object): + def __init__(self, token, expiry): + """ + :param str token: The token string + :param float expiry: The epoch timestamp + + """ + self.token = token + self.expiry = expiry + self.token_type = b"servicebus.windows.net:sastoken" + + async def get_token(self, *scopes, **kwargs): + """ + This method is automatically called when token is about to expire. + """ + return AccessToken(self.token, self.expiry) + + +# Target namespace and hub must also be specified. Consumer group is set to default unless required otherwise. +FULLY_QUALIFIED_NAMESPACE = os.environ['EVENT_HUB_HOSTNAME'] +EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] +CONSUMER_GROUP = "$Default" + +# The following part creates a SAS token. Users can use any way to create a SAS token. +SAS_POLICY = os.environ['EVENT_HUB_SAS_POLICY'] +SAS_KEY = os.environ['EVENT_HUB_SAS_KEY'] + +async def create_with_sas_token(): + uri = "sb://{}/{}".format(FULLY_QUALIFIED_NAMESPACE, EVENTHUB_NAME) + token_ttl = 3000 # seconds + sas_token = generate_sas_token(uri, SAS_POLICY, SAS_KEY, token_ttl) + # end of creating a SAS token + + consumer_client = EventHubConsumerClient( + fully_qualified_namespace=FULLY_QUALIFIED_NAMESPACE, + eventhub_name=EVENTHUB_NAME, + consumer_group=CONSUMER_GROUP, + credential=CustomizedSASCredential(sas_token, time.time() + token_ttl), + logging_enable=True + ) + + async def on_event(context, event): + print(context.partition_id, ":", event) + + async with consumer_client: + await consumer_client.receive( + on_event, + starting_position=-1 + ) + + +loop = asyncio.get_event_loop() +loop.run_until_complete(create_with_sas_token()) diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/connection_string_authentication_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/connection_string_authentication_async.py new file mode 100644 index 0000000000000..19dff480e74e7 --- /dev/null +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/connection_string_authentication_async.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +""" +An example to show authentication using a connection string obtained via the Azure Portal, or the Azure CLI toolkit. +""" + +import os +from azure.eventhub.aio import EventHubConsumerClient + +CONNECTION_STR = os.environ["EVENT_HUB_CONN_STR"] +EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] + +consumer_client = EventHubConsumerClient.from_connection_string( + conn_str=CONNECTION_STR, + consumer_group='$Default', + eventhub_name=EVENTHUB_NAME, +) + +async with consumer_client: + pass # consumer_client is now ready to be used. \ No newline at end of file diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/authenticate_with_sas_token.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/authenticate_with_sas_token.py new file mode 100644 index 0000000000000..49ed22743971b --- /dev/null +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/authenticate_with_sas_token.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +""" +Example to demonstrate utilizing SAS (Shared Access Signature) tokens to authenticate with ServiceBus +""" + +# pylint: disable=C0111 + +import os +import time +import hmac +import hashlib +import base64 +try: + from urllib.parse import quote as url_parse_quote +except ImportError: + from urllib import pathname2url as url_parse_quote + +from azure.core.credentials import AccessToken +from azure.eventhub import EventHubConsumerClient + + +def generate_sas_token(uri, sas_name, sas_value, token_ttl): + """Performs the signing and encoding needed to generate a sas token from a sas key.""" + sas = sas_value.encode('utf-8') + expiry = str(int(time.time() + token_ttl)) + string_to_sign = (uri + '\n' + expiry).encode('utf-8') + signed_hmac_sha256 = hmac.HMAC(sas, string_to_sign, hashlib.sha256) + signature = url_parse_quote(base64.b64encode(signed_hmac_sha256.digest())) + return 'SharedAccessSignature sr={}&sig={}&se={}&skn={}'.format(uri, signature, expiry, sas_name) + + +class CustomizedSASCredential(object): + def __init__(self, token, expiry): + """ + :param str token: The token string + :param float expiry: The epoch timestamp + + """ + self.token = token + self.expiry = expiry + self.token_type = b"servicebus.windows.net:sastoken" + + def get_token(self, *scopes, **kwargs): + """ + This method is automatically called when token is about to expire. + """ + return AccessToken(self.token, self.expiry) + + +# Target namespace and hub must also be specified. Consumer group is set to default unless required otherwise. +FULLY_QUALIFIED_NAMESPACE = os.environ['EVENT_HUB_HOSTNAME'] +EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] +CONSUMER_GROUP = "$Default" + +# The following part creates a SAS token. Users can use any way to create a SAS token. +SAS_POLICY = os.environ['EVENT_HUB_SAS_POLICY'] +SAS_KEY = os.environ['EVENT_HUB_SAS_KEY'] + +uri = "sb://{}/{}".format(FULLY_QUALIFIED_NAMESPACE, EVENTHUB_NAME) +token_ttl = 3000 # seconds +sas_token = generate_sas_token(uri, SAS_POLICY, SAS_KEY, token_ttl) +# end of creating a SAS token + +consumer_client = EventHubConsumerClient( + fully_qualified_namespace=FULLY_QUALIFIED_NAMESPACE, + eventhub_name=EVENTHUB_NAME, + consumer_group=CONSUMER_GROUP, + credential=CustomizedSASCredential(sas_token, time.time() + token_ttl), + logging_enable=True +) + +with consumer_client: + consumer_client.receive( + lambda pc, event: print(pc.partition_id, ":", event), + starting_position=-1 + ) diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py index 01f4988ebd113..09e725637ed83 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py @@ -50,6 +50,7 @@ # For example user to be logged in can be specified by the environment variable AZURE_USERNAME, consumed via the ManagedIdentityCredential # Alternately, one can specify the AZURE_TENANT_ID, AZURE_CLIENT_ID, and AZURE_CLIENT_SECRET to use the EnvironmentCredentialClass. # The docs above specify all mechanisms which the defaultCredential internally support. +# # credential = DefaultAzureCredential() producer = EventHubProducerClient(fully_qualified_namespace=fully_qualified_namespace, diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/connection_string_authentication.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/connection_string_authentication.py new file mode 100644 index 0000000000000..5fd8fd8a6dd92 --- /dev/null +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/connection_string_authentication.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +""" +An example to show authentication using a connection string obtained via the Azure Portal, or the Azure CLI toolkit. +""" + +import os +from azure.eventhub import EventHubConsumerClient + +CONNECTION_STR = os.environ["EVENT_HUB_CONN_STR"] +EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] + +consumer_client = EventHubConsumerClient.from_connection_string( + conn_str=CONNECTION_STR, + consumer_group='$Default', + eventhub_name=EVENTHUB_NAME, +) + +with consumer_client: + pass # consumer_client is now ready to be used. \ No newline at end of file diff --git a/sdk/eventhub/ci.yml b/sdk/eventhub/ci.yml index f9fdb12f65709..e4605fc4101b8 100644 --- a/sdk/eventhub/ci.yml +++ b/sdk/eventhub/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -42,4 +41,4 @@ extends: - name: azure_eventhub_checkpointstoreblob safeName: azureeventhubcheckpointstoreblob - name: azure_mgmt_eventhub - safeName: azuremgmteventhub \ No newline at end of file + safeName: azuremgmteventhub diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md index 769158c9bb5b6..21166a8d413be 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md @@ -1,11 +1,17 @@ # Release History -## 3.0.0b2 (Unreleased) +## 3.0.1 (Unreleased) + + +## 3.0.0 (2020-08-20) + +First stable release of the azure-ai-formrecognizer client library. **New features** - Client-level, keyword argument `api_version` can be used to specify the service API version to use. Currently only v2.0 is supported. See the enum `FormRecognizerApiVersion` for supported API versions. +- `FormWord` and `FormLine` now have attribute `kind` which specifies the kind of element it is, e.g. "word" or "line" ## 3.0.0b1 (2020-08-11) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/README.md index f02a97050ce2d..361f6bb381958 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/README.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/README.md @@ -402,8 +402,6 @@ The following section provides several code snippets illustrating common pattern ### More sample code These code samples show common scenario operations with the Azure Form Recognizer client library. -The async versions of the samples (the python sample files appended with `_async`) show asynchronous operations -with Form Recognizer and require Python 3.5 or later. * Client authentication: [sample_authentication.py][sample_authentication] * Recognize receipts: [sample_recognize_receipts.py][sample_recognize_receipts] 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 dbec302aec3c3..b0c95e6ffd4c7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py @@ -151,11 +151,16 @@ class FormElement(object): Units are in pixels for images and inches for PDF. :ivar int page_number: The 1-based number of the page in which this content is present. + :ivar str kind: + The kind of form element. Possible kinds are "word" or "line" which + correspond to a :class:`~azure.ai.formrecognizer.FormWord` or + :class:`~azure.ai.formrecognizer.FormLine`, respectively. """ def __init__(self, **kwargs): self.bounding_box = kwargs.get("bounding_box", None) self.page_number = kwargs.get("page_number", None) self.text = kwargs.get("text", None) + self.kind = kwargs.get("kind", None) class RecognizedForm(object): @@ -254,7 +259,7 @@ def __repr__(self): )[:1024] -class FieldData(FormElement): +class FieldData(object): """Contains the data for the form field. This includes the text, location of the text on the form, and a collection of the elements that make up the text. @@ -271,11 +276,14 @@ class FieldData(FormElement): When `include_field_elements` is set to true, a list of elements constituting this field or value is returned. The list constitutes of elements such as lines and words. - :vartype field_elements: list[~azure.ai.formrecognizer.FormWord, ~azure.ai.formrecognizer.FormLine] + :vartype field_elements: list[Union[~azure.ai.formrecognizer.FormElement, ~azure.ai.formrecognizer.FormWord, + ~azure.ai.formrecognizer.FormLine]] """ def __init__(self, **kwargs): - super(FieldData, self).__init__(**kwargs) + self.page_number = kwargs.get("page_number", None) + self.text = kwargs.get("text", None) + self.bounding_box = kwargs.get("bounding_box", None) self.field_elements = kwargs.get("field_elements", None) @classmethod @@ -386,10 +394,11 @@ class FormLine(FormElement): A list of the words that make up the line. :ivar int page_number: The 1-based number of the page in which this content is present. + :ivar str kind: For FormLine, this is "line". """ def __init__(self, **kwargs): - super(FormLine, self).__init__(**kwargs) + super(FormLine, self).__init__(kind="line", **kwargs) self.words = kwargs.get("words", None) @classmethod @@ -403,12 +412,13 @@ def _from_generated(cls, line, page): ) def __repr__(self): - return "FormLine(text={}, bounding_box={}, words={}, page_number={})" \ + return "FormLine(text={}, bounding_box={}, words={}, page_number={}, kind={})" \ .format( self.text, self.bounding_box, repr(self.words), - self.page_number + self.page_number, + self.kind )[:1024] @@ -425,10 +435,11 @@ class FormWord(FormElement): Measures the degree of certainty of the recognition result. Value is between [0.0, 1.0]. :ivar int page_number: The 1-based number of the page in which this content is present. + :ivar str kind: For FormWord, this is "word". """ def __init__(self, **kwargs): - super(FormWord, self).__init__(**kwargs) + super(FormWord, self).__init__(kind="word", **kwargs) self.confidence = kwargs.get("confidence", None) @classmethod @@ -441,12 +452,13 @@ def _from_generated(cls, word, page): ) def __repr__(self): - return "FormWord(text={}, bounding_box={}, confidence={}, page_number={})" \ + return "FormWord(text={}, bounding_box={}, confidence={}, page_number={}, kind={})" \ .format( self.text, self.bounding_box, self.confidence, - self.page_number + self.page_number, + self.kind )[:1024] @@ -479,7 +491,7 @@ def __repr__(self): )[:1024] -class FormTableCell(FormElement): +class FormTableCell(object): # pylint:disable=too-many-instance-attributes """Represents a cell contained in a table recognized from the input document. :ivar str text: Text content of the cell. @@ -503,18 +515,21 @@ class FormTableCell(FormElement): elements constituting this cell is returned. The list constitutes of elements such as lines and words. For calls to begin_recognize_content(), this list is always populated. - :vartype field_elements: list[~azure.ai.formrecognizer.FormWord, ~azure.ai.formrecognizer.FormLine] + :vartype field_elements: list[Union[~azure.ai.formrecognizer.FormElement, ~azure.ai.formrecognizer.FormWord, + ~azure.ai.formrecognizer.FormLine]] """ def __init__(self, **kwargs): - super(FormTableCell, self).__init__(**kwargs) + self.text = kwargs.get("text", None) self.row_index = kwargs.get("row_index", None) self.column_index = kwargs.get("column_index", None) self.row_span = kwargs.get("row_span", 1) self.column_span = kwargs.get("column_span", 1) + self.bounding_box = kwargs.get("bounding_box", None) self.confidence = kwargs.get("confidence", None) self.is_header = kwargs.get("is_header", False) self.is_footer = kwargs.get("is_footer", False) + self.page_number = kwargs.get("page_number", None) self.field_elements = kwargs.get("field_elements", None) @classmethod diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_version.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_version.py index a23ad5a158ac7..c832b5bfa4499 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_version.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_version.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "3.0.0b2" +VERSION = "3.0.1" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md index 2cbdff253c77f..19af853b73fc5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md @@ -72,7 +72,7 @@ what you can do with the Azure Form Recognizer client library. [azure_identity_pip]: https://pypi.org/project/azure-identity/ [python-fr-ref-docs]: https://aka.ms/azsdk/python/formrecognizer/docs [get-endpoint-instructions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/README.md#looking-up-the-endpoint -[get-key-instructions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/README.md#types-of-credentials +[get-key-instructions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/README.md#get-the-api-key [sample_authentication]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_authentication.py [sample_authentication_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_authentication_async.py diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_get_bounding_boxes_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_get_bounding_boxes_async.py index 402e37e760443..877dd08edda12 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_get_bounding_boxes_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_get_bounding_boxes_async.py @@ -38,7 +38,6 @@ class GetBoundingBoxesSampleAsync(object): async def get_bounding_boxes(self): from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormRecognizerClient - from azure.ai.formrecognizer import FormWord, FormLine endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] @@ -86,19 +85,19 @@ async def get_bounding_boxes(self): # field_elements is only populated if you set include_field_elements to True in your call # to begin_recognize_custom_forms # It is a heterogeneous list of FormWord and FormLine. - for content in cell.field_elements: - if isinstance(content, FormWord): + for element in cell.field_elements: + if element.kind == "word": print("......Word '{}' within bounding box '{}' has a confidence of {}".format( - content.text, - format_bounding_box(content.bounding_box), - content.confidence + element.text, + format_bounding_box(element.bounding_box), + element.confidence )) - elif isinstance(content, FormLine): + elif element.kind == "line": print("......Line '{}' within bounding box '{}' has the following words: ".format( - content.text, - format_bounding_box(content.bounding_box) + element.text, + format_bounding_box(element.bounding_box) )) - for word in content.words: + for word in element.words: print(".........Word '{}' within bounding box '{}' has a confidence of {}".format( word.text, format_bounding_box(word.bounding_box), diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_get_bounding_boxes.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_get_bounding_boxes.py index cff103a81b44c..0ead56067ab44 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_get_bounding_boxes.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_get_bounding_boxes.py @@ -37,7 +37,6 @@ class GetBoundingBoxesSample(object): def get_bounding_boxes(self): from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient - from azure.ai.formrecognizer import FormWord, FormLine endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] @@ -83,19 +82,19 @@ def get_bounding_boxes(self): # field_elements is only populated if you set include_field_elements to True in your call # to begin_recognize_custom_forms # It is a heterogeneous list of FormWord and FormLine. - for content in cell.field_elements: - if isinstance(content, FormWord): + for element in cell.field_elements: + if element.kind == "word": print("......Word '{}' within bounding box '{}' has a confidence of {}".format( - content.text, - format_bounding_box(content.bounding_box), - content.confidence + element.text, + format_bounding_box(element.bounding_box), + element.confidence )) - elif isinstance(content, FormLine): + elif element.kind == "line": print("......Line '{}' within bounding box '{}' has the following words: ".format( - content.text, - format_bounding_box(content.bounding_box) + element.text, + format_bounding_box(element.bounding_box) )) - for word in content.words: + for word in element.words: print(".........Word '{}' within bounding box '{}' has a confidence of {}".format( word.text, format_bounding_box(word.bounding_box), diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/setup.py b/sdk/formrecognizer/azure-ai-formrecognizer/setup.py index eb0854143789d..5615ab956ad2c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/setup.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/setup.py @@ -59,7 +59,7 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model.test_copy_model_case_insensitive_region.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model.test_copy_model_case_insensitive_region.yaml new file mode 100644 index 0000000000000..123c9f11daa00 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model.test_copy_model_case_insensitive_region.yaml @@ -0,0 +1,449 @@ +interactions: +- request: + body: 'b''b\''{"source": "containersasurl", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": false}\''''' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '288' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models + response: + body: + string: '' + headers: + apim-request-id: + - 9b28feaa-c0a7-4ea8-825a-2944db659c23 + content-length: + - '0' + date: + - Mon, 17 Aug 2020 19:48:13 GMT + location: + - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '57' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "8a197bb1-29ce-4e4f-8d8f-320fe3d30b47", "status": + "creating", "createdDateTime": "2020-08-17T19:48:14Z", "lastUpdatedDateTime": + "2020-08-17T19:48:14Z"}}' + headers: + apim-request-id: + - 4acfbd78-c50f-4bdd-94e4-26d67e135956 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:18 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '67' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "8a197bb1-29ce-4e4f-8d8f-320fe3d30b47", "status": + "creating", "createdDateTime": "2020-08-17T19:48:14Z", "lastUpdatedDateTime": + "2020-08-17T19:48:14Z"}}' + headers: + apim-request-id: + - ebb830b2-ccf5-4bff-9ec1-c95140e74c6f + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:23 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '16' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "8a197bb1-29ce-4e4f-8d8f-320fe3d30b47", "status": + "ready", "createdDateTime": "2020-08-17T19:48:14Z", "lastUpdatedDateTime": + "2020-08-17T19:48:26Z"}, "keys": {"clusters": {"0": ["Additional Notes:", + "Address:", "Company Name:", "Company Phone:", "Dated As:", "Details", "Email:", + "Hero Limited", "Name:", "Phone:", "Purchase Order", "Purchase Order #:", + "Quantity", "SUBTOTAL", "Seattle, WA 93849 Phone:", "Shipped From", "Shipped + To", "TAX", "TOTAL", "Total", "Unit Price", "Vendor Name:", "Website:"]}}, + "trainResult": {"trainingDocuments": [{"documentName": "Form_1.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_2.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_3.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_4.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_5.jpg", "pages": + 1, "errors": [], "status": "succeeded"}], "errors": []}}' + headers: + apim-request-id: + - 657da126-a36e-4dd8-9548-a3f7c64c0a42 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:29 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '49' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/copyAuthorization + response: + body: + string: '{"modelId": "a92321bb-383d-4002-b76f-a800af2c5ec2", "accessToken": + "redacted", "expirationDateTimeTicks": 1597780109}' + headers: + apim-request-id: + - a45ad479-4e19-4db3-b0b7-49e3a2e97e48 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:29 GMT + location: + - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/a92321bb-383d-4002-b76f-a800af2c5ec2 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '66' + status: + code: 201 + message: Created +- request: + body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "CENTRALUSEUAP", + "copyAuthorization": {"modelId": "a92321bb-383d-4002-b76f-a800af2c5ec2", "accessToken": + 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1597780109}}\''''' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '447' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47/copy + response: + body: + string: '' + headers: + apim-request-id: + - cafa3335-f0e0-42f4-86e7-8ac8404d4916 + content-length: + - '0' + date: + - Mon, 17 Aug 2020 19:48:29 GMT + operation-location: + - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47/copyresults/ded8565f-097a-4170-86b9-f8ae54550d04 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '52' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47/copyresults/ded8565f-097a-4170-86b9-f8ae54550d04 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2020-08-17T19:48:30Z", + "lastUpdatedDateTime": "2020-08-17T19:48:30Z", "copyResult": {"modelId": "a92321bb-383d-4002-b76f-a800af2c5ec2"}}' + headers: + apim-request-id: + - 89972464-9fd6-4ed3-aa8f-5900c2cecbfe + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:34 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '14' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47/copyresults/ded8565f-097a-4170-86b9-f8ae54550d04 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2020-08-17T19:48:30Z", + "lastUpdatedDateTime": "2020-08-17T19:48:30Z", "copyResult": {"modelId": "a92321bb-383d-4002-b76f-a800af2c5ec2"}}' + headers: + apim-request-id: + - 2b08d5e7-ba61-464d-8709-483a2bbec30c + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:40 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47/copyresults/ded8565f-097a-4170-86b9-f8ae54550d04 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2020-08-17T19:48:30Z", + "lastUpdatedDateTime": "2020-08-17T19:48:30Z", "copyResult": {"modelId": "a92321bb-383d-4002-b76f-a800af2c5ec2"}}' + headers: + apim-request-id: + - c7a15146-730f-4b9d-91dd-22c0f2a5f268 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:45 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '16' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47/copyresults/ded8565f-097a-4170-86b9-f8ae54550d04 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2020-08-17T19:48:30Z", + "lastUpdatedDateTime": "2020-08-17T19:48:30Z", "copyResult": {"modelId": "a92321bb-383d-4002-b76f-a800af2c5ec2"}}' + headers: + apim-request-id: + - e38bb29f-fa6c-4ddd-a8be-6ed05be2023f + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:50 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '14' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47/copyresults/ded8565f-097a-4170-86b9-f8ae54550d04 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2020-08-17T19:48:30Z", + "lastUpdatedDateTime": "2020-08-17T19:48:30Z", "copyResult": {"modelId": "a92321bb-383d-4002-b76f-a800af2c5ec2"}}' + headers: + apim-request-id: + - 704b8cb5-23b5-46e2-a441-6530104d6351 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:48:55 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/8a197bb1-29ce-4e4f-8d8f-320fe3d30b47/copyresults/ded8565f-097a-4170-86b9-f8ae54550d04 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2020-08-17T19:49:00.4824394Z", + "lastUpdatedDateTime": "2020-08-17T19:49:00.4824397Z", "copyResult": {"modelId": + "a92321bb-383d-4002-b76f-a800af2c5ec2"}}' + headers: + apim-request-id: + - a46c0091-c438-4d83-bb88-169614c4035c + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:49:01 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '13' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model.test_copy_model_fail_bad_model_id.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model.test_copy_model_fail_bad_model_id.yaml index 17ea3b6125806..a26fe93514e10 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model.test_copy_model_fail_bad_model_id.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model.test_copy_model_fail_bad_model_id.yaml @@ -14,28 +14,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models response: body: string: '' headers: apim-request-id: - - f21540e1-b85e-4278-bb42-5de47553a8b1 + - 6978a0e9-5dbf-408a-bd2a-b1b40f2c945f content-length: - '0' date: - - Mon, 15 Jun 2020 19:26:39 GMT + - Mon, 17 Aug 2020 18:07:54 GMT location: - - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/6b520a60-a98f-45b1-b67d-0f954dc951ef + - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/e3b19ae0-3407-462d-a9ae-9b59cbfa59d5 strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '355' + - '37' status: code: 201 message: Created @@ -49,22 +48,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/6b520a60-a98f-45b1-b67d-0f954dc951ef?includeKeys=true + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/e3b19ae0-3407-462d-a9ae-9b59cbfa59d5?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "6b520a60-a98f-45b1-b67d-0f954dc951ef", "status": - "creating", "createdDateTime": "2020-06-15T19:26:39Z", "lastUpdatedDateTime": - "2020-06-15T19:26:39Z"}}' + string: '{"modelInfo": {"modelId": "e3b19ae0-3407-462d-a9ae-9b59cbfa59d5", "status": + "creating", "createdDateTime": "2020-08-17T18:07:54Z", "lastUpdatedDateTime": + "2020-08-17T18:07:54Z"}}' headers: apim-request-id: - - 63c03928-e2a3-4a34-8807-b7d151834dbf + - a58527ec-3f51-4764-b6f0-487b69d92ff9 content-type: - application/json; charset=utf-8 date: - - Mon, 15 Jun 2020 19:26:49 GMT + - Mon, 17 Aug 2020 18:07:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -72,7 +70,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5202' + - '12' status: code: 200 message: OK @@ -86,32 +84,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/6b520a60-a98f-45b1-b67d-0f954dc951ef?includeKeys=true + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/e3b19ae0-3407-462d-a9ae-9b59cbfa59d5?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "6b520a60-a98f-45b1-b67d-0f954dc951ef", "status": - "ready", "createdDateTime": "2020-06-15T19:26:39Z", "lastUpdatedDateTime": - "2020-06-15T19:26:50Z"}, "keys": {"clusters": {"0": ["Additional Notes:", - "Address:", "Company Name:", "Company Phone:", "Dated As:", "Details", "Email:", - "Hero Limited", "Name:", "Phone:", "Purchase Order", "Purchase Order #:", - "Quantity", "SUBTOTAL", "Seattle, WA 93849 Phone:", "Shipped From", "Shipped - To", "TAX", "TOTAL", "Total", "Unit Price", "Vendor Name:", "Website:"]}}, - "trainResult": {"trainingDocuments": [{"documentName": "Form_1.jpg", "pages": - 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_2.jpg", "pages": - 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_3.jpg", "pages": - 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_4.jpg", "pages": - 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_5.jpg", "pages": - 1, "errors": [], "status": "succeeded"}], "errors": []}}' + string: '{"modelInfo": {"modelId": "e3b19ae0-3407-462d-a9ae-9b59cbfa59d5", "status": + "creating", "createdDateTime": "2020-08-17T18:07:54Z", "lastUpdatedDateTime": + "2020-08-17T18:07:54Z"}}' headers: apim-request-id: - - a6825139-aaca-42fd-aa6e-71c9ce2b7cc3 + - 5c44850e-a4c0-4747-9f7b-e58b8d1828a7 content-type: - application/json; charset=utf-8 date: - - Mon, 15 Jun 2020 19:26:55 GMT + - Mon, 17 Aug 2020 18:08:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -119,54 +106,12 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '207' + - '13' status: code: 200 message: OK - request: body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/copyAuthorization - response: - body: - string: '{"modelId": "21c912d3-898a-41bc-8dd4-adf96f6c5e89", "accessToken": - "redacted", "expirationDateTimeTicks": 1592335615}' - headers: - apim-request-id: - - 429dcd52-6812-4a60-85f7-e0ab17b0c832 - content-type: - - application/json; charset=utf-8 - date: - - Mon, 15 Jun 2020 19:26:55 GMT - location: - - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/21c912d3-898a-41bc-8dd4-adf96f6c5e89 - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '191' - status: - code: 201 - message: Created -- request: - body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "centraluseuap", - "copyAuthorization": {"modelId": "21c912d3-898a-41bc-8dd4-adf96f6c5e89", "accessToken": - 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1592335615}}\''''' headers: Accept: - '*/*' @@ -174,26 +119,32 @@ interactions: - gzip, deflate Connection: - keep-alive - Content-Length: - - '447' - Content-Type: - - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/e3b19ae0-3407-462d-a9ae-9b59cbfa59d5?includeKeys=true response: body: - string: '{"error": {"code": "1999", "message": "An error occurred during model - copy. Retry the operation or contact service administrator if the issue persists."}}' + string: '{"modelInfo": {"modelId": "e3b19ae0-3407-462d-a9ae-9b59cbfa59d5", "status": + "ready", "createdDateTime": "2020-08-17T18:07:54Z", "lastUpdatedDateTime": + "2020-08-17T18:08:06Z"}, "keys": {"clusters": {"0": ["Additional Notes:", + "Address:", "Company Name:", "Company Phone:", "Dated As:", "Details", "Email:", + "Hero Limited", "Name:", "Phone:", "Purchase Order", "Purchase Order #:", + "Quantity", "SUBTOTAL", "Seattle, WA 93849 Phone:", "Shipped From", "Shipped + To", "TAX", "TOTAL", "Total", "Unit Price", "Vendor Name:", "Website:"]}}, + "trainResult": {"trainingDocuments": [{"documentName": "Form_1.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_2.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_3.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_4.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_5.jpg", "pages": + 1, "errors": [], "status": "succeeded"}], "errors": []}}' headers: apim-request-id: - - a150c173-e10a-402a-9c35-1abb75a46d56 + - ee3f212e-a142-47c5-9d7c-78c7c396390d content-type: - application/json; charset=utf-8 date: - - Mon, 15 Jun 2020 19:26:55 GMT + - Mon, 17 Aug 2020 18:08:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -201,83 +152,38 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '37' + - '16' status: - code: 500 - message: Internal Server Error + code: 200 + message: OK - request: - body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "centraluseuap", - "copyAuthorization": {"modelId": "21c912d3-898a-41bc-8dd4-adf96f6c5e89", "accessToken": - 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1592335615}}\''''' + body: null headers: Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '447' - Content-Type: - application/json - User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy - response: - body: - string: '{"error": {"code": "1999", "message": "An error occurred during model - copy. Retry the operation or contact service administrator if the issue persists."}}' - headers: - apim-request-id: - - 8a77f21c-fbd1-4798-a991-b22c8bfc3b5f - content-type: - - application/json; charset=utf-8 - date: - - Mon, 15 Jun 2020 19:26:56 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '47' - status: - code: 500 - message: Internal Server Error -- request: - body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "centraluseuap", - "copyAuthorization": {"modelId": "21c912d3-898a-41bc-8dd4-adf96f6c5e89", "accessToken": - 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1592335615}}\''''' - headers: - Accept: - - '*/*' Accept-Encoding: - gzip, deflate Connection: - keep-alive Content-Length: - - '447' - Content-Type: - - application/json + - '0' User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/copyAuthorization response: body: - string: '{"error": {"code": "1999", "message": "An error occurred during model - copy. Retry the operation or contact service administrator if the issue persists."}}' + string: '{"modelId": "1492ba3b-187c-4b9b-8e02-df2e0da5bcb9", "accessToken": + "redacted", "expirationDateTimeTicks": 1597774092}' headers: apim-request-id: - - 8af7df01-9ce5-45d3-9846-d29ccfe17c77 + - 09db1b3e-7aa8-4882-bc77-9cefc704acdf content-type: - application/json; charset=utf-8 date: - - Mon, 15 Jun 2020 19:26:57 GMT + - Mon, 17 Aug 2020 18:08:12 GMT + location: + - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/1492ba3b-187c-4b9b-8e02-df2e0da5bcb9 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -285,14 +191,14 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '26' + - '22' status: - code: 500 - message: Internal Server Error + code: 201 + message: Created - request: body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "centraluseuap", - "copyAuthorization": {"modelId": "21c912d3-898a-41bc-8dd4-adf96f6c5e89", "accessToken": - 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1592335615}}\''''' + "copyAuthorization": {"modelId": "1492ba3b-187c-4b9b-8e02-df2e0da5bcb9", "accessToken": + 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1597774092}}\''''' headers: Accept: - '*/*' @@ -305,21 +211,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/00000000-0000-0000-0000-000000000000/copy response: body: - string: '{"error": {"code": "1999", "message": "An error occurred during model - copy. Retry the operation or contact service administrator if the issue persists."}}' + string: '{"error": {"code": "1022", "message": "Model with ''id=00000000-0000-0000-0000-000000000000'' + not found."}}' headers: apim-request-id: - - b1dd14ec-68df-43fd-a680-7d08cca4e9eb + - e0ae0076-070f-4213-b1ea-54c51068a121 content-type: - application/json; charset=utf-8 date: - - Mon, 15 Jun 2020 19:27:00 GMT + - Mon, 17 Aug 2020 18:08:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -327,8 +232,8 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '73' + - '18' status: - code: 500 - message: Internal Server Error + code: 404 + message: Not Found version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model_async.test_copy_model_case_insensitive_region.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model_async.test_copy_model_case_insensitive_region.yaml new file mode 100644 index 0000000000000..6bf228d0d53a1 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model_async.test_copy_model_case_insensitive_region.yaml @@ -0,0 +1,212 @@ +interactions: +- request: + body: 'b''b\''{"source": "containersasurl", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": false}\''''' + headers: + Content-Length: + - '288' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models + response: + body: + string: '' + headers: + apim-request-id: a5b902a1-c5d5-4189-b8d0-3b234fe95d1f + content-length: '0' + date: Mon, 17 Aug 2020 20:16:12 GMT + location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '36' + status: + code: 201 + message: Created + url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0/custom/models +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "bc915e6c-4412-4437-9582-59fb0237a9bb", "status": + "creating", "createdDateTime": "2020-08-17T20:16:12Z", "lastUpdatedDateTime": + "2020-08-17T20:16:12Z"}}' + headers: + apim-request-id: a8338d7f-7833-42e1-ab06-6f42b9f7f670 + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 20:16:17 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '69' + status: + code: 200 + message: OK + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "bc915e6c-4412-4437-9582-59fb0237a9bb", "status": + "creating", "createdDateTime": "2020-08-17T20:16:12Z", "lastUpdatedDateTime": + "2020-08-17T20:16:12Z"}}' + headers: + apim-request-id: 0b26abf0-3c17-47a8-baac-c79f347abc1c + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 20:16:23 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '81' + status: + code: 200 + message: OK + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "bc915e6c-4412-4437-9582-59fb0237a9bb", "status": + "ready", "createdDateTime": "2020-08-17T20:16:12Z", "lastUpdatedDateTime": + "2020-08-17T20:16:23Z"}, "keys": {"clusters": {"0": ["Additional Notes:", + "Address:", "Company Name:", "Company Phone:", "Dated As:", "Details", "Email:", + "Hero Limited", "Name:", "Phone:", "Purchase Order", "Purchase Order #:", + "Quantity", "SUBTOTAL", "Seattle, WA 93849 Phone:", "Shipped From", "Shipped + To", "TAX", "TOTAL", "Total", "Unit Price", "Vendor Name:", "Website:"]}}, + "trainResult": {"trainingDocuments": [{"documentName": "Form_1.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_2.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_3.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_4.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_5.jpg", "pages": + 1, "errors": [], "status": "succeeded"}], "errors": []}}' + headers: + apim-request-id: 025c724d-d154-4b40-85d2-adde237b6c5b + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 20:16:27 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '34' + status: + code: 200 + message: OK + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb?includeKeys=true +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/copyAuthorization + response: + body: + string: '{"modelId": "f6c7dc66-691f-40e7-8a53-25eb778e2005", "accessToken": + "redacted", "expirationDateTimeTicks": 1597781788}' + headers: + apim-request-id: d7e5c8f6-1f3a-4445-a7c4-ca2e0c75053c + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 20:16:27 GMT + location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/f6c7dc66-691f-40e7-8a53-25eb778e2005 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '39' + status: + code: 201 + message: Created + url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0/custom/models/copyAuthorization +- request: + body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "CENTRALUSEUAP", + "copyAuthorization": {"modelId": "f6c7dc66-691f-40e7-8a53-25eb778e2005", "accessToken": + 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1597781788}}\''''' + headers: + Content-Length: + - '447' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb/copy + response: + body: + string: '' + headers: + apim-request-id: c2699924-d130-4485-86c1-837be6cdcaa9 + content-length: '0' + date: Mon, 17 Aug 2020 20:16:27 GMT + operation-location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb/copyresults/fd944221-cf69-4253-8f42-5abbe7fe5ba5 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '58' + status: + code: 202 + message: Accepted + url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb/copy +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb/copyresults/fd944221-cf69-4253-8f42-5abbe7fe5ba5 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2020-08-17T20:16:28Z", + "lastUpdatedDateTime": "2020-08-17T20:16:28Z", "copyResult": {"modelId": "f6c7dc66-691f-40e7-8a53-25eb778e2005"}}' + headers: + apim-request-id: a7bbe2f3-d0be-46f8-a149-54c5e6565f28 + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 20:16:33 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '27' + status: + code: 200 + message: OK + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb/copyresults/fd944221-cf69-4253-8f42-5abbe7fe5ba5 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb/copyresults/fd944221-cf69-4253-8f42-5abbe7fe5ba5 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2020-08-17T20:16:37.4186032Z", + "lastUpdatedDateTime": "2020-08-17T20:16:37.4186034Z", "copyResult": {"modelId": + "f6c7dc66-691f-40e7-8a53-25eb778e2005"}}' + headers: + apim-request-id: 4cdb4042-37c7-456c-aa0d-6014fd77c107 + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 20:16:38 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '29' + status: + code: 200 + message: OK + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/bc915e6c-4412-4437-9582-59fb0237a9bb/copyresults/fd944221-cf69-4253-8f42-5abbe7fe5ba5 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model_async.test_copy_model_fail_bad_model_id.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model_async.test_copy_model_fail_bad_model_id.yaml index 36e6271f026ab..713a903863b47 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model_async.test_copy_model_fail_bad_model_id.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_copy_model_async.test_copy_model_fail_bad_model_id.yaml @@ -8,63 +8,60 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models response: body: string: '' headers: - apim-request-id: 70d9593f-6e1b-402e-bd28-88364a662e78 + apim-request-id: 2b5498b8-579a-4692-b71d-c06c613101e8 content-length: '0' - date: Mon, 15 Jun 2020 19:33:57 GMT - location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/656b1437-a715-4e3b-a9f1-1b0f3e6998c9 + date: Mon, 17 Aug 2020 18:10:21 GMT + location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/2eeb69ca-0fe8-4323-9f29-a41043c798b5 strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '577' + x-envoy-upstream-service-time: '37' status: code: 201 message: Created - url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0-preview/custom/models + url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0/custom/models - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/656b1437-a715-4e3b-a9f1-1b0f3e6998c9?includeKeys=true + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/2eeb69ca-0fe8-4323-9f29-a41043c798b5?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "656b1437-a715-4e3b-a9f1-1b0f3e6998c9", "status": - "creating", "createdDateTime": "2020-06-15T19:33:58Z", "lastUpdatedDateTime": - "2020-06-15T19:33:58Z"}}' + string: '{"modelInfo": {"modelId": "2eeb69ca-0fe8-4323-9f29-a41043c798b5", "status": + "creating", "createdDateTime": "2020-08-17T18:10:21Z", "lastUpdatedDateTime": + "2020-08-17T18:10:21Z"}}' headers: - apim-request-id: 2a5e274d-9336-4019-9dd4-e3831027ef75 + apim-request-id: 4514ecba-7f80-4bed-82e0-52b1bba0522c content-type: application/json; charset=utf-8 - date: Mon, 15 Jun 2020 19:34:03 GMT + date: Mon, 17 Aug 2020 18:10:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '203' + x-envoy-upstream-service-time: '17' status: code: 200 message: OK - url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/656b1437-a715-4e3b-a9f1-1b0f3e6998c9?includeKeys=true + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/2eeb69ca-0fe8-4323-9f29-a41043c798b5?includeKeys=true - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/656b1437-a715-4e3b-a9f1-1b0f3e6998c9?includeKeys=true + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/2eeb69ca-0fe8-4323-9f29-a41043c798b5?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "656b1437-a715-4e3b-a9f1-1b0f3e6998c9", "status": - "ready", "createdDateTime": "2020-06-15T19:33:58Z", "lastUpdatedDateTime": - "2020-06-15T19:34:08Z"}, "keys": {"clusters": {"0": ["Additional Notes:", + string: '{"modelInfo": {"modelId": "2eeb69ca-0fe8-4323-9f29-a41043c798b5", "status": + "ready", "createdDateTime": "2020-08-17T18:10:21Z", "lastUpdatedDateTime": + "2020-08-17T18:10:30Z"}, "keys": {"clusters": {"0": ["Additional Notes:", "Address:", "Company Name:", "Company Phone:", "Dated As:", "Details", "Email:", "Hero Limited", "Name:", "Phone:", "Purchase Order", "Purchase Order #:", "Quantity", "SUBTOTAL", "Seattle, WA 93849 Phone:", "Shipped From", "Shipped @@ -76,162 +73,70 @@ interactions: 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_5.jpg", "pages": 1, "errors": [], "status": "succeeded"}], "errors": []}}' headers: - apim-request-id: 83db96a0-56c7-41f2-b015-35f496dcb128 + apim-request-id: 387707cd-19f0-4155-95de-68f6766338ea content-type: application/json; charset=utf-8 - date: Mon, 15 Jun 2020 19:34:08 GMT + date: Mon, 17 Aug 2020 18:10:31 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '154' + x-envoy-upstream-service-time: '13' status: code: 200 message: OK - url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/656b1437-a715-4e3b-a9f1-1b0f3e6998c9?includeKeys=true + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/2eeb69ca-0fe8-4323-9f29-a41043c798b5?includeKeys=true - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/copyAuthorization + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/copyAuthorization response: body: - string: '{"modelId": "eb496d1a-6e6e-418e-b013-26445fdd50fd", "accessToken": - "redacted", "expirationDateTimeTicks": 1592336050}' + string: '{"modelId": "939ad63b-85cc-41a0-8da5-0cc4a0c63cee", "accessToken": + "redacted", "expirationDateTimeTicks": 1597774231}' headers: - apim-request-id: b8a2880b-5002-40b1-b5f4-01df565bb593 + apim-request-id: a6df3e4f-b9e6-4fed-a00f-9e399d2efba7 content-type: application/json; charset=utf-8 - date: Mon, 15 Jun 2020 19:34:10 GMT - location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/eb496d1a-6e6e-418e-b013-26445fdd50fd + date: Mon, 17 Aug 2020 18:10:31 GMT + location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/939ad63b-85cc-41a0-8da5-0cc4a0c63cee strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '1771' + x-envoy-upstream-service-time: '22' status: code: 201 message: Created - url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0-preview/custom/models/copyAuthorization + url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0/custom/models/copyAuthorization - request: body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "centraluseuap", - "copyAuthorization": {"modelId": "eb496d1a-6e6e-418e-b013-26445fdd50fd", "accessToken": - 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1592336050}}\''''' + "copyAuthorization": {"modelId": "939ad63b-85cc-41a0-8da5-0cc4a0c63cee", "accessToken": + 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1597774231}}\''''' headers: Content-Length: - '447' Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/00000000-0000-0000-0000-000000000000/copy response: body: - string: '{"error": {"code": "1999", "message": "An error occurred during model - copy. Retry the operation or contact service administrator if the issue persists."}}' + string: '{"error": {"code": "1022", "message": "Model with ''id=00000000-0000-0000-0000-000000000000'' + not found."}}' headers: - apim-request-id: 6e45bd33-370d-4634-9c8b-0d17fd44ee69 + apim-request-id: 0a899fc9-fa7b-4e49-8ca9-8ba2f7323857 content-type: application/json; charset=utf-8 - date: Mon, 15 Jun 2020 19:34:10 GMT + date: Mon, 17 Aug 2020 18:10:31 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '23' + x-envoy-upstream-service-time: '19' status: - code: 500 - message: Internal Server Error - url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy -- request: - body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "centraluseuap", - "copyAuthorization": {"modelId": "eb496d1a-6e6e-418e-b013-26445fdd50fd", "accessToken": - 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1592336050}}\''''' - headers: - Content-Length: - - '447' - Content-Type: - - application/json - User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy - response: - body: - string: '{"error": {"code": "1999", "message": "An error occurred during model - copy. Retry the operation or contact service administrator if the issue persists."}}' - headers: - apim-request-id: 185ae74c-84c7-43fc-a8f1-ccf17f93b385 - content-type: application/json; charset=utf-8 - date: Mon, 15 Jun 2020 19:34:11 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '24' - status: - code: 500 - message: Internal Server Error - url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy -- request: - body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "centraluseuap", - "copyAuthorization": {"modelId": "eb496d1a-6e6e-418e-b013-26445fdd50fd", "accessToken": - 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1592336050}}\''''' - headers: - Content-Length: - - '447' - Content-Type: - - application/json - User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy - response: - body: - string: '{"error": {"code": "1999", "message": "An error occurred during model - copy. Retry the operation or contact service administrator if the issue persists."}}' - headers: - apim-request-id: 95e0f833-d7b8-4ebb-b744-44a2290508e0 - content-type: application/json; charset=utf-8 - date: Mon, 15 Jun 2020 19:34:12 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '33' - status: - code: 500 - message: Internal Server Error - url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy -- request: - body: 'b''b\''{"targetResourceId": "resource_id", "targetResourceRegion": "centraluseuap", - "copyAuthorization": {"modelId": "eb496d1a-6e6e-418e-b013-26445fdd50fd", "accessToken": - 00000000-0000-0000-0000-000000000000, "expirationDateTimeTicks": 1592336050}}\''''' - headers: - Content-Length: - - '447' - Content-Type: - - application/json - User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) - Python/3.7.3 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy - response: - body: - string: '{"error": {"code": "1999", "message": "An error occurred during model - copy. Retry the operation or contact service administrator if the issue persists."}}' - headers: - apim-request-id: fbe856d6-98d6-441b-a68d-d2558abc8a3b - content-type: application/json; charset=utf-8 - date: Mon, 15 Jun 2020 19:34:15 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '23' - status: - code: 500 - message: Internal Server Error - url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0-preview/custom/models/00000000-0000-0000-0000-000000000000/copy + code: 404 + message: Not Found + url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0/custom/models/00000000-0000-0000-0000-000000000000/copy version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_custom_form_bad_url.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_custom_form_bad_url.yaml index 76d44483b405b..65efbf4e68e6a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_custom_form_bad_url.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_custom_form_bad_url.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models response: @@ -22,19 +22,19 @@ interactions: string: '' headers: apim-request-id: - - c5464c55-e945-438b-a291-52051c8da3eb + - 4b3c635b-9ae4-40a3-acdf-61a2c106900a content-length: - '0' date: - - Fri, 10 Jul 2020 18:52:13 GMT + - Mon, 17 Aug 2020 18:28:22 GMT location: - - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/9a5641ef-0ae5-419a-9163-0d4f67ec038c + - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/aa8518c2-be2e-4e12-9946-c6941e004a4a strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '65' + - '40' status: code: 201 message: Created @@ -48,14 +48,50 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/9a5641ef-0ae5-419a-9163-0d4f67ec038c?includeKeys=true + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/aa8518c2-be2e-4e12-9946-c6941e004a4a?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "9a5641ef-0ae5-419a-9163-0d4f67ec038c", "status": - "ready", "createdDateTime": "2020-07-10T18:52:13Z", "lastUpdatedDateTime": - "2020-07-10T18:52:16Z"}, "trainResult": {"averageModelAccuracy": 0.973, "trainingDocuments": + string: '{"modelInfo": {"modelId": "aa8518c2-be2e-4e12-9946-c6941e004a4a", "status": + "creating", "createdDateTime": "2020-08-17T18:28:23Z", "lastUpdatedDateTime": + "2020-08-17T18:28:23Z"}}' + headers: + apim-request-id: + - f8cfb2ae-412c-4a16-8910-81e563177378 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 18:28:28 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '37' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/aa8518c2-be2e-4e12-9946-c6941e004a4a?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "aa8518c2-be2e-4e12-9946-c6941e004a4a", "status": + "ready", "createdDateTime": "2020-08-17T18:28:23Z", "lastUpdatedDateTime": + "2020-08-17T18:28:30Z"}, "trainResult": {"averageModelAccuracy": 0.96, "trainingDocuments": [{"documentName": "Form_1.jpg", "pages": 1, "status": "succeeded"}, {"documentName": "Form_2.jpg", "pages": 1, "status": "succeeded"}, {"documentName": "Form_3.jpg", "pages": 1, "status": "succeeded"}, {"documentName": "Form_4.jpg", "pages": @@ -66,17 +102,17 @@ interactions: "Email", "accuracy": 0.8}, {"fieldName": "Merchant", "accuracy": 1.0}, {"fieldName": "PhoneNumber", "accuracy": 1.0}, {"fieldName": "PurchaseOrderNumber", "accuracy": 1.0}, {"fieldName": "Quantity", "accuracy": 1.0}, {"fieldName": "Signature", - "accuracy": 1.0}, {"fieldName": "Subtotal", "accuracy": 1.0}, {"fieldName": + "accuracy": 0.8}, {"fieldName": "Subtotal", "accuracy": 1.0}, {"fieldName": "Tax", "accuracy": 1.0}, {"fieldName": "Total", "accuracy": 1.0}, {"fieldName": "VendorName", "accuracy": 1.0}, {"fieldName": "Website", "accuracy": 1.0}], "errors": []}}' headers: apim-request-id: - - beae45d8-d6c5-4952-8409-77f93aea7971 + - 4721d793-e690-45f0-a0d1-27f732df549f content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jul 2020 18:52:26 GMT + - Mon, 17 Aug 2020 18:28:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -84,7 +120,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7487' + - '18' status: code: 200 message: OK @@ -102,27 +138,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/9a5641ef-0ae5-419a-9163-0d4f67ec038c/analyze?includeTextDetails=false + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/aa8518c2-be2e-4e12-9946-c6941e004a4a/analyze?includeTextDetails=false response: body: string: '' headers: apim-request-id: - - 9b1a842c-f87c-4355-9c60-751e04c883d8 + - e0e9b71f-08cb-45d3-a974-2a3ce37e9ec7 content-length: - '0' date: - - Fri, 10 Jul 2020 18:52:26 GMT + - Mon, 17 Aug 2020 18:28:33 GMT operation-location: - - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/9a5641ef-0ae5-419a-9163-0d4f67ec038c/analyzeresults/847434eb-569c-41a1-b13c-fa9e0803c3d3 + - https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/aa8518c2-be2e-4e12-9946-c6941e004a4a/analyzeresults/29433ee4-252b-4b64-a959-8acd7b3f8f0c strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '86' + - '50' status: code: 202 message: Accepted @@ -136,31 +172,31 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/9a5641ef-0ae5-419a-9163-0d4f67ec038c/analyzeresults/847434eb-569c-41a1-b13c-fa9e0803c3d3 + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/aa8518c2-be2e-4e12-9946-c6941e004a4a/analyzeresults/29433ee4-252b-4b64-a959-8acd7b3f8f0c response: body: - string: '{"status": "failed", "createdDateTime": "2020-07-10T18:52:26Z", "lastUpdatedDateTime": - "2020-07-10T18:52:27Z", "analyzeResult": {"version": "2.0.0", "errors": [{"code": - "3014", "message": "Generic error during prediction."}]}}' + string: '{"status": "failed", "createdDateTime": "2020-08-17T18:28:34Z", "lastUpdatedDateTime": + "2020-08-17T18:28:34Z", "analyzeResult": {"version": "2.0.0", "errors": [{"code": + "2003", "message": "Failed to download image from input URL."}]}}' headers: apim-request-id: - - 8537ee85-24f5-475f-b4a1-9876d4eb206e + - 49a6648e-69c2-45e5-a894-15832aba74d9 content-length: - - '213' + - '221' content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jul 2020 18:52:31 GMT + - Mon, 17 Aug 2020 18:28:43 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '20' + - '5040' x-ms-cs-error-code: - - '3014' + - '2003' status: code: 200 message: OK diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_form_bad_url.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_form_bad_url.yaml index e632cbe8b9482..0a33c17eed958 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_form_bad_url.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_form_bad_url.yaml @@ -1,27 +1,27 @@ interactions: - request: body: 'b''b\''{"source": "containersasurl", "sourceFilter": {"prefix": "", "includeSubFolders": - false}, "useLabelFile": true}\''''' + false}, "useLabelFile": false}\''''' headers: Content-Length: - - '287' + - '288' Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models response: body: string: '' headers: - apim-request-id: 6e3beb66-d389-484f-9ffe-d1d071bc13cf + apim-request-id: 63869737-3759-4435-92a9-22905e193651 content-length: '0' - date: Fri, 10 Jul 2020 18:50:41 GMT - location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808 + date: Mon, 17 Aug 2020 18:31:30 GMT + location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4 strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '75' + x-envoy-upstream-service-time: '72' status: code: 201 message: Created @@ -30,64 +30,60 @@ interactions: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808?includeKeys=true + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "4bd66569-63c5-44ed-80ae-2a9d93c4b808", "status": - "creating", "createdDateTime": "2020-07-10T18:50:41Z", "lastUpdatedDateTime": - "2020-07-10T18:50:41Z"}}' + string: '{"modelInfo": {"modelId": "31599d09-cd47-4aeb-b364-bfd3c542bfc4", "status": + "creating", "createdDateTime": "2020-08-17T18:31:30Z", "lastUpdatedDateTime": + "2020-08-17T18:31:30Z"}}' headers: - apim-request-id: 33e15865-5953-40ba-b2d5-b8598b5040a0 + apim-request-id: 4f80e5fb-8e68-463b-983d-7e2ba5faa050 content-type: application/json; charset=utf-8 - date: Fri, 10 Jul 2020 18:50:47 GMT + date: Mon, 17 Aug 2020 18:31:35 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '15' status: code: 200 message: OK - url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808?includeKeys=true + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4?includeKeys=true - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808?includeKeys=true + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "4bd66569-63c5-44ed-80ae-2a9d93c4b808", "status": - "ready", "createdDateTime": "2020-07-10T18:50:41Z", "lastUpdatedDateTime": - "2020-07-10T18:50:49Z"}, "trainResult": {"averageModelAccuracy": 0.973, "trainingDocuments": - [{"documentName": "Form_1.jpg", "pages": 1, "status": "succeeded"}, {"documentName": - "Form_2.jpg", "pages": 1, "status": "succeeded"}, {"documentName": "Form_3.jpg", - "pages": 1, "status": "succeeded"}, {"documentName": "Form_4.jpg", "pages": - 1, "status": "succeeded"}, {"documentName": "Form_5.jpg", "pages": 1, "status": - "succeeded"}], "fields": [{"fieldName": "CompanyAddress", "accuracy": 0.8}, - {"fieldName": "CompanyName", "accuracy": 1.0}, {"fieldName": "CompanyPhoneNumber", - "accuracy": 1.0}, {"fieldName": "DatedAs", "accuracy": 1.0}, {"fieldName": - "Email", "accuracy": 0.8}, {"fieldName": "Merchant", "accuracy": 1.0}, {"fieldName": - "PhoneNumber", "accuracy": 1.0}, {"fieldName": "PurchaseOrderNumber", "accuracy": - 1.0}, {"fieldName": "Quantity", "accuracy": 1.0}, {"fieldName": "Signature", - "accuracy": 1.0}, {"fieldName": "Subtotal", "accuracy": 1.0}, {"fieldName": - "Tax", "accuracy": 1.0}, {"fieldName": "Total", "accuracy": 1.0}, {"fieldName": - "VendorName", "accuracy": 1.0}, {"fieldName": "Website", "accuracy": 1.0}], - "errors": []}}' + string: '{"modelInfo": {"modelId": "31599d09-cd47-4aeb-b364-bfd3c542bfc4", "status": + "ready", "createdDateTime": "2020-08-17T18:31:30Z", "lastUpdatedDateTime": + "2020-08-17T18:31:40Z"}, "keys": {"clusters": {"0": ["Additional Notes:", + "Address:", "Company Name:", "Company Phone:", "Dated As:", "Details", "Email:", + "Hero Limited", "Name:", "Phone:", "Purchase Order", "Purchase Order #:", + "Quantity", "SUBTOTAL", "Seattle, WA 93849 Phone:", "Shipped From", "Shipped + To", "TAX", "TOTAL", "Total", "Unit Price", "Vendor Name:", "Website:"]}}, + "trainResult": {"trainingDocuments": [{"documentName": "Form_1.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_2.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_3.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_4.jpg", "pages": + 1, "errors": [], "status": "succeeded"}, {"documentName": "Form_5.jpg", "pages": + 1, "errors": [], "status": "succeeded"}], "errors": []}}' headers: - apim-request-id: 54cd8f4d-49e3-43d2-bcf4-c804caf3da52 + apim-request-id: 39ea7941-9ab4-4450-864f-96687497926a content-type: application/json; charset=utf-8 - date: Fri, 10 Jul 2020 18:50:51 GMT + date: Mon, 17 Aug 2020 18:31:40 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '54' + x-envoy-upstream-service-time: '18' status: code: 200 message: OK - url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808?includeKeys=true + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4?includeKeys=true - request: body: 'b''{"source": "https://badurl.jpg"}''' headers: @@ -96,47 +92,48 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808/analyze?includeTextDetails=false + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4/analyze?includeTextDetails=false response: body: string: '' headers: - apim-request-id: a53fcefe-33b1-484c-a03c-bc297b3aa020 + apim-request-id: a4767ac5-e8e2-45dc-a6e1-7f1162a77ca8 content-length: '0' - date: Fri, 10 Jul 2020 18:50:53 GMT - operation-location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808/analyzeresults/940baac0-bbe9-42c3-8cfc-8ac8ae5cb02a + date: Mon, 17 Aug 2020 18:31:40 GMT + operation-location: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4/analyzeresults/3829f33f-0b3f-4945-8da9-dbba818cb367 strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '282' + x-envoy-upstream-service-time: '47' status: code: 202 message: Accepted - url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808/analyze?includeTextDetails=false + url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4/analyze?includeTextDetails=false - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/1.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-ai-formrecognizer/3.0.0b2 Python/3.7.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808/analyzeresults/940baac0-bbe9-42c3-8cfc-8ac8ae5cb02a + uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4/analyzeresults/3829f33f-0b3f-4945-8da9-dbba818cb367 response: body: - string: '{"status": "failed", "createdDateTime": "2020-07-10T18:50:53Z", "lastUpdatedDateTime": - "2020-07-10T18:50:53Z", "analyzeResult": {"version": "2.0.0", "errors": [{"code": - "3014", "message": "Generic error during prediction."}]}}' + string: '{"status": "failed", "createdDateTime": "2020-08-17T18:31:41Z", "lastUpdatedDateTime": + "2020-08-17T18:31:41Z", "analyzeResult": {"version": null, "readResults": + null, "pageResults": null, "documentResults": null, "errors": [{"code": "2003", + "message": "Download failed. Please check your input URL."}]}}' headers: - apim-request-id: c37dec93-4500-4f1a-9894-21cfd3523272 - content-length: '213' + apim-request-id: 99518af7-99b5-46f9-a831-94807e1b0b29 + content-length: '303' content-type: application/json; charset=utf-8 - date: Fri, 10 Jul 2020 18:50:57 GMT + date: Mon, 17 Aug 2020 18:31:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '45' - x-ms-cs-error-code: '3014' + x-envoy-upstream-service-time: '30' + x-ms-cs-error-code: '2003' status: code: 200 message: OK - url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/4bd66569-63c5-44ed-80ae-2a9d93c4b808/analyzeresults/940baac0-bbe9-42c3-8cfc-8ac8ae5cb02a + url: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0/custom/models/31599d09-cd47-4aeb-b364-bfd3c542bfc4/analyzeresults/3829f33f-0b3f-4945-8da9-dbba818cb367 version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py index 12614c9dc58af..0b8adaf38bb43 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py @@ -68,10 +68,28 @@ def test_copy_model_fail(self, client, container_sas_url, location, resource_id) self.assertIsNotNone(e.value.error.code) self.assertIsNotNone(e.value.error.message) + @GlobalFormRecognizerAccountPreparer() + @GlobalClientPreparer(training=True, copy=True) + def test_copy_model_case_insensitive_region(self, client, container_sas_url, location, resource_id): + + poller = client.begin_training(container_sas_url, use_training_labels=False) + model = poller.result() + + # give region all uppercase + target = client.get_copy_authorization(resource_region=location.upper(), resource_id=resource_id) + + poller = client.begin_copy_model(model.model_id, target=target) + copy = poller.result() + + self.assertEqual(copy.status, "ready") + self.assertIsNotNone(copy.training_started_on) + self.assertIsNotNone(copy.training_completed_on) + self.assertEqual(target["modelId"], copy.model_id) + self.assertNotEqual(target["modelId"], model.model_id) + @GlobalFormRecognizerAccountPreparer() @GlobalClientPreparer(training=True, copy=True) def test_copy_model_fail_bad_model_id(self, client, container_sas_url, location, resource_id): - pytest.skip("service team will tell us when to enable this test") poller = client.begin_training(container_sas_url, use_training_labels=False) model = poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model_async.py index b9f3ef1242a8a..0aa92f1f9dcdd 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model_async.py @@ -71,10 +71,29 @@ async def test_copy_model_fail(self, client, container_sas_url, location, resour self.assertIsNotNone(e.value.error.code) self.assertIsNotNone(e.value.error.message) + @GlobalFormRecognizerAccountPreparer() + @GlobalClientPreparer(training=True, copy=True) + async def test_copy_model_case_insensitive_region(self, client, container_sas_url, location, resource_id): + async with client: + poller = await client.begin_training(container_sas_url, use_training_labels=False) + model = await poller.result() + + # give region all uppercase + target = await client.get_copy_authorization(resource_region=location.upper(), resource_id=resource_id) + + poller = await client.begin_copy_model(model.model_id, target=target) + copy = await poller.result() + + self.assertEqual(copy.status, "ready") + self.assertIsNotNone(copy.training_started_on) + self.assertIsNotNone(copy.training_completed_on) + self.assertEqual(target["modelId"], copy.model_id) + self.assertNotEqual(target["modelId"], model.model_id) + @GlobalFormRecognizerAccountPreparer() @GlobalClientPreparer(training=True, copy=True) async def test_copy_model_fail_bad_model_id(self, client, container_sas_url, location, resource_id): - pytest.skip("service team will tell us when to enable this test") + async with client: poller = await client.begin_training(container_sas_url, use_training_labels=False) model = await poller.result() 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 971acdf34bad0..46f14149a5a3f 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 @@ -87,7 +87,7 @@ def test_custom_form_bad_url(self, client, container_sas_url): form_url="https://badurl.jpg" ) form = poller.result() - self.assertIsNotNone(e.value.error.code) + self.assertEqual(e.value.error.code, "2003") self.assertIsNotNone(e.value.error.message) @GlobalFormRecognizerAccountPreparer() 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 983e301f6f4fd..6aeaa3f783475 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 @@ -92,16 +92,18 @@ async def test_form_bad_url(self, client, container_sas_url): fr_client = client.get_form_recognizer_client() async with client: - training_poller = await client.begin_training(container_sas_url, use_training_labels=True) + training_poller = await client.begin_training(container_sas_url, use_training_labels=False) model = await training_poller.result() - with self.assertRaises(HttpResponseError): + with pytest.raises(HttpResponseError) as e: async with fr_client: poller = await fr_client.begin_recognize_custom_forms_from_url( model.model_id, form_url="https://badurl.jpg" ) result = await poller.result() + self.assertEqual(e.value.error.code, "2003") + self.assertIsNotNone(e.value.error.message) @GlobalFormRecognizerAccountPreparer() @GlobalClientPreparer(training=True) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py index 92446178008cf..c8da3a6c2a8d7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py @@ -28,7 +28,7 @@ def bounding_box(): @pytest.fixture def form_word(bounding_box): model = _models.FormWord(text="Word", bounding_box=bounding_box[0], confidence=0.5, page_number=1) - model_repr = "FormWord(text=Word, bounding_box={}, confidence=0.5, page_number=1)".format(bounding_box[1])[:1024] + model_repr = "FormWord(text=Word, bounding_box={}, confidence=0.5, page_number=1, kind=word)".format(bounding_box[1])[:1024] assert repr(model) == model_repr return model, model_repr @@ -36,7 +36,7 @@ def form_word(bounding_box): @pytest.fixture def form_line(bounding_box, form_word): model = _models.FormLine(text="Word Word", bounding_box=bounding_box[0], words=[form_word[0], form_word[0]], page_number=1) - model_repr = "FormLine(text=Word Word, bounding_box={}, words=[{}, {}], page_number=1)".format(bounding_box[1], form_word[1], form_word[1])[:1024] + model_repr = "FormLine(text=Word Word, bounding_box={}, words=[{}, {}], page_number=1, kind=line)".format(bounding_box[1], form_word[1], form_word[1])[:1024] assert repr(model) == model_repr return model, model_repr diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples.py index b5e0122cd43e2..417b28d88d940 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples.py @@ -57,6 +57,10 @@ class TestSamples(FormRecognizerTest): @pytest.mark.live_test_only @GlobalFormRecognizerAccountPreparer() def test_sample_authentication(self, resource_group, location, form_recognizer_account, form_recognizer_account_key): + os.environ['AZURE_FORM_RECOGNIZER_AAD_ENDPOINT'] = self.get_settings_value("FORM_RECOGNIZER_AAD_ENDPOINT") + os.environ['AZURE_CLIENT_ID'] = self.get_settings_value("CLIENT_ID") + os.environ['AZURE_CLIENT_SECRET'] = self.get_settings_value("CLIENT_SECRET") + os.environ['AZURE_TENANT_ID'] = self.get_settings_value("TENANT_ID") _test_file('sample_authentication.py', form_recognizer_account, form_recognizer_account_key) @pytest.mark.live_test_only diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples_async.py index d23a8eed33b55..0a9f6f229c7bb 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples_async.py @@ -54,6 +54,10 @@ class TestSamplesAsync(FormRecognizerTest): @pytest.mark.live_test_only @GlobalFormRecognizerAccountPreparer() def test_sample_authentication_async(self, resource_group, location, form_recognizer_account, form_recognizer_account_key): + os.environ['AZURE_FORM_RECOGNIZER_AAD_ENDPOINT'] = self.get_settings_value("FORM_RECOGNIZER_AAD_ENDPOINT") + os.environ['AZURE_CLIENT_ID'] = self.get_settings_value("CLIENT_ID") + os.environ['AZURE_CLIENT_SECRET'] = self.get_settings_value("CLIENT_SECRET") + os.environ['AZURE_TENANT_ID'] = self.get_settings_value("TENANT_ID") _test_file('sample_authentication_async.py', form_recognizer_account, form_recognizer_account_key) @pytest.mark.live_test_only diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py index 56a1074904b1d..11bb8dff5cc65 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py @@ -176,9 +176,11 @@ def assertFormPagesTransformCorrect(self, pages, actual_read, page_result=None, if not page.lines and not actual_page.lines: continue for p, a in zip(page.lines, actual_page.lines): + self.assertEqual(p.kind, "line") self.assertEqual(p.text, a.text) self.assertBoundingBoxTransformCorrect(p.bounding_box, a.bounding_box) for wp, wa, in zip(p.words, a.words): + self.assertEqual(wp.kind, "word") self.assertEqual(wp.text, wa.text) self.assertEqual(wp.confidence, wa.confidence if wa.confidence is not None else 1.0) self.assertBoundingBoxTransformCorrect(wp.bounding_box, wa.bounding_box) @@ -204,13 +206,14 @@ def assertBoundingBoxTransformCorrect(self, box, actual): def assertFieldElementsTransFormCorrect(self, field_elements, actual_elements, read_result): if field_elements is None and actual_elements is None: return - for receipt, actual in zip(field_elements, actual_elements): + for element, actual in zip(field_elements, actual_elements): nums = [int(s) for s in re.findall(r'\d+', actual)] read, line, word = nums[0:3] - text_element = read_result[read].lines[line].words[word] - self.assertEqual(receipt.text, text_element.text) - self.assertEqual(receipt.confidence, text_element.confidence if text_element.confidence is not None else 1.0) - self.assertBoundingBoxTransformCorrect(receipt.bounding_box, text_element.bounding_box) + actual_element = read_result[read].lines[line].words[word] + self.assertEqual(element.text, actual_element.text) + self.assertEqual(element.confidence, actual_element.confidence if actual_element.confidence is not None else 1.0) + self.assertEqual(element.kind, "word") + self.assertBoundingBoxTransformCorrect(element.bounding_box, actual_element.bounding_box) def assertLabeledFormFieldDictTransformCorrect(self, form_fields, actual_fields, read_results=None): if actual_fields is None: @@ -368,7 +371,9 @@ def assertFormPagesHasValues(self, pages): self.assertIsNotNone(line.text) self.assertIsNotNone(line.page_number) self.assertBoundingBoxHasPoints(line.bounding_box) + self.assertEqual(line.kind, "line") for word in line.words: + self.assertEqual(word.kind, "word") self.assertFormWordHasValues(word, page.page_number) if page.tables: @@ -386,6 +391,7 @@ def assertFormPagesHasValues(self, pages): self.assertFieldElementsHasValues(cell.field_elements, page.page_number) def assertFormWordHasValues(self, word, page_number): + self.assertEqual(word.kind, "word") self.assertIsNotNone(word.confidence) self.assertIsNotNone(word.text) self.assertBoundingBoxHasPoints(word.bounding_box) diff --git a/sdk/formrecognizer/ci.yml b/sdk/formrecognizer/ci.yml index 753e32769a718..21adc294cd895 100644 --- a/sdk/formrecognizer/ci.yml +++ b/sdk/formrecognizer/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -31,4 +30,4 @@ extends: ServiceDirectory: formrecognizer Artifacts: - name: azure_ai_formrecognizer - safeName: azureaiformrecognizer \ No newline at end of file + safeName: azureaiformrecognizer diff --git a/sdk/graphrbac/ci.yml b/sdk/graphrbac/ci.yml index c893a7672c363..e6285e40f1655 100644 --- a/sdk/graphrbac/ci.yml +++ b/sdk/graphrbac/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: graphrbac Artifacts: - name: azure_graphrbac - safeName: azuregraphrbac \ No newline at end of file + safeName: azuregraphrbac diff --git a/sdk/hanaonazure/ci.yml b/sdk/hanaonazure/ci.yml index e1f3137a0b83b..e203f4f6b1dd1 100644 --- a/sdk/hanaonazure/ci.yml +++ b/sdk/hanaonazure/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/test/test_mgmt_hdinsight.py b/sdk/hdinsight/azure-mgmt-hdinsight/test/test_mgmt_hdinsight.py index 0a9e312e43ec5..47a77e84ead7a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/test/test_mgmt_hdinsight.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/test/test_mgmt_hdinsight.py @@ -137,7 +137,7 @@ def test_create_kafka_cluster_with_managed_disks(self, resource_group, location, cluster = create_poller.result() self.validate_cluster(cluster_name, create_params, cluster) - # @unittest.skip('skipping temporarily to unblock azure-keyvault checkin') + @unittest.skip('skipping temporarily to unblock azure-keyvault checkin') @ResourceGroupPreparer(name_prefix='hdipy-', location=LOCATION) @StorageAccountPreparer(name_prefix='hdipy', location=LOCATION) @KeyVaultPreparer(name_prefix='hdipy', location=LOCATION, enable_soft_delete=True) diff --git a/sdk/hdinsight/ci.yml b/sdk/hdinsight/ci.yml index 2c32dc8a88445..42357e82c8bda 100644 --- a/sdk/hdinsight/ci.yml +++ b/sdk/hdinsight/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: hdinsight Artifacts: - name: azure_mgmt_hdinsight - safeName: azuremgmthdinsight \ No newline at end of file + safeName: azuremgmthdinsight diff --git a/sdk/healthcareapis/ci.yml b/sdk/healthcareapis/ci.yml index 93c23b9775828..ade8967508df6 100644 --- a/sdk/healthcareapis/ci.yml +++ b/sdk/healthcareapis/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: healthcareapis Artifacts: - name: azure_mgmt_healthcareapis - safeName: azuremgmthealthcareapis \ No newline at end of file + safeName: azuremgmthealthcareapis diff --git a/sdk/hybridcompute/ci.yml b/sdk/hybridcompute/ci.yml new file mode 100644 index 0000000000000..c53d291beaaa4 --- /dev/null +++ b/sdk/hybridcompute/ci.yml @@ -0,0 +1,33 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - master + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/hybridcompute/ + +pr: + branches: + include: + - master + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/hybridcompute/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: hybridcompute + Artifacts: + - name: azure_mgmt_hybridcompute + safeName: azuremgmthybridcompute diff --git a/sdk/hybridkubernetes/ci.yml b/sdk/hybridkubernetes/ci.yml index b7069a5772bb3..7827cde32abea 100644 --- a/sdk/hybridkubernetes/ci.yml +++ b/sdk/hybridkubernetes/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: hybridkubernetes Artifacts: - name: azure_mgmt_hybridkubernetes - safeName: azuremgmthybridkubernetes \ No newline at end of file + safeName: azuremgmthybridkubernetes diff --git a/sdk/identity/azure-identity/CHANGELOG.md b/sdk/identity/azure-identity/CHANGELOG.md index 81c7cb4d0336f..0a87d5108a23d 100644 --- a/sdk/identity/azure-identity/CHANGELOG.md +++ b/sdk/identity/azure-identity/CHANGELOG.md @@ -1,7 +1,21 @@ # Release History -## 1.4.1 (Unreleased) - +## 1.5.0b1 (Unreleased) +### Added +- Application authentication APIs from 1.4.0b7 +- `ManagedIdentityCredential` supports the latest version of App Service + ([#11346](https://github.com/Azure/azure-sdk-for-python/issues/11346)) +- `DefaultAzureCredential` allows specifying the client ID of a user-assigned + managed identity via keyword argument `managed_identity_client_id` + ([#12991](https://github.com/Azure/azure-sdk-for-python/issues/12991)) +- `CertificateCredential` supports Subject Name/Issuer authentication when + created with `send_certificate=True`. The async `CertificateCredential` + (`azure.identity.aio.CertificateCredential`) will support this in a + future version. + ([#10816](https://github.com/Azure/azure-sdk-for-python/issues/10816)) +- `InteractiveBrowserCredential` keyword argument `redirect_uri` enables + authentication with a user-specified application having a custom redirect URI + ([#13344](https://github.com/Azure/azure-sdk-for-python/issues/13344)) ## 1.4.0 (2020-08-10) ### Added @@ -253,7 +267,7 @@ its use in national clouds ### New features: - `AuthorizationCodeCredential` authenticates with a previously obtained authorization code. See Azure Active Directory's -[authorization code documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow) +[authorization code documentation](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow) for more information about this authentication flow. - Multi-cloud support: client credentials accept the authority of an Azure Active Directory authentication endpoint as an `authority` keyword argument. Known diff --git a/sdk/identity/azure-identity/MANIFEST.in b/sdk/identity/azure-identity/MANIFEST.in index 3eee8c39c7a7a..07b576fc0eb30 100644 --- a/sdk/identity/azure-identity/MANIFEST.in +++ b/sdk/identity/azure-identity/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include samples *.py recursive-include tests *.py include *.md include azure/__init__.py diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index abc9785835fac..a644028a6e250 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -6,7 +6,7 @@ Azure SDK clients which support Azure Active Directory (AAD) token authenticatio [Source code](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/identity/azure-identity) | [Package (PyPI)](https://pypi.org/project/azure-identity/) | [API reference documentation][ref_docs] -| [Azure Active Directory documentation](https://docs.microsoft.com/en-us/azure/active-directory/) +| [Azure Active Directory documentation](https://docs.microsoft.com/azure/active-directory/) # Getting started @@ -268,7 +268,7 @@ the message collects error messages from each credential in the chain. For more details on handling specific Azure Active Directory errors please refer to the Azure Active Directory -[error code documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-aadsts-error-codes). +[error code documentation](https://docs.microsoft.com/azure/active-directory/develop/reference-aadsts-error-codes). ### Logging diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index a749d3510112e..3819005a9e63f 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -4,7 +4,8 @@ # ------------------------------------ """Credentials for Azure SDK clients.""" -from ._exceptions import CredentialUnavailableError +from ._auth_record import AuthenticationRecord +from ._exceptions import AuthenticationRequiredError, CredentialUnavailableError from ._constants import AzureAuthorityHosts, KnownAuthorities from ._credentials import ( AzureCliCredential, @@ -24,6 +25,8 @@ __all__ = [ + "AuthenticationRecord", + "AuthenticationRequiredError", "AuthorizationCodeCredential", "AzureAuthorityHosts", "AzureCliCredential", diff --git a/sdk/identity/azure-identity/azure/identity/_constants.py b/sdk/identity/azure-identity/azure/identity/_constants.py index 8bfb28d7adfae..a724c82431dbc 100644 --- a/sdk/identity/azure-identity/azure/identity/_constants.py +++ b/sdk/identity/azure-identity/azure/identity/_constants.py @@ -35,8 +35,11 @@ class EnvironmentVariables: AZURE_PASSWORD = "AZURE_PASSWORD" USERNAME_PASSWORD_VARS = (AZURE_CLIENT_ID, AZURE_USERNAME, AZURE_PASSWORD) + IDENTITY_ENDPOINT = "IDENTITY_ENDPOINT" + IDENTITY_HEADER = "IDENTITY_HEADER" MSI_ENDPOINT = "MSI_ENDPOINT" MSI_SECRET = "MSI_SECRET" + AZURE_AUTHORITY_HOST = "AZURE_AUTHORITY_HOST" diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/app_service.py b/sdk/identity/azure-identity/azure/identity/_credentials/app_service.py new file mode 100644 index 0000000000000..b1e09e1955e82 --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_credentials/app_service.py @@ -0,0 +1,113 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import functools +import os +from typing import TYPE_CHECKING + +from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import HttpRequest + +from .. import CredentialUnavailableError +from .._constants import EnvironmentVariables +from .._internal.managed_identity_client import ManagedIdentityClient +from .._internal.get_token_mixin import GetTokenMixin + +if TYPE_CHECKING: + from typing import Any, Optional + + +class AppServiceCredential(GetTokenMixin): + def __init__(self, **kwargs): + # type: (**Any) -> None + super(AppServiceCredential, self).__init__() + + client_args = _get_client_args(**kwargs) + if client_args: + self._client = ManagedIdentityClient(**client_args) + else: + self._client = None + + def get_token(self, *scopes, **kwargs): + # type: (*str, **Any) -> AccessToken + if not self._client: + raise CredentialUnavailableError( + message="App Service managed identity configuration not found in environment" + ) + return super(AppServiceCredential, self).get_token(*scopes, **kwargs) + + def _acquire_token_silently(self, *scopes): + # type: (*str) -> Optional[AccessToken] + return self._client.get_cached_token(*scopes) + + def _request_token(self, *scopes, **kwargs): + # type: (*str, **Any) -> AccessToken + return self._client.request_token(*scopes, **kwargs) + + +def _get_client_args(**kwargs): + # type: (dict) -> Optional[dict] + identity_config = kwargs.pop("identity_config", None) or {} + + url = os.environ.get(EnvironmentVariables.IDENTITY_ENDPOINT) + secret = os.environ.get(EnvironmentVariables.IDENTITY_HEADER) + if url and secret: + version = "2019-08-01" + base_headers = {"X-IDENTITY-HEADER": secret} + content_callback = None + else: + url = os.environ.get(EnvironmentVariables.MSI_ENDPOINT) + secret = os.environ.get(EnvironmentVariables.MSI_SECRET) + if not (url and secret): + # App Service managed identity isn't available in this environment + return None + + version = "2017-09-01" + base_headers = {"secret": secret} + content_callback = _parse_app_service_expires_on + if kwargs.get("client_id"): + identity_config["clientid"] = kwargs.pop("client_id") + + return dict( + kwargs, + _content_callback=content_callback, + _identity_config=identity_config, + base_headers=base_headers, + request_factory=functools.partial(_get_request, url, version), + ) + + +def _get_request(url, version, scope, identity_config): + # type: (str, str, str, dict) -> HttpRequest + request = HttpRequest("GET", url) + request.format_parameters(dict({"api-version": version, "resource": scope}, **identity_config)) + return request + + +def _parse_app_service_expires_on(content): + # type: (dict) -> None + """Parse an App Service MSI version 2017-09-01 expires_on value to epoch seconds. + + This version of the API returns expires_on as a UTC datetime string rather than epoch seconds. The string's + format depends on the OS. Responses on Windows include AM/PM, for example "1/16/2020 5:24:12 AM +00:00". + Responses on Linux do not, for example "06/20/2019 02:57:58 +00:00". + + :raises ValueError: ``expires_on`` didn't match an expected format + """ + import calendar + import time + + # parse the string minus the timezone offset + expires_on = content["expires_on"] + if expires_on.endswith(" +00:00"): + date_string = expires_on[: -len(" +00:00")] + for format_string in ("%m/%d/%Y %H:%M:%S", "%m/%d/%Y %I:%M:%S %p"): # (Linux, Windows) + try: + t = time.strptime(date_string, format_string) + content["expires_on"] = calendar.timegm(t) + return + except ValueError: + pass + + raise ValueError("'{}' doesn't match the expected format".format(expires_on)) diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/browser.py b/sdk/identity/azure-identity/azure/identity/_credentials/browser.py index 2726c425074a2..751e30fca141b 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/browser.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/browser.py @@ -36,13 +36,25 @@ class InteractiveBrowserCredential(InteractiveCredential): authenticate work or school accounts. :keyword str client_id: Client ID of the Azure Active Directory application users will sign in to. If unspecified, the Azure CLI's ID will be used. + :keyword str redirect_uri: a redirect URI for the application identified by `client_id` as configured in Azure + Active Directory, for example "http://localhost:8400". This is only required when passing a value for + `client_id`, and must match a redirect URI in the application's registration. The credential must be able to + bind a socket to this URI. + :keyword AuthenticationRecord authentication_record: :class:`AuthenticationRecord` returned by :func:`authenticate` + :keyword bool disable_automatic_authentication: if True, :func:`get_token` will raise + :class:`AuthenticationRequiredError` when user interaction is required to acquire a token. Defaults to False. + :keyword bool enable_persistent_cache: if True, the credential will store tokens in a persistent cache shared by + other user credentials. Defaults to False. + :keyword bool allow_unencrypted_cache: if True, the credential will fall back to a plaintext cache on platforms + where encryption is unavailable. Default to False. Has no effect when `enable_persistent_cache` is False. :keyword int timeout: seconds to wait for the user to complete authentication. Defaults to 300 (5 minutes). """ def __init__(self, **kwargs): # type: (**Any) -> None + self._redirect_uri = kwargs.pop("redirect_uri", None) self._timeout = kwargs.pop("timeout", 300) - self._server_class = kwargs.pop("server_class", AuthCodeRedirectServer) # facilitate mocking + self._server_class = kwargs.pop("_server_class", AuthCodeRedirectServer) client_id = kwargs.pop("client_id", AZURE_CLI_CLIENT_ID) super(InteractiveBrowserCredential, self).__init__(client_id=client_id, **kwargs) @@ -50,17 +62,24 @@ def __init__(self, **kwargs): def _request_token(self, *scopes, **kwargs): # type: (*str, **Any) -> dict - # start an HTTP server on localhost to receive the redirect - redirect_uri = None - for port in range(8400, 9000): + # start an HTTP server to receive the redirect + server = None + redirect_uri = self._redirect_uri + if redirect_uri: try: - server = self._server_class(port, timeout=self._timeout) - redirect_uri = "http://localhost:{}".format(port) - break + server = self._server_class(redirect_uri, timeout=self._timeout) except socket.error: - continue # keep looking for an open port - - if not redirect_uri: + raise CredentialUnavailableError(message="Couldn't start an HTTP server on " + redirect_uri) + else: + for port in range(8400, 9000): + try: + redirect_uri = "http://localhost:{}".format(port) + server = self._server_class(redirect_uri, timeout=self._timeout) + break + except socket.error: + continue # keep looking for an open port + + if not server: raise CredentialUnavailableError(message="Couldn't start an HTTP server on localhost") # get the url the user must visit to authenticate @@ -86,7 +105,6 @@ def _request_token(self, *scopes, **kwargs): code = self._parse_response(request_state, response) return app.acquire_token_by_authorization_code(code, scopes=scopes, redirect_uri=redirect_uri, **kwargs) - @staticmethod def _parse_response(request_state, response): # type: (str, Mapping[str, Any]) -> List[str] diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/certificate.py b/sdk/identity/azure-identity/azure/identity/_credentials/certificate.py index 8ae461c8ef78a..1b8a64fb98f7d 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/certificate.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/certificate.py @@ -2,17 +2,21 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from binascii import hexlify from typing import TYPE_CHECKING -from .._internal import AadClient, CertificateCredentialBase -from .._internal.decorators import log_get_token +from cryptography import x509 +from cryptography.hazmat.primitives import hashes, serialization +from cryptography.hazmat.backends import default_backend +import six + +from .._internal.client_credential_base import ClientCredentialBase if TYPE_CHECKING: - from azure.core.credentials import AccessToken from typing import Any -class CertificateCredential(CertificateCredentialBase): +class CertificateCredential(ClientCredentialBase): """Authenticates as a service principal using a certificate. :param str tenant_id: ID of the service principal's tenant. Also called its 'directory' ID. @@ -25,33 +29,57 @@ class CertificateCredential(CertificateCredentialBase): :keyword password: The certificate's password. If a unicode string, it will be encoded as UTF-8. If the certificate requires a different encoding, pass appropriately encoded bytes instead. :paramtype password: str or bytes + :keyword bool send_certificate: if True, the credential will send public certificate material with token requests. + This is required to use Subject Name/Issuer (SNI) authentication. Defaults to False. + :keyword bool enable_persistent_cache: if True, the credential will store tokens in a persistent cache. Defaults to + False. + :keyword bool allow_unencrypted_cache: if True, the credential will fall back to a plaintext cache when encryption + is unavailable. Default to False. Has no effect when `enable_persistent_cache` is False. """ - @log_get_token("CertificateCredential") - def get_token(self, *scopes, **kwargs): # pylint:disable=unused-argument - # type: (*str, **Any) -> AccessToken - """Request an access token for `scopes`. - - .. note:: This method is called by Azure SDK clients. It isn't intended for use in application code. - - :param str scopes: desired scopes for the access token. This method requires at least one scope. - :rtype: :class:`azure.core.credentials.AccessToken` - :raises ~azure.core.exceptions.ClientAuthenticationError: authentication failed. The error's ``message`` - attribute gives a reason. Any error response from Azure Active Directory is available as the error's - ``response`` attribute. - """ - if not scopes: - raise ValueError("'get_token' requires at least one scope") - - token = self._client.get_cached_access_token(scopes, query={"client_id": self._client_id}) - if not token: - token = self._client.obtain_token_by_client_certificate(scopes, self._certificate, **kwargs) - elif self._client.should_refresh(token): + def __init__(self, tenant_id, client_id, certificate_path, **kwargs): + # type: (str, str, str, **Any) -> None + if not certificate_path: + raise ValueError( + "'certificate_path' must be the path to a PEM file containing an x509 certificate and its private key" + ) + + password = kwargs.pop("password", None) + if isinstance(password, six.text_type): + password = password.encode(encoding="utf-8") + + with open(certificate_path, "rb") as f: + pem_bytes = f.read() + + cert = x509.load_pem_x509_certificate(pem_bytes, default_backend()) + fingerprint = cert.fingerprint(hashes.SHA1()) # nosec + + # TODO: msal doesn't formally support passwords (but soon will); the below depends on an implementation detail + private_key = serialization.load_pem_private_key(pem_bytes, password=password, backend=default_backend()) + client_credential = {"private_key": private_key, "thumbprint": hexlify(fingerprint).decode("utf-8")} + if kwargs.pop("send_certificate", False): try: - self._client.obtain_token_by_client_certificate(scopes, self._certificate, **kwargs) - except Exception: # pylint: disable=broad-except - pass - return token + # the JWT needs the whole chain but load_pem_x509_certificate deserializes only the signing cert + chain = extract_cert_chain(pem_bytes) + client_credential["public_certificate"] = six.ensure_str(chain) + except ValueError as ex: + # we shouldn't land here, because load_pem_private_key should have raised when given a malformed file + message = 'Found no PEM encoded certificate in "{}"'.format(certificate_path) + six.raise_from(ValueError(message), ex) + + super(CertificateCredential, self).__init__( + client_id=client_id, client_credential=client_credential, tenant_id=tenant_id, **kwargs + ) + + +def extract_cert_chain(pem_bytes): + # type: (bytes) -> bytes + """Extract a certificate chain from a PEM file's bytes, removing line breaks.""" + + # if index raises ValueError, there's no PEM-encoded cert + start = pem_bytes.index(b"-----BEGIN CERTIFICATE-----") + footer = b"-----END CERTIFICATE-----" + end = pem_bytes.rindex(footer) + chain = pem_bytes[start:end + len(footer) + 1] - def _get_auth_client(self, tenant_id, client_id, **kwargs): - return AadClient(tenant_id, client_id, **kwargs) + return b"".join(chain.splitlines()) diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/client_secret.py b/sdk/identity/azure-identity/azure/identity/_credentials/client_secret.py index 54bce366781a9..311a6f1ef3e8f 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/client_secret.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/client_secret.py @@ -2,21 +2,16 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .._internal import AadClient, ClientSecretCredentialBase -from .._internal.decorators import log_get_token +from typing import TYPE_CHECKING -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False +from .._internal.client_credential_base import ClientCredentialBase if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports from typing import Any - from azure.core.credentials import AccessToken -class ClientSecretCredential(ClientSecretCredentialBase): +class ClientSecretCredential(ClientCredentialBase): """Authenticates as a service principal using a client ID and client secret. :param str tenant_id: ID of the service principal's tenant. Also called its 'directory' ID. @@ -26,33 +21,23 @@ class ClientSecretCredential(ClientSecretCredentialBase): :keyword str authority: Authority of an Azure Active Directory endpoint, for example 'login.microsoftonline.com', the authority for Azure Public Cloud (which is the default). :class:`~azure.identity.AzureAuthorityHosts` defines authorities for other clouds. + :keyword bool enable_persistent_cache: if True, the credential will store tokens in a persistent cache. Defaults to + False. + :keyword bool allow_unencrypted_cache: if True, the credential will fall back to a plaintext cache when encryption + is unavailable. Default to False. Has no effect when `enable_persistent_cache` is False. """ - @log_get_token("ClientSecretCredential") - def get_token(self, *scopes, **kwargs): - # type: (*str, **Any) -> AccessToken - """Request an access token for `scopes`. - - .. note:: This method is called by Azure SDK clients. It isn't intended for use in application code. - - :param str scopes: desired scopes for the access token. This method requires at least one scope. - :rtype: :class:`azure.core.credentials.AccessToken` - :raises ~azure.core.exceptions.ClientAuthenticationError: authentication failed. The error's ``message`` - attribute gives a reason. Any error response from Azure Active Directory is available as the error's - ``response`` attribute. - """ - if not scopes: - raise ValueError("'get_token' requires at least one scope") - - token = self._client.get_cached_access_token(scopes, query={"client_id": self._client_id}) - if not token: - token = self._client.obtain_token_by_client_secret(scopes, self._secret, **kwargs) - elif self._client.should_refresh(token): - try: - self._client.obtain_token_by_client_secret(scopes, self._secret, **kwargs) - except Exception: # pylint: disable=broad-except - pass - return token - - def _get_auth_client(self, tenant_id, client_id, **kwargs): - return AadClient(tenant_id, client_id, **kwargs) + def __init__(self, tenant_id, client_id, client_secret, **kwargs): + # type: (str, str, str, **Any) -> None + if not client_id: + raise ValueError("client_id should be the id of an Azure Active Directory application") + if not client_secret: + raise ValueError("secret should be an Azure Active Directory application's client secret") + if not tenant_id: + raise ValueError( + "tenant_id should be an Azure Active Directory tenant's id (also called its 'directory id')" + ) + + super(ClientSecretCredential, self).__init__( + client_id=client_id, client_credential=client_secret, tenant_id=tenant_id, **kwargs + ) diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/default.py b/sdk/identity/azure-identity/azure/identity/_credentials/default.py index 380bd8137f90e..b4c469ee9f3a7 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/default.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/default.py @@ -62,6 +62,8 @@ class DefaultAzureCredential(ChainedTokenCredential): :keyword str interactive_browser_tenant_id: Tenant ID to use when authenticating a user through :class:`~azure.identity.InteractiveBrowserCredential`. Defaults to the value of environment variable AZURE_TENANT_ID, if any. If unspecified, users will authenticate in their home tenants. + :keyword str managed_identity_client_id: The client ID of a user-assigned managed identity. Defaults to the value + of the environment variable AZURE_CLIENT_ID, if any. If not specified, a system-assigned identity will be used. :keyword str shared_cache_username: Preferred username for :class:`~azure.identity.SharedTokenCacheCredential`. Defaults to the value of environment variable AZURE_USERNAME, if any. :keyword str shared_cache_tenant_id: Preferred tenant for :class:`~azure.identity.SharedTokenCacheCredential`. @@ -79,6 +81,10 @@ def __init__(self, **kwargs): "interactive_browser_tenant_id", os.environ.get(EnvironmentVariables.AZURE_TENANT_ID) ) + managed_identity_client_id = kwargs.pop( + "managed_identity_client_id", os.environ.get(EnvironmentVariables.AZURE_CLIENT_ID) + ) + shared_cache_username = kwargs.pop("shared_cache_username", os.environ.get(EnvironmentVariables.AZURE_USERNAME)) shared_cache_tenant_id = kwargs.pop( "shared_cache_tenant_id", os.environ.get(EnvironmentVariables.AZURE_TENANT_ID) @@ -99,9 +105,7 @@ def __init__(self, **kwargs): if not exclude_environment_credential: credentials.append(EnvironmentCredential(authority=authority, **kwargs)) if not exclude_managed_identity_credential: - credentials.append( - ManagedIdentityCredential(client_id=os.environ.get(EnvironmentVariables.AZURE_CLIENT_ID), **kwargs) - ) + credentials.append(ManagedIdentityCredential(client_id=managed_identity_client_id, **kwargs)) if not exclude_shared_token_cache_credential and SharedTokenCacheCredential.supported(): try: # username and/or tenant_id are only required when the cache contains tokens for multiple identities diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/device_code.py b/sdk/identity/azure-identity/azure/identity/_credentials/device_code.py index 37278c2a7a163..87fc9e738a318 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/device_code.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/device_code.py @@ -46,6 +46,13 @@ class DeviceCodeCredential(InteractiveCredential): - ``expires_on`` (datetime.datetime) the UTC time at which the code will expire If this argument isn't provided, the credential will print instructions to stdout. :paramtype prompt_callback: Callable[str, str, ~datetime.datetime] + :keyword AuthenticationRecord authentication_record: :class:`AuthenticationRecord` returned by :func:`authenticate` + :keyword bool disable_automatic_authentication: if True, :func:`get_token` will raise + :class:`AuthenticationRequiredError` when user interaction is required to acquire a token. Defaults to False. + :keyword bool enable_persistent_cache: if True, the credential will store tokens in a persistent cache shared by + other user credentials. Defaults to False. + :keyword bool allow_unencrypted_cache: if True, the credential will fall back to a plaintext cache on platforms + where encryption is unavailable. Default to False. Has no effect when `enable_persistent_cache` is False. """ def __init__(self, client_id, **kwargs): diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/managed_identity.py b/sdk/identity/azure-identity/azure/identity/_credentials/managed_identity.py index 1205b1a083db0..9a97dd183a943 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/managed_identity.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/managed_identity.py @@ -44,14 +44,31 @@ class ManagedIdentityCredential(object): the keyword arguments. :keyword str client_id: a user-assigned identity's client ID. This is supported in all hosting environments. + :keyword identity_config: a mapping ``{parameter_name: value}`` specifying a user-assigned identity by its object + or resource ID, for example ``{"object_id": "..."}``. Check the documentation for your hosting environment to + learn what values it expects. + :paramtype identity_config: Mapping[str, str] """ def __init__(self, **kwargs): # type: (**Any) -> None self._credential = None - if os.environ.get(EnvironmentVariables.MSI_ENDPOINT): - _LOGGER.info("%s will use MSI", self.__class__.__name__) - self._credential = MsiCredential(**kwargs) + if os.environ.get(EnvironmentVariables.IDENTITY_ENDPOINT) and os.environ.get( + EnvironmentVariables.IDENTITY_HEADER + ): + _LOGGER.info("%s will use App Service managed identity", self.__class__.__name__) + from .app_service import AppServiceCredential + + self._credential = AppServiceCredential(**kwargs) + elif os.environ.get(EnvironmentVariables.MSI_ENDPOINT): + if os.environ.get(EnvironmentVariables.MSI_SECRET): + _LOGGER.info("%s will use App Service managed identity", self.__class__.__name__) + from .app_service import AppServiceCredential + + self._credential = AppServiceCredential(**kwargs) + else: + _LOGGER.info("%s will use MSI", self.__class__.__name__) + self._credential = MsiCredential(**kwargs) else: _LOGGER.info("%s will use IMDS", self.__class__.__name__) self._credential = ImdsCredential(**kwargs) @@ -76,7 +93,7 @@ def get_token(self, *scopes, **kwargs): class _ManagedIdentityBase(object): def __init__(self, endpoint, client_cls, config=None, client_id=None, **kwargs): # type: (str, Type, Optional[Configuration], Optional[str], **Any) -> None - self._identity_config = kwargs.pop("_identity_config", None) or {} + self._identity_config = kwargs.pop("identity_config", None) or {} if client_id: if os.environ.get(EnvironmentVariables.MSI_ENDPOINT) and os.environ.get(EnvironmentVariables.MSI_SECRET): # App Service: version 2017-09-1 accepts client ID as parameter "clientid" diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py b/sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py index 59aa7728a8a2e..741dcc30bf03c 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py @@ -31,6 +31,10 @@ class SharedTokenCacheCredential(SharedTokenCacheBase): defines authorities for other clouds. :keyword str tenant_id: an Azure Active Directory tenant ID. Used to select an account when the cache contains tokens for multiple identities. + :keyword AuthenticationRecord authentication_record: an authentication record returned by a user credential such as + :class:`DeviceCodeCredential` or :class:`InteractiveBrowserCredential` + :keyword bool allow_unencrypted_cache: if True, the credential will fall back to a plaintext cache when encryption + is unavailable. Defaults to False. """ @log_get_token("SharedTokenCacheCredential") diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/user_password.py b/sdk/identity/azure-identity/azure/identity/_credentials/user_password.py index a5636855a6e1f..1c6c1b3561d6e 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/user_password.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/user_password.py @@ -33,6 +33,10 @@ class UsernamePasswordCredential(InteractiveCredential): defines authorities for other clouds. :keyword str tenant_id: tenant ID or a domain associated with a tenant. If not provided, defaults to the 'organizations' tenant, which supports only Azure Active Directory work or school accounts. + :keyword bool enable_persistent_cache: if True, the credential will store tokens in a persistent cache shared by + other user credentials. Defaults to False. + :keyword bool allow_unencrypted_cache: if True, the credential will fall back to a plaintext cache on platforms + where encryption is unavailable. Default to False. Has no effect when `enable_persistent_cache` is False. """ def __init__(self, client_id, username, password, **kwargs): @@ -42,7 +46,7 @@ def __init__(self, client_id, username, password, **kwargs): # first time it's asked for a token. However, we want to ensure this first authentication is not silent, to # validate the given password. This class therefore doesn't document the authentication_record argument, and we # discard it here. - kwargs.pop("_authentication_record", None) + kwargs.pop("authentication_record", None) super(UsernamePasswordCredential, self).__init__(client_id=client_id, **kwargs) self._username = username self._password = password diff --git a/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py index 9463e3c6412bd..67906fcc568b0 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py @@ -2,23 +2,18 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False +from typing import TYPE_CHECKING -if TYPE_CHECKING: - from typing import Any, Mapping, Optional +from six.moves.urllib_parse import parse_qs, urlparse try: from http.server import HTTPServer, BaseHTTPRequestHandler except ImportError: from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler # type: ignore -try: - from urllib.parse import parse_qs -except ImportError: - from urlparse import parse_qs # type: ignore +if TYPE_CHECKING: + # pylint:disable=ungrouped-imports + from typing import Any, Mapping class AuthCodeRedirectHandler(BaseHTTPRequestHandler): @@ -46,13 +41,14 @@ def log_message(self, format, *args): # pylint: disable=redefined-builtin,unuse class AuthCodeRedirectServer(HTTPServer): - """HTTP server that listens on localhost for the redirect request following an authorization code authentication""" + """HTTP server that listens for the redirect request following an authorization code authentication""" query_params = {} # type: Mapping[str, Any] - def __init__(self, port, timeout): - # type: (int, int) -> None - HTTPServer.__init__(self, ("localhost", port), AuthCodeRedirectHandler) + def __init__(self, uri, timeout): + # type: (str, int) -> None + parsed = urlparse(uri) + HTTPServer.__init__(self, (parsed.hostname, parsed.port), AuthCodeRedirectHandler) self.timeout = timeout def wait_for_redirect(self): diff --git a/sdk/identity/azure-identity/azure/identity/_internal/certificate_credential_base.py b/sdk/identity/azure-identity/azure/identity/_internal/certificate_credential_base.py index e799bce87adf3..c13fe86d7a295 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/certificate_credential_base.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/certificate_credential_base.py @@ -44,9 +44,9 @@ def __init__(self, tenant_id, client_id, certificate_path, **kwargs): self._certificate = AadClientCertificate(pem_bytes, password=password) - enable_persistent_cache = kwargs.pop("_enable_persistent_cache", False) + enable_persistent_cache = kwargs.pop("enable_persistent_cache", False) if enable_persistent_cache: - allow_unencrypted = kwargs.pop("_allow_unencrypted_cache", False) + allow_unencrypted = kwargs.pop("allow_unencrypted_cache", False) cache = load_service_principal_cache(allow_unencrypted) else: cache = TokenCache() diff --git a/sdk/identity/azure-identity/azure/identity/_internal/client_credential_base.py b/sdk/identity/azure-identity/azure/identity/_internal/client_credential_base.py new file mode 100644 index 0000000000000..68fc0df801eac --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/client_credential_base.py @@ -0,0 +1,59 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import time +from typing import TYPE_CHECKING + +import msal + +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError +from .get_token_mixin import GetTokenMixin +from .persistent_cache import load_service_principal_cache + +from . import wrap_exceptions +from .msal_credentials import MsalCredential + +if TYPE_CHECKING: + from typing import Any, Optional + + +class ClientCredentialBase(MsalCredential, GetTokenMixin): + """Base class for credentials authenticating a service principal with a certificate or secret""" + + def __init__(self, **kwargs): + if kwargs.pop("enable_persistent_cache", False): + allow_unencrypted = kwargs.pop("allow_unencrypted_cache", False) + cache = load_service_principal_cache(allow_unencrypted) + else: + cache = msal.TokenCache() + super(ClientCredentialBase, self).__init__(_cache=cache, **kwargs) + + @wrap_exceptions + def _acquire_token_silently(self, *scopes, **kwargs): + # type: (*str, **Any) -> Optional[AccessToken] + app = self._get_app() + request_time = int(time.time()) + result = app.acquire_token_silent_with_error(list(scopes), account=None, **kwargs) + if result and "access_token" in result and "expires_in" in result: + return AccessToken(result["access_token"], request_time + int(result["expires_in"])) + return None + + @wrap_exceptions + def _request_token(self, *scopes, **kwargs): + # type: (*str, **Any) -> Optional[AccessToken] + app = self._get_app() + request_time = int(time.time()) + result = app.acquire_token_for_client(list(scopes)) + if "access_token" not in result: + message = "Authentication failed: {}".format(result.get("error_description") or result.get("error")) + raise ClientAuthenticationError(message=message) + + return AccessToken(result["access_token"], request_time + int(result["expires_in"])) + + def _get_app(self): + # type: () -> msal.ConfidentialClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.ConfidentialClientApplication) + return self._msal_app diff --git a/sdk/identity/azure-identity/azure/identity/_internal/client_secret_credential_base.py b/sdk/identity/azure-identity/azure/identity/_internal/client_secret_credential_base.py index a8b0a1fdc4cef..4854a396e84f1 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/client_secret_credential_base.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/client_secret_credential_base.py @@ -31,9 +31,9 @@ def __init__(self, tenant_id, client_id, client_secret, **kwargs): "tenant_id should be an Azure Active Directory tenant's id (also called its 'directory id')" ) - enable_persistent_cache = kwargs.pop("_enable_persistent_cache", False) + enable_persistent_cache = kwargs.pop("enable_persistent_cache", False) if enable_persistent_cache: - allow_unencrypted = kwargs.pop("_allow_unencrypted_cache", False) + allow_unencrypted = kwargs.pop("allow_unencrypted_cache", False) cache = load_service_principal_cache(allow_unencrypted) else: cache = TokenCache() diff --git a/sdk/identity/azure-identity/azure/identity/_internal/get_token_mixin.py b/sdk/identity/azure-identity/azure/identity/_internal/get_token_mixin.py new file mode 100644 index 0000000000000..c8ebe110dd01f --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/get_token_mixin.py @@ -0,0 +1,84 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import abc +import logging +import time +from typing import TYPE_CHECKING + +from .._constants import DEFAULT_REFRESH_OFFSET, DEFAULT_TOKEN_REFRESH_RETRY_DELAY + +try: + ABC = abc.ABC +except AttributeError: # Python 2.7, abc exists, but not ABC + ABC = abc.ABCMeta("ABC", (object,), {"__slots__": ()}) # type: ignore + +if TYPE_CHECKING: + # pylint:disable=ungrouped-imports,unused-import + from typing import Any, Optional + from azure.core.credentials import AccessToken + +_LOGGER = logging.getLogger(__name__) + + +class GetTokenMixin(ABC): + def __init__(self, *args, **kwargs): + # type: (*Any, **Any) -> None + self._last_request_time = 0 + super(GetTokenMixin, self).__init__(*args, **kwargs) + + @abc.abstractmethod + def _acquire_token_silently(self, *scopes): + # type: (*str) -> Optional[AccessToken] + """Attempt to acquire an access token from a cache or by redeeming a refresh token""" + + @abc.abstractmethod + def _request_token(self, *scopes, **kwargs): + # type: (*str, **Any) -> AccessToken + """Request an access token from the STS""" + + def _should_refresh(self, token): + # type: (AccessToken) -> bool + now = int(time.time()) + if token.expires_on - now > DEFAULT_REFRESH_OFFSET: + return False + if now - self._last_request_time < DEFAULT_TOKEN_REFRESH_RETRY_DELAY: + return False + return True + + def get_token(self, *scopes, **kwargs): + # type: (*str, **Any) -> AccessToken + """Request an access token for `scopes`. + + .. note:: This method is called by Azure SDK clients. It isn't intended for use in application code. + + :param str scopes: desired scopes for the access token. This method requires at least one scope. + :rtype: :class:`azure.core.credentials.AccessToken` + :raises CredentialUnavailableError: the credential is unable to attempt authentication because it lacks + required data, state, or platform support + :raises ~azure.core.exceptions.ClientAuthenticationError: authentication failed. The error's ``message`` + attribute gives a reason. + """ + if not scopes: + raise ValueError('"get_token" requires at least one scope') + + try: + token = self._acquire_token_silently(*scopes) + if not token: + self._last_request_time = int(time.time()) + token = self._request_token(*scopes) + elif self._should_refresh(token): + try: + self._last_request_time = int(time.time()) + token = self._request_token(*scopes, **kwargs) + except Exception: # pylint:disable=broad-except + pass + _LOGGER.info("%s.get_token succeeded", self.__class__.__name__) + return token + + except Exception as ex: + _LOGGER.warning( + "%s.get_token failed: %s", self.__class__.__name__, ex, exc_info=_LOGGER.isEnabledFor(logging.DEBUG) + ) + raise diff --git a/sdk/identity/azure-identity/azure/identity/_internal/interactive.py b/sdk/identity/azure-identity/azure/identity/_internal/interactive.py index 466c849f069bc..c8603b662a6d0 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/interactive.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/interactive.py @@ -12,7 +12,7 @@ from typing import TYPE_CHECKING import msal -from six.moves.urllib_parse import urlparse +import six from azure.core.credentials import AccessToken from azure.core.exceptions import ClientAuthenticationError @@ -57,22 +57,33 @@ def _build_auth_record(response): # MSAL uses the subject claim as home_account_id when the STS doesn't provide client_info home_account_id = id_token["sub"] + # "iss" is the URL of the issuing tenant e.g. https://authority/tenant + issuer = six.moves.urllib_parse.urlparse(id_token["iss"]) + + # tenant which issued the token, not necessarily user's home tenant + tenant_id = id_token.get("tid") or issuer.path.strip("/") + + # AAD returns "preferred_username", ADFS returns "upn" + username = id_token.get("preferred_username") or id_token["upn"] + return AuthenticationRecord( - authority=urlparse(id_token["iss"]).netloc, # "iss" is the URL of the issuing tenant + authority=issuer.netloc, client_id=id_token["aud"], home_account_id=home_account_id, - tenant_id=id_token["tid"], # tenant which issued the token, not necessarily user's home tenant - username=id_token["preferred_username"], + tenant_id=tenant_id, + username=username, + ) + except (KeyError, ValueError) as ex: + auth_error = ClientAuthenticationError( + message="Failed to build AuthenticationRecord from unexpected identity token" ) - except (KeyError, ValueError): - # surprising: msal.ClientApplication always requests an id token, whose shape shouldn't change - return None + six.raise_from(auth_error, ex) class InteractiveCredential(MsalCredential): def __init__(self, **kwargs): - self._disable_automatic_authentication = kwargs.pop("_disable_automatic_authentication", False) - self._auth_record = kwargs.pop("_authentication_record", None) # type: Optional[AuthenticationRecord] + self._disable_automatic_authentication = kwargs.pop("disable_automatic_authentication", False) + self._auth_record = kwargs.pop("authentication_record", None) # type: Optional[AuthenticationRecord] if self._auth_record: kwargs.pop("client_id", None) # authentication_record overrides client_id argument tenant_id = kwargs.pop("tenant_id", None) or self._auth_record.tenant_id @@ -97,6 +108,8 @@ def get_token(self, *scopes, **kwargs): required data, state, or platform support :raises ~azure.core.exceptions.ClientAuthenticationError: authentication failed. The error's ``message`` attribute gives a reason. + :raises AuthenticationRequiredError: user interaction is necessary to acquire a token, and the credential is + configured not to begin this automatically. Call :func:`authenticate` to begin interactive authentication. """ if not scopes: message = "'get_token' requires at least one scope" @@ -138,7 +151,7 @@ def get_token(self, *scopes, **kwargs): _LOGGER.info("%s.get_token succeeded", self.__class__.__name__) return AccessToken(result["access_token"], now + int(result["expires_in"])) - def _authenticate(self, **kwargs): + def authenticate(self, **kwargs): # type: (**Any) -> AuthenticationRecord """Interactively authenticate a user. diff --git a/sdk/identity/azure-identity/azure/identity/_internal/managed_identity_client.py b/sdk/identity/azure-identity/azure/identity/_internal/managed_identity_client.py new file mode 100644 index 0000000000000..77282581df3d0 --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/managed_identity_client.py @@ -0,0 +1,133 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import abc +import time +from typing import TYPE_CHECKING + +from msal import TokenCache + +from azure.core.configuration import Configuration +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError +from azure.core.pipeline import Pipeline +from azure.core.pipeline.policies import ( + ContentDecodePolicy, + DistributedTracingPolicy, + HeadersPolicy, + HttpLoggingPolicy, + UserAgentPolicy, + RetryPolicy, + NetworkTraceLoggingPolicy, +) +from azure.identity._internal import _scopes_to_resource + +from .user_agent import USER_AGENT + +try: + ABC = abc.ABC +except AttributeError: # Python 2.7, abc exists, but not ABC + ABC = abc.ABCMeta("ABC", (object,), {"__slots__": ()}) # type: ignore + +if TYPE_CHECKING: + # pylint:disable=ungrouped-imports + from typing import Any, Callable, List, Optional, Union + from azure.core.pipeline import PipelineResponse + from azure.core.pipeline.policies import HTTPPolicy, SansIOHTTPPolicy + from azure.core.pipeline.transport import HttpTransport, HttpRequest + + PolicyType = Union[HTTPPolicy, SansIOHTTPPolicy] + + +class ManagedIdentityClient(object): + # pylint:disable=missing-client-constructor-parameter-credential + def __init__(self, request_factory, client_id=None, **kwargs): + # type: (Callable[[str, dict], HttpRequest], Optional[str], **Any) -> None + self._cache = kwargs.pop("_cache", None) or TokenCache() + self._content_callback = kwargs.pop("_content_callback", None) + self._identity_config = kwargs.pop("_identity_config", None) or {} + if client_id: + self._identity_config["client_id"] = client_id + + config = kwargs.pop("_config", None) or _get_configuration(**kwargs) + self._pipeline = self._build_pipeline(config, **kwargs) + + self._request_factory = request_factory + + def get_cached_token(self, *scopes): + # type: (*str) -> Optional[AccessToken] + resource = _scopes_to_resource(*scopes) + tokens = self._cache.find(TokenCache.CredentialType.ACCESS_TOKEN, target=[resource]) + for token in tokens: + if token["expires_on"] > time.time(): + return AccessToken(token["secret"], token["expires_on"]) + return None + + def request_token(self, *scopes, **kwargs): # pylint:disable=unused-argument + # type: (*str, **Any) -> AccessToken + resource = _scopes_to_resource(*scopes) + request = self._request_factory(resource, self._identity_config) + request_time = int(time.time()) + response = self._pipeline.run(request) + token = self._process_response(response, request_time) + return token + + def _process_response(self, response, request_time): + # type: (PipelineResponse, int) -> AccessToken + + # ContentDecodePolicy sets this, and should have raised if it couldn't deserialize the response + content = ContentDecodePolicy.deserialize_from_http_generics(response.http_response) # type: dict + if not content: + raise ClientAuthenticationError(message="No token received.", response=response.http_response) + if "access_token" not in content or not ("expires_in" in content or "expires_on" in content): + if content and "access_token" in content: + content["access_token"] = "****" + raise ClientAuthenticationError( + message='Unexpected response "{}"'.format(content), response=response.http_response + ) + + if self._content_callback: + self._content_callback(content) + + expires_on = int(content.get("expires_on") or int(content["expires_in"]) + request_time) + content["expires_on"] = expires_on + + token = AccessToken(content["access_token"], content["expires_on"]) + + # caching is the final step because TokenCache.add mutates its "event" + self._cache.add( + event={"response": content, "scope": content["resource"]}, now=request_time, + ) + + return token + + def _build_pipeline(self, config, policies=None, transport=None, **kwargs): # pylint:disable=no-self-use + # type: (Configuration, Optional[List[PolicyType]], Optional[HttpTransport], **Any) -> Pipeline + if policies is None: # [] is a valid policy list + policies = _get_policies(config, **kwargs) + if not transport: + from azure.core.pipeline.transport import RequestsTransport + + transport = RequestsTransport(**kwargs) + + return Pipeline(transport=transport, policies=policies) + + +def _get_policies(config, **kwargs): + return [ + HeadersPolicy(**kwargs), + UserAgentPolicy(base_user_agent=USER_AGENT, **kwargs), + config.proxy_policy, + config.retry_policy, + NetworkTraceLoggingPolicy(**kwargs), + DistributedTracingPolicy(**kwargs), + HttpLoggingPolicy(**kwargs), + ] + + +def _get_configuration(**kwargs): + # type: (**Any) -> Configuration + config = Configuration() + config.retry_policy = RetryPolicy(**kwargs) + return config diff --git a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py index 65b8e6efaf83c..6860af649cacf 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py @@ -40,8 +40,8 @@ def __init__(self, client_id, client_credential=None, **kwargs): self._cache = kwargs.pop("_cache", None) # internal, for use in tests if not self._cache: - if kwargs.pop("_enable_persistent_cache", False): - allow_unencrypted = kwargs.pop("_allow_unencrypted_cache", False) + if kwargs.pop("enable_persistent_cache", False): + allow_unencrypted = kwargs.pop("allow_unencrypted_cache", False) self._cache = load_user_cache(allow_unencrypted) else: self._cache = msal.TokenCache() @@ -50,11 +50,7 @@ def __init__(self, client_id, client_credential=None, **kwargs): # postpone creating the wrapped application because its initializer uses the network self._msal_app = None # type: Optional[msal.ClientApplication] - - @abc.abstractmethod - def get_token(self, *scopes, **kwargs): - # type: (*str, **Any) -> AccessToken - pass + super(MsalCredential, self).__init__() @abc.abstractmethod def _get_app(self): diff --git a/sdk/identity/azure-identity/azure/identity/_internal/shared_token_cache.py b/sdk/identity/azure-identity/azure/identity/_internal/shared_token_cache.py index 865ccf5e22734..d28a7602fd5eb 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/shared_token_cache.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/shared_token_cache.py @@ -30,7 +30,7 @@ # pylint:disable=unused-import,ungrouped-imports from typing import Any, Iterable, List, Mapping, Optional from .._internal import AadClientBase - from azure.identity._auth_record import AuthenticationRecord + from azure.identity import AuthenticationRecord CacheItem = Mapping[str, str] @@ -90,7 +90,7 @@ class SharedTokenCacheBase(ABC): def __init__(self, username=None, **kwargs): # pylint:disable=unused-argument # type: (Optional[str], **Any) -> None - self._auth_record = kwargs.pop("_authentication_record", None) # type: Optional[AuthenticationRecord] + self._auth_record = kwargs.pop("authentication_record", None) # type: Optional[AuthenticationRecord] if self._auth_record: # authenticate in the tenant that produced the record unless 'tenant_id' specifies another authenticating_tenant = kwargs.pop("tenant_id", None) or self._auth_record.tenant_id @@ -118,7 +118,7 @@ def _initialize(self): return if not self._cache and self.supported(): - allow_unencrypted = self._client_kwargs.get("_allow_unencrypted_cache", True) + allow_unencrypted = self._client_kwargs.get("allow_unencrypted_cache", False) try: self._cache = load_user_cache(allow_unencrypted) except Exception: # pylint:disable=broad-except diff --git a/sdk/identity/azure-identity/azure/identity/_version.py b/sdk/identity/azure-identity/azure/identity/_version.py index a5b3f7bf1cb26..f336d90e0fae3 100644 --- a/sdk/identity/azure-identity/azure/identity/_version.py +++ b/sdk/identity/azure-identity/azure/identity/_version.py @@ -2,4 +2,4 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -VERSION = "1.4.1" +VERSION = "1.5.0b1" diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/app_service.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/app_service.py new file mode 100644 index 0000000000000..7cfc40a0b1812 --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/app_service.py @@ -0,0 +1,45 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from typing import TYPE_CHECKING + +from .._internal import AsyncContextManager +from .._internal.managed_identity_client import AsyncManagedIdentityClient +from .._internal.get_token_mixin import GetTokenMixin +from ... import CredentialUnavailableError +from ..._credentials.app_service import _get_client_args + +if TYPE_CHECKING: + from typing import Any, Optional + from azure.core.credentials import AccessToken + + +class AppServiceCredential(AsyncContextManager, GetTokenMixin): + def __init__(self, **kwargs: "Any") -> None: + super(AppServiceCredential, self).__init__() + + client_args = _get_client_args(**kwargs) + if client_args: + self._client = AsyncManagedIdentityClient(**client_args) + else: + self._client = None + + async def get_token( # pylint:disable=invalid-overridden-method + self, *scopes: str, **kwargs: "Any" + ) -> "AccessToken": + if not self._client: + raise CredentialUnavailableError( + message="App Service managed identity configuration not found in environment" + ) + + return await super().get_token(*scopes, **kwargs) + + async def close(self) -> None: + await self._client.close() # pylint:disable=no-member + + async def _acquire_token_silently(self, *scopes: str) -> "Optional[AccessToken]": + return self._client.get_cached_token(*scopes) + + async def _request_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": + return await self._client.request_token(*scopes, **kwargs) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/authorization_code.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/authorization_code.py index 2701716fe4d99..50f401866bf59 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/authorization_code.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/authorization_code.py @@ -5,8 +5,7 @@ from typing import TYPE_CHECKING from azure.core.exceptions import ClientAuthenticationError -from .base import AsyncCredentialBase -from .._internal import AadClient +from .._internal import AadClient, AsyncContextManager from .._internal.decorators import log_get_token_async if TYPE_CHECKING: @@ -15,7 +14,7 @@ from azure.core.credentials import AccessToken -class AuthorizationCodeCredential(AsyncCredentialBase): +class AuthorizationCodeCredential(AsyncContextManager): """Authenticates by redeeming an authorization code previously obtained from Azure Active Directory. See https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow for more information diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py index 00d348db648e0..984f73f9f3d2e 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py @@ -7,7 +7,7 @@ import os from azure.core.exceptions import ClientAuthenticationError -from .._credentials.base import AsyncCredentialBase +from .._internal import AsyncContextManager from .._internal.decorators import log_get_token_async from ... import CredentialUnavailableError from ..._credentials.azure_cli import ( @@ -22,7 +22,7 @@ from ..._internal import _scopes_to_resource -class AzureCliCredential(AsyncCredentialBase): +class AzureCliCredential(AsyncContextManager): """Authenticates by requesting a token from the Azure CLI. This requires previously logging in to Azure via "az login", and will use the CLI's currently logged in identity. diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/base.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/base.py deleted file mode 100644 index 3dbc1a3a7a680..0000000000000 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/base.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -import abc - - -class AsyncCredentialBase(abc.ABC): - @abc.abstractmethod - async def close(self): - pass - - async def __aenter__(self): - return self - - async def __aexit__(self, *args): - await self.close() - - @abc.abstractmethod - async def get_token(self, *scopes, **kwargs): - pass diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/certificate.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/certificate.py index 2842d32b918d7..33b1de86bff39 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/certificate.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/certificate.py @@ -4,8 +4,7 @@ # ------------------------------------ from typing import TYPE_CHECKING -from .base import AsyncCredentialBase -from .._internal import AadClient +from .._internal import AadClient, AsyncContextManager from .._internal.decorators import log_get_token_async from ..._internal import CertificateCredentialBase @@ -14,7 +13,7 @@ from azure.core.credentials import AccessToken -class CertificateCredential(CertificateCredentialBase, AsyncCredentialBase): +class CertificateCredential(CertificateCredentialBase, AsyncContextManager): """Authenticates as a service principal using a certificate. :param str tenant_id: ID of the service principal's tenant. Also called its 'directory' ID. diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/chained.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/chained.py index b20538d53e496..777b2d564c226 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/chained.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/chained.py @@ -7,7 +7,7 @@ from typing import TYPE_CHECKING from azure.core.exceptions import ClientAuthenticationError -from .base import AsyncCredentialBase +from .._internal import AsyncContextManager from ... import CredentialUnavailableError from ..._credentials.chained import _get_error_message @@ -19,7 +19,7 @@ _LOGGER = logging.getLogger(__name__) -class ChainedTokenCredential(AsyncCredentialBase): +class ChainedTokenCredential(AsyncContextManager): """A sequence of credentials that is itself a credential. Its :func:`get_token` method calls ``get_token`` on each credential in the sequence, in order, returning the first diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/client_secret.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/client_secret.py index 0f8c40cd1db49..75afa342f0ba1 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/client_secret.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/client_secret.py @@ -4,8 +4,7 @@ # ------------------------------------ from typing import TYPE_CHECKING -from .base import AsyncCredentialBase -from .._internal import AadClient +from .._internal import AadClient, AsyncContextManager from .._internal.decorators import log_get_token_async from ..._internal import ClientSecretCredentialBase @@ -14,7 +13,7 @@ from azure.core.credentials import AccessToken -class ClientSecretCredential(AsyncCredentialBase, ClientSecretCredentialBase): +class ClientSecretCredential(AsyncContextManager, ClientSecretCredentialBase): """Authenticates as a service principal using a client ID and client secret. :param str tenant_id: ID of the service principal's tenant. Also called its 'directory' ID. @@ -24,6 +23,10 @@ class ClientSecretCredential(AsyncCredentialBase, ClientSecretCredentialBase): :keyword str authority: Authority of an Azure Active Directory endpoint, for example 'login.microsoftonline.com', the authority for Azure Public Cloud (which is the default). :class:`~azure.identity.AzureAuthorityHosts` defines authorities for other clouds. + :keyword bool enable_persistent_cache: if True, the credential will store tokens in a persistent cache. Defaults to + False. + :keyword bool allow_unencrypted_cache: if True, the credential will fall back to a plaintext cache when encryption + is unavailable. Default to False. Has no effect when `enable_persistent_cache` is False. """ async def __aenter__(self): diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py index 30a9723df22dc..accee542a0930 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py @@ -50,6 +50,8 @@ class DefaultAzureCredential(ChainedTokenCredential): Defaults to **False**. :keyword bool exclude_shared_token_cache_credential: Whether to exclude the shared token cache. Defaults to **False**. + :keyword str managed_identity_client_id: The client ID of a user-assigned managed identity. Defaults to the value + of the environment variable AZURE_CLIENT_ID, if any. If not specified, a system-assigned identity will be used. :keyword str shared_cache_username: Preferred username for :class:`~azure.identity.SharedTokenCacheCredential`. Defaults to the value of environment variable AZURE_USERNAME, if any. :keyword str shared_cache_tenant_id: Preferred tenant for :class:`~azure.identity.SharedTokenCacheCredential`. @@ -67,6 +69,10 @@ def __init__(self, **kwargs: "Any") -> None: "shared_cache_tenant_id", os.environ.get(EnvironmentVariables.AZURE_TENANT_ID) ) + managed_identity_client_id = kwargs.pop( + "managed_identity_client_id", os.environ.get(EnvironmentVariables.AZURE_CLIENT_ID) + ) + vscode_tenant_id = kwargs.pop( "visual_studio_code_tenant_id", os.environ.get(EnvironmentVariables.AZURE_TENANT_ID) ) @@ -82,7 +88,7 @@ def __init__(self, **kwargs: "Any") -> None: credentials.append(EnvironmentCredential(authority=authority, **kwargs)) if not exclude_managed_identity_credential: credentials.append( - ManagedIdentityCredential(client_id=os.environ.get(EnvironmentVariables.AZURE_CLIENT_ID), **kwargs) + ManagedIdentityCredential(client_id=managed_identity_client_id, **kwargs) ) if not exclude_shared_token_cache_credential and SharedTokenCacheCredential.supported(): try: diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/environment.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/environment.py index 2599e54ee69ab..9de6f00225706 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/environment.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/environment.py @@ -10,9 +10,9 @@ from ... import CredentialUnavailableError from ..._constants import EnvironmentVariables +from .._internal import AsyncContextManager from .certificate import CertificateCredential from .client_secret import ClientSecretCredential -from .base import AsyncCredentialBase if TYPE_CHECKING: from typing import Any, Optional, Union @@ -21,7 +21,7 @@ _LOGGER = logging.getLogger(__name__) -class EnvironmentCredential(AsyncCredentialBase): +class EnvironmentCredential(AsyncContextManager): """A credential configured by environment variables. This credential is capable of authenticating as a service principal using a client secret or a certificate, or as diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/managed_identity.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/managed_identity.py index c3b5a95209085..762b29d0682eb 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/managed_identity.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/managed_identity.py @@ -11,8 +11,8 @@ from azure.core.exceptions import ClientAuthenticationError, HttpResponseError from azure.core.pipeline.policies import AsyncRetryPolicy -from .base import AsyncCredentialBase from .._authn_client import AsyncAuthnClient +from .._internal import AsyncContextManager from .._internal.decorators import log_get_token_async from ... import CredentialUnavailableError from ..._constants import Endpoints, EnvironmentVariables @@ -25,20 +25,38 @@ _LOGGER = logging.getLogger(__name__) -class ManagedIdentityCredential(AsyncCredentialBase): +class ManagedIdentityCredential(AsyncContextManager): """Authenticates with an Azure managed identity in any hosting environment which supports managed identities. This credential defaults to using a system-assigned identity. To configure a user-assigned identity, use one of the keyword arguments. :keyword str client_id: a user-assigned identity's client ID. This is supported in all hosting environments. + :keyword identity_config: a mapping ``{parameter_name: value}`` specifying a user-assigned identity by its object + or resource ID, for example ``{"object_id": "..."}``. Check the documentation for your hosting environment to + learn what values it expects. + :paramtype identity_config: Mapping[str, str] """ def __init__(self, **kwargs: "Any") -> None: self._credential = None - if os.environ.get(EnvironmentVariables.MSI_ENDPOINT): - _LOGGER.info("%s will use MSI", self.__class__.__name__) - self._credential = MsiCredential(**kwargs) + + if os.environ.get(EnvironmentVariables.IDENTITY_ENDPOINT) and os.environ.get( + EnvironmentVariables.IDENTITY_HEADER + ): + _LOGGER.info("%s will use App Service managed identity", self.__class__.__name__) + from .app_service import AppServiceCredential + + self._credential = AppServiceCredential(**kwargs) + elif os.environ.get(EnvironmentVariables.MSI_ENDPOINT): + if os.environ.get(EnvironmentVariables.MSI_SECRET): + _LOGGER.info("%s will use App Service managed identity", self.__class__.__name__) + from .app_service import AppServiceCredential + + self._credential = AppServiceCredential(**kwargs) + else: + _LOGGER.info("%s will use MSI", self.__class__.__name__) + self._credential = MsiCredential(**kwargs) else: _LOGGER.info("%s will use IMDS", self.__class__.__name__) self._credential = ImdsCredential(**kwargs) @@ -68,7 +86,7 @@ async def get_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": return await self._credential.get_token(*scopes, **kwargs) -class _AsyncManagedIdentityBase(_ManagedIdentityBase, AsyncCredentialBase): +class _AsyncManagedIdentityBase(_ManagedIdentityBase, AsyncContextManager): def __init__(self, endpoint: str, **kwargs: "Any") -> None: super().__init__(endpoint=endpoint, client_cls=AsyncAuthnClient, **kwargs) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/shared_cache.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/shared_cache.py index de2fd404fc779..08d898b15ae5c 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/shared_cache.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/shared_cache.py @@ -7,9 +7,9 @@ from ... import CredentialUnavailableError from ..._constants import AZURE_CLI_CLIENT_ID from ..._internal.shared_token_cache import NO_TOKEN, SharedTokenCacheBase +from .._internal import AsyncContextManager from .._internal.aad_client import AadClient from .._internal.decorators import log_get_token_async -from .base import AsyncCredentialBase if TYPE_CHECKING: from typing import Any @@ -17,7 +17,7 @@ from ..._internal.aad_client import AadClientBase -class SharedTokenCacheCredential(SharedTokenCacheBase, AsyncCredentialBase): +class SharedTokenCacheCredential(SharedTokenCacheBase, AsyncContextManager): """Authenticates using tokens in the local cache shared between Microsoft applications. :param str username: @@ -29,6 +29,10 @@ class SharedTokenCacheCredential(SharedTokenCacheBase, AsyncCredentialBase): defines authorities for other clouds. :keyword str tenant_id: an Azure Active Directory tenant ID. Used to select an account when the cache contains tokens for multiple identities. + :keyword AuthenticationRecord authentication_record: an authentication record returned by a user credential such as + :class:`DeviceCodeCredential` or :class:`InteractiveBrowserCredential` + :keyword bool allow_unencrypted_cache: if True, the credential will fall back to a plaintext cache when encryption + is unavailable. Defaults to False. """ async def __aenter__(self): diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/vscode.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/vscode.py index 23e91daa73e81..4043d54c0f1ed 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/vscode.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/vscode.py @@ -5,8 +5,8 @@ from typing import TYPE_CHECKING from ..._exceptions import CredentialUnavailableError -from .._credentials.base import AsyncCredentialBase from ..._constants import AZURE_VSCODE_CLIENT_ID +from .._internal import AsyncContextManager from .._internal.aad_client import AadClient from .._internal.decorators import log_get_token_async from ..._credentials.vscode import get_credentials @@ -17,7 +17,7 @@ from azure.core.credentials import AccessToken -class VisualStudioCodeCredential(AsyncCredentialBase): +class VisualStudioCodeCredential(AsyncContextManager): """Authenticates as the Azure user signed in to Visual Studio Code. :keyword str authority: Authority of an Azure Active Directory endpoint, for example 'login.microsoftonline.com', diff --git a/sdk/identity/azure-identity/azure/identity/aio/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/aio/_internal/__init__.py index 9653b45acab72..4f62d4a5e6a24 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_internal/__init__.py @@ -2,7 +2,22 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +import abc + from .aad_client import AadClient from .decorators import wrap_exceptions -__all__ = ["AadClient", "wrap_exceptions"] + +class AsyncContextManager(abc.ABC): + @abc.abstractmethod + async def close(self): + pass + + async def __aenter__(self): + return self + + async def __aexit__(self, *args): + await self.close() + + +__all__ = ["AadClient", "AsyncContextManager", "wrap_exceptions"] diff --git a/sdk/identity/azure-identity/azure/identity/aio/_internal/get_token_mixin.py b/sdk/identity/azure-identity/azure/identity/aio/_internal/get_token_mixin.py new file mode 100644 index 0000000000000..f4a06b6574ac1 --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/aio/_internal/get_token_mixin.py @@ -0,0 +1,74 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import abc +import logging +import time +from typing import TYPE_CHECKING + +from ..._constants import DEFAULT_REFRESH_OFFSET, DEFAULT_TOKEN_REFRESH_RETRY_DELAY + +if TYPE_CHECKING: + # pylint:disable=ungrouped-imports,unused-import + from typing import Any, Optional + from azure.core.credentials import AccessToken + +_LOGGER = logging.getLogger(__name__) + + +class GetTokenMixin(abc.ABC): + def __init__(self, *args: "Any", **kwargs: "Any") -> None: + self._last_request_time = 0 + super(GetTokenMixin, self).__init__(*args, **kwargs) + + @abc.abstractmethod + async def _acquire_token_silently(self, *scopes: str) -> "Optional[AccessToken]": + """Attempt to acquire an access token from a cache or by redeeming a refresh token""" + + @abc.abstractmethod + async def _request_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": + """Request an access token from the STS""" + + def _should_refresh(self, token: "AccessToken") -> bool: + now = int(time.time()) + if token.expires_on - now > DEFAULT_REFRESH_OFFSET: + return False + if now - self._last_request_time < DEFAULT_TOKEN_REFRESH_RETRY_DELAY: + return False + return True + + async def get_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": + """Request an access token for `scopes`. + + .. note:: This method is called by Azure SDK clients. It isn't intended for use in application code. + + :param str scopes: desired scopes for the access token. This method requires at least one scope. + :rtype: :class:`azure.core.credentials.AccessToken` + :raises CredentialUnavailableError: the credential is unable to attempt authentication because it lacks + required data, state, or platform support + :raises ~azure.core.exceptions.ClientAuthenticationError: authentication failed. The error's ``message`` + attribute gives a reason. + """ + if not scopes: + raise ValueError('"get_token" requires at least one scope') + + try: + token = await self._acquire_token_silently(*scopes) + if not token: + self._last_request_time = int(time.time()) + token = await self._request_token(*scopes) + elif self._should_refresh(token): + try: + self._last_request_time = int(time.time()) + token = await self._request_token(*scopes, **kwargs) + except Exception: # pylint:disable=broad-except + pass + _LOGGER.info("%s.get_token succeeded", self.__class__.__name__) + return token + + except Exception as ex: + _LOGGER.warning( + "%s.get_token failed: %s", self.__class__.__name__, ex, exc_info=_LOGGER.isEnabledFor(logging.DEBUG) + ) + raise diff --git a/sdk/identity/azure-identity/azure/identity/aio/_internal/managed_identity_client.py b/sdk/identity/azure-identity/azure/identity/aio/_internal/managed_identity_client.py new file mode 100644 index 0000000000000..8bd6450c09b95 --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/aio/_internal/managed_identity_client.py @@ -0,0 +1,63 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import time +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies import AsyncRetryPolicy + +from ..._internal import _scopes_to_resource +from ..._internal.managed_identity_client import ManagedIdentityClient, _get_policies + +if TYPE_CHECKING: + # pylint:disable=ungrouped-imports + from typing import Any, Callable, List, Optional, Union + from azure.core.credentials import AccessToken + from azure.core.pipeline.policies import AsyncHTTPPolicy, SansIOHTTPPolicy + from azure.core.pipeline.transport import HttpTransport, HttpRequest + + Policy = Union[AsyncHTTPPolicy, SansIOHTTPPolicy] + + +# pylint:disable=async-client-bad-name,missing-client-constructor-parameter-credential +class AsyncManagedIdentityClient(ManagedIdentityClient): + def __init__(self, request_factory: "Callable[[str, dict], HttpRequest]", **kwargs: "Any") -> None: + config = _get_configuration(**kwargs) + super().__init__(request_factory, _config=config, **kwargs) + + async def close(self) -> None: + await self._pipeline.__aexit__() + + async def request_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": + # pylint:disable=invalid-overridden-method,unused-argument + resource = _scopes_to_resource(*scopes) + request = self._request_factory(resource, self._identity_config) + request_time = int(time.time()) + response = await self._pipeline.run(request) + token = self._process_response(response, request_time) + return token + + def _build_pipeline( + self, + config: Configuration, + policies: "Optional[List[Policy]]" = None, + transport: "Optional[HttpTransport]" = None, + **kwargs: "Any" + ) -> AsyncPipeline: + if policies is None: # [] is a valid policy list + policies = _get_policies(config, **kwargs) + if not transport: + from azure.core.pipeline.transport import AioHttpTransport + + transport = AioHttpTransport(**kwargs) + + return AsyncPipeline(transport=transport, policies=policies) + + +def _get_configuration(**kwargs: "Any") -> Configuration: + config = Configuration() + config.retry_policy = AsyncRetryPolicy(**kwargs) + return config diff --git a/sdk/identity/azure-identity/samples/README.md b/sdk/identity/azure-identity/samples/README.md new file mode 100644 index 0000000000000..35a9cd502650a --- /dev/null +++ b/sdk/identity/azure-identity/samples/README.md @@ -0,0 +1,37 @@ +--- +page_type: sample +languages: + - python +products: + - azure + - azure-identity +urlFragment: identity-samples +--- + +# Azure Identity Library Python Samples + +## Prerequisites + +You must have an [Azure subscription](https://azure.microsoft.com/free) and an +[Azure Key Vault](https://azure.microsoft.com/en-us/services/key-vault/) to run +these samples. You can create a Key Vault in the +[Azure Portal](https://portal.azure.com/#create/Microsoft.KeyVault) or with the +[Azure CLI](https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-cli). + +Azure Key Vault is used only to demonstrate authentication. Azure Identity has +the same API for all compatible client libraries. + +## Setup + +To run these samples, first install the Azure Identity and Key Vault Secrets +client libraries: + +```commandline +pip install azure-identity azure-keyvault-secrets +``` + +## Contents +| File | Description | +|-------------|-------------| +| control_interactive_prompts.py | demonstrates controlling when interactive credentials prompt for user interaction | +| user_authentication.py | demonstrates user authentication API for applications | diff --git a/sdk/identity/azure-identity/samples/control_interactive_prompts.py b/sdk/identity/azure-identity/samples/control_interactive_prompts.py new file mode 100644 index 0000000000000..10dabf65e9d2c --- /dev/null +++ b/sdk/identity/azure-identity/samples/control_interactive_prompts.py @@ -0,0 +1,38 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Demonstrates controlling the timing of interactive authentication using InteractiveBrowserCredential. + +DeviceCodeCredential supports the same API. +""" + +import os +import sys +from azure.identity import AuthenticationRequiredError, InteractiveBrowserCredential +from azure.keyvault.secrets import SecretClient + + +# This sample uses Key Vault only for demonstration. Any client accepting azure-identity credentials will work the same. +VAULT_URL = os.environ.get("VAULT_URL") +if not VAULT_URL: + print("This sample expects environment variable 'VAULT_URL' to be set with the URL of a Key Vault.") + sys.exit(1) + + +# If it's important for your application to prompt for authentication only at certain times, +# create the credential with disable_automatic_authentication=True. This configures the credential to raise +# when interactive authentication is required, instead of immediately beginning that authentication. +credential = InteractiveBrowserCredential(disable_automatic_authentication=True) +client = SecretClient(VAULT_URL, credential) + +try: + secret_names = [s.name for s in client.list_properties_of_secrets()] +except AuthenticationRequiredError as ex: + # Interactive authentication is necessary to authorize the client's request. The exception carries the + # requested authentication scopes. If you pass these to 'authenticate', it will cache an access token + # for those scopes. + credential.authenticate(scopes=ex.scopes) + +# the client operation should now succeed +secret_names = [s.name for s in client.list_properties_of_secrets()] diff --git a/sdk/identity/azure-identity/samples/user_authentication.py b/sdk/identity/azure-identity/samples/user_authentication.py new file mode 100644 index 0000000000000..2c21c2a449736 --- /dev/null +++ b/sdk/identity/azure-identity/samples/user_authentication.py @@ -0,0 +1,43 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Demonstrates user authentication using InteractiveBrowserCredential. DeviceCodeCredential supports the same API.""" + +import os +import sys +from azure.identity import AuthenticationRecord, InteractiveBrowserCredential +from azure.keyvault.secrets import SecretClient + + +# This sample uses Key Vault only for demonstration. Any client accepting azure-identity credentials will work the same. +VAULT_URL = os.environ.get("VAULT_URL") +if not VAULT_URL: + print("This sample expects environment variable 'VAULT_URL' to be set with the URL of a Key Vault.") + sys.exit(1) + + +# Persistent caching is optional. By default, interactive credentials cache in memory only. +credential = InteractiveBrowserCredential(enable_persistent_cache=True) + +# The 'authenticate' method begins interactive authentication. Call it whenever it's convenient +# for your application to authenticate a user. It returns a record of the authentication. +record = credential.authenticate() + +# The record contains no authentication secrets. You can serialize it to JSON for storage. +record_json = record.serialize() + +# An authenticated credential is ready for use with a client. This request should succeed +# without prompting for authentication again. +client = SecretClient(VAULT_URL, credential) +secret_names = [s.name for s in client.list_properties_of_secrets()] + +# With persistent caching enabled, an authentication record stored by your application enables +# credentials to access data from past authentications. If the cache contains sufficient data, +# this eliminates the need for your application to prompt for authentication every time it runs. +deserialized_record = AuthenticationRecord.deserialize(record_json) +new_credential = InteractiveBrowserCredential(enable_persistent_cache=True, authentication_record=deserialized_record) + +# This request should also succeed without prompting for authentication. +client = SecretClient(VAULT_URL, new_credential) +secret_names = [s.name for s in client.list_properties_of_secrets()] diff --git a/sdk/identity/azure-identity/setup.py b/sdk/identity/azure-identity/setup.py index 4b209061a7711..2cde1bc35a0cf 100644 --- a/sdk/identity/azure-identity/setup.py +++ b/sdk/identity/azure-identity/setup.py @@ -51,7 +51,7 @@ author_email="azpysdkhelp@microsoft.com", url="https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity", classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", @@ -73,7 +73,7 @@ install_requires=[ "azure-core<2.0.0,>=1.0.0", "cryptography>=2.1.4", - "msal<2.0.0,>=1.3.0", + "msal<1.5.0,>=1.3.0", "msal-extensions~=0.2.2", "six>=1.6", ], diff --git a/sdk/identity/azure-identity/tests/azure-functions/readme.md b/sdk/identity/azure-identity/tests/azure-functions/readme.md index 5e94818320755..8367fc59bd675 100644 --- a/sdk/identity/azure-identity/tests/azure-functions/readme.md +++ b/sdk/identity/azure-identity/tests/azure-functions/readme.md @@ -4,7 +4,7 @@ This directory contains artifacts for testing azure-identity in Azure Functions. # prerequisite tools - Azure CLI - Azure Functions Core Tools 3.x - - https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?#v2 + - https://docs.microsoft.com/azure/azure-functions/functions-run-local?#v2 - Docker CLI - https://hub.docker.com/search?q=&type=edition&offering=community @@ -127,7 +127,7 @@ az functionapp config appsettings set -g $RESOURCE_GROUP -n $FUNCTION_APP_USER_A At the time of writing, attaching user-assigned identities is impossible through the Azure CLI ([Azure/azure-cli#9887](https://github.com/Azure/azure-cli/issues/9887)). Use the Azure Portal to attached the managed identity created above to the Functions App (see -[App Service documentation](https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=dotnet#adding-a-user-assigned-identity)). +[App Service documentation](https://docs.microsoft.com/azure/app-service/overview-managed-identity?tabs=dotnet#adding-a-user-assigned-identity)). # build the Docker image diff --git a/sdk/identity/azure-identity/tests/certificate.pem b/sdk/identity/azure-identity/tests/certificate.pem index 4b66bfa021a05..08761c05f2a0b 100644 --- a/sdk/identity/azure-identity/tests/certificate.pem +++ b/sdk/identity/azure-identity/tests/certificate.pem @@ -1,49 +1,81 @@ ------BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDL1hG+JYCfIPp3 -tlZ05J4pYIJ3Ckfs432bE3rYuWlR2w9KqdjWkKxuAxpjJ+T+uoqVaT3BFMfi4ZRY -OCI69s4+lP3DwR8uBCp9xyVkF8thXfS3iui0liGDviVBoBJJWvjDFU8a/Hseg+Qf -oxAb6tx0kEc7V3ozBLWoIDJjfwJ3NdsLZGVtAC34qCWeEIvS97CDA4g3Kc6hYJIr -Aa7pxHzo/Nd0U3e7z+DlBcJV7dY6TZUyjBVTpzppWe+XQEOfKsjkDNykHEC1C1bC -lG0u7unS7QOBMd6bOGkeL+Bc+n22slTzs5amsbDLNuobSaUsFt9vgD5jRD6FwhpX -wj/Ek0F7AgMBAAECggEAblU3UWdXUcs2CCqIbcl52wfEVs8X05/n01MeAcWKvqYG -hvGcz7eLvhir5dQoXcF3VhybMrIe6C4WcBIiZSxGwxU+rwEP8YaLwX1UPfOrQM7s -sZTdFTLWfUslO3p7q300fdRA92iG9COMDZvkElh0cBvQksxs9sSr149l9vk+ymtC -uBhZtHG6Ki0BIMBNC9jGUqDuOatXl/dkK4tNjXrNJT7tVwzPaqnNALIWl6B+k9oQ -m1oNhSH2rvs9tw2ITXfIoIk9KdOMjQVUD43wKOaz0hNZhUsb1OFuls7UtRzaFcZH -rMd/M8DtA104QTTlHK+XS7r+nqdv7+ZyB+suTdM+oQKBgQDxCrJZU3hJ0eJ4VYhK -xGDfVGNpYxNkQ4CDB9fwRNbFr/Ck3kgzfE9QxTx1pJOolVmfuFmk9B86in4UNy91 -KdaqT79AU5RdOBXNN6tuMbLC0AVqe8sZq+1vWVVwbCstffxEMmyW1Ju/FLYPl2Zp -e5P96dBh5B3mXrQtpDJ0RkxxaQKBgQDYfE6tQQnQSs2ewD6ae8Mu6j8ueDlVoZ37 -vze1QdBasR26xu2H8XBt3u41zc524BwQsB1GE1tnC8ZylrqwVEayK4FesSQRCO6o -yK8QSdb06I5J4TaN+TppCDPLzstOh0Dmxp+iFUGoErb7AEOLAJ/VebhF9kBZObL/ -HYy4Es+bQwKBgHW/4vYuB3IQXNCp/+V+X1BZ+iJOaves3gekekF+b2itFSKFD8JO -9LQhVfKmTheptdmHhgtF0keXxhV8C+vxX1Ndl7EF41FSh5vzmQRAtPHkCvFEviex -TFD70/gSb1lO1UA/Xbqk69yBcprVPAtFejss0EYx2MVj+CLftmIEwW0ZAoGBAIMG -EVQ45eikLXjkn78+Iq7VZbIJX6IdNBH29I+GqsUJJ5Yw6fh6P3KwF3qG+mvmTfYn -sUAFXS+r58rYwVsRVsxlGmKmUc7hmhibhaEVH72QtvWuEiexbRG+viKfIVuA7t39 -3wXpWZiQ4yBdU4Pgt9wrVEU7ukyGaHiReOa7s90jAoGAJc0K7smn98YutQQ+g2ur -ybfnsl0YdsksaP2S2zvZUmNevKPrgnaIDDabOlhYYga+AK1G3FQ7/nefUgiIg1Nd -kr+T6Q4osS3xHB6Az9p/jaF4R2KaWN2nNVCn7ecsmPxDdM7k1vLxaT26vwO9OP5f -YU/5CeIzrfA5nQyPZkOXZBk= ------END PRIVATE KEY----- +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAunkGHWyBYbIp6G97dwFeMhB/7c/y1SPlABi6cUJ6hp7gFeRm +Nwl4gDvBmY8e8t6ANQxn3vv3HOp/QZmFl7Cr8aSjvD0JAT2CBbQ/O/Lgzb+5FaGR +vBFbBJ4AcXeHnzJ4ilsCrTJXtIWfo497uAHePQ7F3AtC9vLlf3kOoc7EIkdJ00Cf ++EKjTbU4UhgBUq+zqPMc8QTUyYXvgb8AxPCTJAktL9tiVpsthmK0SsOEZUiscL/U +Ga/N4EonCklD1AAgWHye0bl0kDhzjJSHAuKBrQ6zLIRs6+9OB6Pg4gcmH+Rup5H2 +dSO09N/YBCiiJZTSlqockB3oym2t5z9et2SiNwIDAQABAoIBAQCKzivPG0X0AztO +2i19mHcVrVKNI44POnjsaXvfcyzhqMIFic7MiTA5xEGInRDcmOO2mVV4lvaLf8La +gfz/vXNAnN2E8aoSUkbHGDU52sGcZmrPv0VMSV8HQNXzoJZD2r3/v19urVq79fuv +NM9TWZCkwqpl8bwXNxe+m85YhCFboY9G543qmuXzKAQLoSupT0e4eIo2IGp7eJYK +5J/wtlEumUdhsKo1ajLojDgsgPKfrCyvsmO+bj1dRKGXVLO2SL2pFVCjjHF4SP3q +1WX39beu61Zu+kGthDgj5muHgH06FtnWoHLIUrRmYpM+ezCxQHdRWz7AYjheeE7q +QqJv1PqBAoGBAOlb/gzsps+rInE+LQoEzVj8osILI4NxIpNc6+iG81dEi+zQABX/ +bHV6hXGGceozVcX4B+V7f08PlZIAgM3IDqfy0fH2pwEQahJ8a3MwzCgR66RxYlkX +E8czkoz0pcHW58FnLLlWXpHRALTtqoPP5LnWs0SmoNvcHZ9yjJ6tvpRlAoGBAMyQ +fytsyla1ujO0l/kuLFG7gndeOc96SutH3V17lZ1pN0efHyk2aglOnl6YsdPKLZvZ +3ghj01HV0Q0f//xpftduuA7gdgDzSG1irXsxEidfVxX7RsPxX6cx8dhYnuk5rz5E +XyTko7zTpr+A4XMnq6+JNSSCIE+CVYcYf/hyemxrAoGAeC9py4xCaWgxR/OGzMcm +X3NV++wysSqebRkJYuvF/icOjbuen7W6TVL50Ts2BjHENj6FCpqtObHEDbr2m4Uy +jysPF7g50OF8T+MGkAAM1YJNQ5cl2M564DhefPwvNoMRP1l8/kNOV3k2DPjuvg5f +NZsvHudWp4VZOFqNs9e19MUCgYAjewCDoKfrqDN2mmEtmAOZ3YMAfzhZsyVhb6KG +f1Pw7HnpE0FNXaHAoYE4eRWG3W9Rs9Ud8WqKrCJJO36j4gxdA1grRGVTPt8WEeJz +FozGhXPOXTnl7GyhzDjdRGmznAy4KRWziXCY5MDsQEdaOMw/cvXjsio2gC2jc+1m +QzzWpwKBgHzszJ5s6vcWElox4Yc1elQ8xniPpo3RtfXZOLX8xA4eR9yQawah1zd6 +ChfeYbHVfq007s+RWGTb+KYQ6ic9nkW464qmVxHGBatUo9+MR4Gk8blANoAfHxdV +g6JNgT2kIGu9IEwoD6XQldC/v24bvFSesyGRHNdI4mUG+hhU4aNw +-----END RSA PRIVATE KEY----- -----BEGIN CERTIFICATE----- -MIIDazCCAlOgAwIBAgIUF2VIP4+AnEtb52KTCHbo4+fESfswDQYJKoZIhvcNAQEL -BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM -GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0xOTEwMzAyMjQ2MjBaFw0yMjA4 -MTkyMjQ2MjBaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw -HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB -AQUAA4IBDwAwggEKAoIBAQDL1hG+JYCfIPp3tlZ05J4pYIJ3Ckfs432bE3rYuWlR -2w9KqdjWkKxuAxpjJ+T+uoqVaT3BFMfi4ZRYOCI69s4+lP3DwR8uBCp9xyVkF8th -XfS3iui0liGDviVBoBJJWvjDFU8a/Hseg+QfoxAb6tx0kEc7V3ozBLWoIDJjfwJ3 -NdsLZGVtAC34qCWeEIvS97CDA4g3Kc6hYJIrAa7pxHzo/Nd0U3e7z+DlBcJV7dY6 -TZUyjBVTpzppWe+XQEOfKsjkDNykHEC1C1bClG0u7unS7QOBMd6bOGkeL+Bc+n22 -slTzs5amsbDLNuobSaUsFt9vgD5jRD6FwhpXwj/Ek0F7AgMBAAGjUzBRMB0GA1Ud -DgQWBBT6Mf9uXFB67bY2PeW3GCTKfkO7vDAfBgNVHSMEGDAWgBT6Mf9uXFB67bY2 -PeW3GCTKfkO7vDAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCZ -1+kTISX85v9/ag7glavaPFUYsOSOOofl8gSzov7L01YL+srq7tXdvZmWrjQ/dnOY -h18rp9rb24vwIYxNioNG/M2cW1jBJwEGsDPOwdPV1VPcRmmUJW9kY130gRHBCd/N -qB7dIkcQnpNsxPIIWI+sRQp73U0ijhOByDnCNHLHon6vbfFTwkO1XggmV5BdZ3uQ -JNJyckILyNzlhmf6zhonMp4lVzkgxWsAm2vgdawd6dmBa+7Avb2QK9s+IdUSutFh -DgW2L12Obgh12Y4sf1iKQXA0RbZ2k+XQIz8EKZa7vJQY0ciYXSgB/BV3a96xX3cx -LIPL8Vam8Ytkopi3gsGA ------END CERTIFICATE----- \ No newline at end of file +MIID7zCCAdcCAQEwDQYJKoZIhvcNAQEFBQAwPjELMAkGA1UEBhMCVVMxDDAKBgNV +BAoMA3h5ejEMMAoGA1UECwwDYWJjMRMwEQYDVQQDDApJTlRFUklNLUNOMCAXDTIw +MDgyMTE3MTA0M1oYDzMzODkwODA0MTcxMDQzWjA7MQswCQYDVQQGEwJVUzEMMAoG +A1UECgwDeHl6MQwwCgYDVQQLDANhYmMxEDAOBgNVBAMMB1VTRVItQ04wggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6eQYdbIFhsinob3t3AV4yEH/tz/LV +I+UAGLpxQnqGnuAV5GY3CXiAO8GZjx7y3oA1DGfe+/cc6n9BmYWXsKvxpKO8PQkB +PYIFtD878uDNv7kVoZG8EVsEngBxd4efMniKWwKtMle0hZ+jj3u4Ad49DsXcC0L2 +8uV/eQ6hzsQiR0nTQJ/4QqNNtThSGAFSr7Oo8xzxBNTJhe+BvwDE8JMkCS0v22JW +my2GYrRKw4RlSKxwv9QZr83gSicKSUPUACBYfJ7RuXSQOHOMlIcC4oGtDrMshGzr +704Ho+DiByYf5G6nkfZ1I7T039gEKKIllNKWqhyQHejKba3nP163ZKI3AgMBAAEw +DQYJKoZIhvcNAQEFBQADggIBADfitSfjlYa2inBKlpWN8VT0DPm5uw8EHuwLymCM +WYrQMCuQVE2xYoqCSmXj6KLFt8ycgxHsthdkAzXxDhawaKjz2UFp6nszmUA4xfvS +mxLSajwzK/KMBkjdFL7TM+TTBJ1bleDbmoJvDiUeQwisbb1Uh8b3v/jpBwoiamm8 +Y4Ca5A15SeBUvAt0/Mc4XJfZ/Ts+LBAPevI9ZyU7C5JZky1q41KPklEHfFZKQRfP +cTyTYYvlPoq57C8XPDs6r50EV3B6Z8MN21OB6MVGi8BOY/c7a2h1ZOhxNyBnJuQX +w4meJthoKcHUnAs8YCrEoQKayMqPH0Vdhaii/gx4jAgh4PNyIZz5cAst+ybPtQj4 +i7LFEWjxis+NLQMHhyE4fIGIkEjzU0uGDugifheIwKALqYEgMDrcoolwvGMdPxGo +Qps7tkad5vZV9d9+tTbI+DMB16Y51S04/u1dGFz3jSrDVF08PznJc99VB69OReiC +K17n8Xyox/VAaYsRFbOAJpLRWwcnotDpFQbgiLrmXxNOoiWPNbQsQzaQx7cR9okQ +v5RTpFAkrdjadhMsXFFiQh+axlaGD368ZGAj5ZoyOiXkV88tNCtyP/RDgW5ftQQ7 +fdv05bNXhDfLgEgQvVSDfClDL1hKukLmLQS3ILfB4FlM/XmE+FW/qgo9aSx2XIbx +E4ie +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFGTCCAwGgAwIBAgIUBpOlpNN/cgasvozVw6mfa04+ZC0wDQYJKoZIhvcNAQEL +BQAwOzELMAkGA1UEBhMCVVMxDDAKBgNVBAoMA3h6eTEMMAoGA1UECwwDYWJjMRAw +DgYDVQQDDAdST09ULUNOMCAXDTIwMDgyMTE3MTAyNVoYDzMzODkwODA0MTcxMDI1 +WjA+MQswCQYDVQQGEwJVUzEMMAoGA1UECgwDeHl6MQwwCgYDVQQLDANhYmMxEzAR +BgNVBAMMCklOVEVSSU0tQ04wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQCr+Tblr4DhX3Xahbei00OJnUgRw6FMsnyROZ170Lx0YNcOrRJ9PuaOZiYXY2Hm +t71o/PZjMtmiYMIxFaiMnql/dCca777l+uBmlwFOR8bquBWiLStmPpvf7Kh5GZNw +XvLGAhk/oxG0O9Pa3OfrlD5vrn/UEGJBu0C+c6ZSLyRk8RjAh8ZbUvnDhhQw3PoK +MQSmFK8BN8X34elu7kq0j7nS0D6Mt7eS40oYeHEaQDdBGl8f7rcqC3RjJ/b/F9wA ++CsKaps6TvpxE7ln9Y3+0yscgeRbyHW0zem6U7MMvVnK/znuNY90Wmajbea7SUj6 +nGZpLGS1TqS4H5rn9U1N1WCSyFukTpAQLCPQHeUrSiHKa9Ye5KuC6u2ZXgy0qpGj +nMLu+7746wemi7jN06yZjEmDVneMNCxjLYs4ZhuhiTEItlZpR0VBugNbKo2mJw2U +UesizB3AzQkqGOKp70y74yC+ykLkR5vRNyY3MENJ+W83U1haS7C1rhqFV4eXflVe +EHl8tj7p4KrfhSPr0Rd12UIWDXkYUpCAPlDMdEa9+SDAyuSnkN4P1fAeuzG01jeJ +bnsrWgs3gH3KaGBcPTV4tOTavilGNYDvHZbN9XpYZoZQoPrDZc61M5Ol/cxBahkO +n4aDyhpx5hHnSs7VQuHnjeMUxt3J5HqrXPvaf6uPYNT8KQIDAQABoxAwDjAMBgNV +HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQCHCxFqJwfVMI9kMvwlj+sxd4Q5 +KuyWxlXRfzpYZ/6JCUq7VBceRVJ87KytMNCyq61rd3Jhb8ssoMCENB68HYhIFUGz +GR92AAc6LTh2Y3vQAg640Cz2vLCGnqnlbIslYV6fzxYqgSopR5wJ4D/kJ9w7NSrC +paN6bS8Olv//tN6RSnvEMJZdXFA40xFin6qT8Op3nrysEE7Z84wPG9Wj2DXskX6v +bZenCEgl1/Ezif5IEgJcYdRkXtYPp6JNbVV+KjDTIMEaUVMpGMGefrt22E+4nSa3 +qFvcbzYEKeANe9IAxdPzeWiQ2U90PqWFYCA9sOVsrlSwrup+yYXl0yhTxKY67NCX +gyVtZRnzawv0AVFsfCOT4V0wJSuUz4BV6sH7kl2C7FW3zqYVdFEDigbUNsEEh/jF +3JiAtgNbpJ8TtiCFrCI4g9Jepa3polVPzDD8mLtkWWnfSBN/28cxa2jiUlfQxB39 +kyqu4rWbm01lyucJxVgJzH0SGyEM5OvF/OIOU3Q7UIXEcZSX3m4Xo59+v6ZNDwKL +PcFDNK+PL3WNYfdexQCSAbLm1gkUrVIqvidpCSSVv5oWwTM5m7rbA16Hlu4Ea2ep +Pl7I9YXXXnIEFqLYZDnCJglcXmlt6OjI8D3w0TRWHb6bFqubDP417sJDX1S6udN5 +wOnOIqg0ZZcqfvpxXA== +-----END CERTIFICATE----- diff --git a/sdk/identity/azure-identity/tests/helpers.py b/sdk/identity/azure-identity/tests/helpers.py index c9fcd6e941084..1bac8aaceeddb 100644 --- a/sdk/identity/azure-identity/tests/helpers.py +++ b/sdk/identity/azure-identity/tests/helpers.py @@ -14,35 +14,33 @@ import mock # type: ignore -# build_* lifted from msal tests def build_id_token( iss="issuer", sub="subject", - aud="my_client_id", + aud="client-id", username="username", - tenant_id="tenant id", - object_id="object id", - exp=None, - iat=None, + tenant_id="tenant-id", + object_id="object-id", **claims -): # AAD issues "preferred_username", ADFS issues "upn" - return "header.%s.signature" % base64.b64encode( - json.dumps( - dict( - { - "iss": iss, - "sub": sub, - "aud": aud, - "exp": exp or (time.time() + 100), - "iat": iat or time.time(), - "tid": tenant_id, - "oid": object_id, - "preferred_username": username, - }, - **claims - ) - ).encode() - ).decode("utf-8") +): + token_claims = id_token_claims( + iss=iss, sub=sub, aud=aud, tid=tenant_id, oid=object_id, preferred_username=username, **claims + ) + jwt_payload = base64.b64encode(json.dumps(token_claims).encode()).decode("utf-8") + return "header.{}.signature".format(jwt_payload) + + +def build_adfs_id_token(iss="issuer", sub="subject", aud="client-id", username="username", **claims): + token_claims = id_token_claims(iss=iss, sub=sub, aud=aud, upn=username, **claims) + jwt_payload = base64.b64encode(json.dumps(token_claims).encode()).decode("utf-8") + return "header.{}.signature".format(jwt_payload) + + +def id_token_claims(iss, sub, aud, exp=None, iat=None, **claims): + return dict( + {"iss": iss, "sub": sub, "aud": aud, "exp": exp or int(time.time()) + 3600, "iat": iat or int(time.time())}, + **claims + ) def build_aad_response( # simulate a response from AAD @@ -55,6 +53,7 @@ def build_aad_response( # simulate a response from AAD foci=None, id_token=None, # or something generated by build_id_token() error=None, + **kwargs ): response = {} if uid and utid: # Mimic the AAD behavior for "client_info=1" request @@ -69,6 +68,7 @@ def build_aad_response( # simulate a response from AAD response["id_token"] = id_token if foci: response["foci"] = foci + response.update(kwargs) return response @@ -154,7 +154,9 @@ def mock_response(status_code=200, headers=None, json_payload=None): def get_discovery_response(endpoint="https://a/b"): aad_metadata_endpoint_names = ("authorization_endpoint", "token_endpoint", "tenant_discovery_endpoint") - return mock_response(json_payload={name: endpoint for name in aad_metadata_endpoint_names}) + payload = {name: endpoint for name in aad_metadata_endpoint_names} + payload["metadata"] = "" + return mock_response(json_payload=payload) def validating_transport(requests, responses): @@ -175,6 +177,11 @@ def validate_request(request, **_): return mock.Mock(send=mock.Mock(wraps=validate_request)) +def msal_validating_transport(requests, responses, **kwargs): + """a validating transport with default responses to MSAL's discovery requests""" + return validating_transport([Request()] * 2 + requests, [get_discovery_response(**kwargs)] * 2 + responses) + + def urlsafeb64_decode(s): if isinstance(s, six.text_type): s = s.encode("ascii") 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 9ac6684abc31f..730aef2f152fc 100644 --- a/sdk/identity/azure-identity/tests/managed-identity-live/appservice.md +++ b/sdk/identity/azure-identity/tests/managed-identity-live/appservice.md @@ -123,7 +123,7 @@ az webapp config appsettings set -g $RESOURCE_GROUP -n $WEB_APP_USER_ASSIGNED \ At the time of writing, attaching user-assigned identities is impossible through the Azure CLI ([Azure/azure-cli#9887](https://github.com/Azure/azure-cli/issues/9887)). Use the Azure Portal to attached the managed identity created above to the Web App (see -[App Service documentation](https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=dotnet#adding-a-user-assigned-identity)). +[App Service documentation](https://docs.microsoft.com/azure/app-service/overview-managed-identity?tabs=dotnet#adding-a-user-assigned-identity)). ## Build the Docker image diff --git a/sdk/identity/azure-identity/tests/pod-identity/readme.md b/sdk/identity/azure-identity/tests/pod-identity/readme.md index bcfd697905caa..272968efd80c9 100644 --- a/sdk/identity/azure-identity/tests/pod-identity/readme.md +++ b/sdk/identity/azure-identity/tests/pod-identity/readme.md @@ -2,7 +2,7 @@ # prerequisite tools - Azure CLI - - https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest + - https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest - Docker CLI - https://hub.docker.com/search?q=&type=edition&offering=community - Helm 2.x (3.x doesn't handle CRDs properly at time of writing) diff --git a/sdk/identity/azure-identity/tests/test_auth_record.py b/sdk/identity/azure-identity/tests/test_auth_record.py index 5b4ec83d6da28..5daef9c5dec46 100644 --- a/sdk/identity/azure-identity/tests/test_auth_record.py +++ b/sdk/identity/azure-identity/tests/test_auth_record.py @@ -4,7 +4,7 @@ # ------------------------------------ import json -from azure.identity._auth_record import AuthenticationRecord +from azure.identity import AuthenticationRecord def test_serialization(): diff --git a/sdk/identity/azure-identity/tests/test_browser_credential.py b/sdk/identity/azure-identity/tests/test_browser_credential.py index c8d4e9e7fef2e..cedcdfa614740 100644 --- a/sdk/identity/azure-identity/tests/test_browser_credential.py +++ b/sdk/identity/azure-identity/tests/test_browser_credential.py @@ -10,8 +10,7 @@ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline.policies import SansIOHTTPPolicy -from azure.identity import CredentialUnavailableError, InteractiveBrowserCredential -from azure.identity._exceptions import AuthenticationRequiredError +from azure.identity import AuthenticationRequiredError, CredentialUnavailableError, InteractiveBrowserCredential from azure.identity._internal import AuthCodeRedirectServer from azure.identity._internal.user_agent import USER_AGENT from msal import TokenCache @@ -23,14 +22,15 @@ build_id_token, get_discovery_response, mock_response, + msal_validating_transport, Request, validating_transport, ) try: - from unittest.mock import Mock, patch + from unittest.mock import ANY, Mock, patch except ImportError: # python < 3.3 - from mock import Mock, patch # type: ignore + from mock import ANY, Mock, patch # type: ignore WEBBROWSER_OPEN = InteractiveBrowserCredential.__module__ + ".webbrowser.open" @@ -78,11 +78,11 @@ def test_authenticate(): _cache=TokenCache(), authority=environment, client_id=client_id, - server_class=server_class, + _server_class=server_class, tenant_id=tenant_id, transport=transport, ) - record = credential._authenticate(scopes=(scope,)) + record = credential.authenticate(scopes=(scope,)) assert record.authority == environment assert record.home_account_id == object_id + "." + home_tenant @@ -101,7 +101,7 @@ def test_disable_automatic_authentication(): empty_cache = TokenCache() # empty cache makes silent auth impossible transport = Mock(send=Mock(side_effect=Exception("no request should be sent"))) credential = InteractiveBrowserCredential( - _disable_automatic_authentication=True, transport=transport, _cache=empty_cache + disable_automatic_authentication=True, transport=transport, _cache=empty_cache ) with patch(WEBBROWSER_OPEN, Mock(side_effect=Exception("credential shouldn't try interactive authentication"))): @@ -112,10 +112,13 @@ def test_disable_automatic_authentication(): @patch("azure.identity._credentials.browser.webbrowser.open", lambda _: True) def test_policies_configurable(): policy = Mock(spec_set=SansIOHTTPPolicy, on_request=Mock()) - + client_id = "client-id" transport = validating_transport( requests=[Request()] * 2, - responses=[get_discovery_response(), mock_response(json_payload=build_aad_response(access_token="**"))], + responses=[ + get_discovery_response(), + mock_response(json_payload=build_aad_response(access_token="**", id_token=build_id_token(aud=client_id))), + ], ) # mock local server fakes successful authentication by immediately returning a well-formed response @@ -124,7 +127,7 @@ def test_policies_configurable(): server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) credential = InteractiveBrowserCredential( - policies=[policy], transport=transport, server_class=server_class, _cache=TokenCache() + policies=[policy], client_id=client_id, transport=transport, _server_class=server_class, _cache=TokenCache() ) with patch("azure.identity._credentials.browser.uuid.uuid4", lambda: oauth_state): @@ -135,9 +138,13 @@ def test_policies_configurable(): @patch("azure.identity._credentials.browser.webbrowser.open", lambda _: True) def test_user_agent(): + client_id = "client-id" transport = validating_transport( requests=[Request(), Request(required_headers={"User-Agent": USER_AGENT})], - responses=[get_discovery_response(), mock_response(json_payload=build_aad_response(access_token="**"))], + responses=[ + get_discovery_response(), + mock_response(json_payload=build_aad_response(access_token="**", id_token=build_id_token(aud=client_id))), + ], ) # mock local server fakes successful authentication by immediately returning a well-formed response @@ -145,14 +152,17 @@ def test_user_agent(): auth_code_response = {"code": "authorization-code", "state": [oauth_state]} server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - credential = InteractiveBrowserCredential(transport=transport, server_class=server_class, _cache=TokenCache()) + credential = InteractiveBrowserCredential( + client_id=client_id, transport=transport, _server_class=server_class, _cache=TokenCache() + ) with patch("azure.identity._credentials.browser.uuid.uuid4", lambda: oauth_state): credential.get_token("scope") @patch("azure.identity._credentials.browser.webbrowser.open") -def test_interactive_credential(mock_open): +@pytest.mark.parametrize("redirect_url", ("https://localhost:8042", None)) +def test_interactive_credential(mock_open, redirect_url): mock_open.side_effect = _validate_auth_request_url oauth_state = "state" client_id = "client-id" @@ -163,17 +173,15 @@ def test_interactive_credential(mock_open): tenant_id = "tenant_id" endpoint = "https://{}/{}".format(authority, tenant_id) - discovery_response = get_discovery_response(endpoint=endpoint) - transport = validating_transport( - requests=[Request(url_substring=endpoint)] * 3 + transport = msal_validating_transport( + endpoint="https://{}/{}".format(authority, tenant_id), + requests=[Request(url_substring=endpoint)] + [ Request( authority=authority, url_substring=endpoint, required_data={"refresh_token": expected_refresh_token} ) ], responses=[ - discovery_response, # instance discovery - discovery_response, # tenant discovery mock_response( json_payload=build_aad_response( access_token=expected_token, @@ -195,16 +203,18 @@ def test_interactive_credential(mock_open): auth_code_response = {"code": "authorization-code", "state": [oauth_state]} server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - credential = InteractiveBrowserCredential( - authority=authority, - tenant_id=tenant_id, - client_id=client_id, - server_class=server_class, - transport=transport, - instance_discovery=False, - validate_authority=False, - _cache=TokenCache(), - ) + args = { + "authority": authority, + "tenant_id": tenant_id, + "client_id": client_id, + "transport": transport, + "_cache": TokenCache(), + "_server_class": server_class, + } + if redirect_url: # avoid passing redirect_url=None + args["redirect_uri"] = redirect_url + + credential = InteractiveBrowserCredential(**args) # The credential's auth code request includes a uuid which must be included in the redirect. Patching to # set the uuid requires less code here than a proper mock server. @@ -212,20 +222,19 @@ def test_interactive_credential(mock_open): token = credential.get_token("scope") assert token.token == expected_token assert mock_open.call_count == 1 + assert server_class.call_count == 1 + + if redirect_url: + server_class.assert_called_once_with(redirect_url, timeout=ANY) # token should be cached, get_token shouldn't prompt again token = credential.get_token("scope") assert token.token == expected_token assert mock_open.call_count == 1 - - # As of MSAL 1.0.0, applications build a new client every time they redeem a refresh token. - # Here we patch the private method they use for the sake of test coverage. - # TODO: this will probably break when this MSAL behavior changes - app = credential._get_app() - app._build_client = lambda *_: app.client # pylint:disable=protected-access - now = time.time() + assert server_class.call_count == 1 # expired access token -> credential should use refresh token instead of prompting again + now = time.time() with patch("time.time", lambda: now + expires_in): token = credential.get_token("scope") assert token.token == expected_token @@ -251,7 +260,7 @@ def test_interactive_credential_timeout(): credential = InteractiveBrowserCredential( client_id="guid", - server_class=server_class, + _server_class=server_class, timeout=timeout, transport=transport, instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request @@ -269,7 +278,8 @@ def test_redirect_server(): for _ in range(4): try: port = random.randint(1024, 65535) - server = AuthCodeRedirectServer(port, timeout=10) + url = "http://127.0.0.1:{}".format(port) + server = AuthCodeRedirectServer(url, timeout=10) break except socket.error: continue # keep looking for an open port @@ -285,8 +295,7 @@ def test_redirect_server(): thread.start() # send a request, verify the server exposes the query - url = "http://127.0.0.1:{}/?{}={}".format(port, expected_param, expected_value) # nosec - response = urllib.request.urlopen(url) # nosec + response = urllib.request.urlopen(url + "?{}={}".format(expected_param, expected_value)) # nosec assert response.code == 200 assert server.query_params[expected_param] == [expected_value] @@ -296,7 +305,7 @@ def test_redirect_server(): def test_no_browser(): transport = validating_transport(requests=[Request()] * 2, responses=[get_discovery_response()] * 2) credential = InteractiveBrowserCredential( - client_id="client-id", server_class=Mock(), transport=transport, _cache=TokenCache() + client_id="client-id", _server_class=Mock(), transport=transport, _cache=TokenCache() ) with pytest.raises(ClientAuthenticationError, match=r".*browser.*"): credential.get_token("scope") @@ -305,11 +314,25 @@ def test_no_browser(): def test_cannot_bind_port(): """get_token should raise CredentialUnavailableError when the redirect listener can't bind a port""" - credential = InteractiveBrowserCredential(server_class=Mock(side_effect=socket.error)) + credential = InteractiveBrowserCredential(_server_class=Mock(side_effect=socket.error)) with pytest.raises(CredentialUnavailableError): credential.get_token("scope") +def test_cannot_bind_redirect_uri(): + """When a user specifies a redirect URI, the credential shouldn't attempt to bind another""" + + expected_uri = "http://localhost:42" + + server = Mock(side_effect=socket.error) + credential = InteractiveBrowserCredential(redirect_uri=expected_uri, _server_class=server) + + with pytest.raises(CredentialUnavailableError): + credential.get_token("scope") + + server.assert_called_once_with(expected_uri, timeout=ANY) + + def _validate_auth_request_url(url): parsed_url = urllib_parse.urlparse(url) params = urllib_parse.parse_qs(parsed_url.query) diff --git a/sdk/identity/azure-identity/tests/test_certificate_credential.py b/sdk/identity/azure-identity/tests/test_certificate_credential.py index 1d0c332cf7f68..7765a9e3e5483 100644 --- a/sdk/identity/azure-identity/tests/test_certificate_credential.py +++ b/sdk/identity/azure-identity/tests/test_certificate_credential.py @@ -15,9 +15,18 @@ from cryptography.hazmat.primitives.asymmetric import padding from msal import TokenCache import pytest +import six from six.moves.urllib_parse import urlparse -from helpers import build_aad_response, urlsafeb64_decode, mock_response, Request, validating_transport +from helpers import ( + build_aad_response, + get_discovery_response, + urlsafeb64_decode, + mock_response, + msal_validating_transport, + Request, + validating_transport, +) try: from unittest.mock import Mock, patch @@ -41,11 +50,12 @@ def test_no_scopes(): def test_policies_configurable(): policy = Mock(spec_set=SansIOHTTPPolicy, on_request=Mock()) - def send(*_, **__): - return mock_response(json_payload=build_aad_response(access_token="**")) + transport = msal_validating_transport( + requests=[Request()], responses=[mock_response(json_payload=build_aad_response(access_token="**"))], + ) credential = CertificateCredential( - "tenant-id", "client-id", CERT_PATH, policies=[ContentDecodePolicy(), policy], transport=Mock(send=send) + "tenant-id", "client-id", CERT_PATH, policies=[ContentDecodePolicy(), policy], transport=transport ) credential.get_token("scope") @@ -54,7 +64,7 @@ def send(*_, **__): def test_user_agent(): - transport = validating_transport( + transport = msal_validating_transport( requests=[Request(required_headers={"User-Agent": USER_AGENT})], responses=[mock_response(json_payload=build_aad_response(access_token="**"))], ) @@ -65,39 +75,42 @@ def test_user_agent(): @pytest.mark.parametrize("authority", ("localhost", "https://localhost")) -@pytest.mark.parametrize("cert_path,cert_password", BOTH_CERTS) -def test_request_url(cert_path, cert_password, authority): +def test_authority(authority): """the credential should accept an authority, with or without scheme, as an argument or environment variable""" tenant_id = "expected_tenant" - access_token = "***" parsed_authority = urlparse(authority) - expected_netloc = parsed_authority.netloc or authority # "localhost" parses to netloc "", path "localhost" - - def mock_send(request, **kwargs): - actual = urlparse(request.url) - assert actual.scheme == "https" - assert actual.netloc == expected_netloc - assert actual.path.startswith("/" + tenant_id) - return mock_response(json_payload={"token_type": "Bearer", "expires_in": 42, "access_token": access_token}) + expected_netloc = parsed_authority.netloc or authority + expected_authority = "https://{}/{}".format(expected_netloc, tenant_id) - cred = CertificateCredential( - tenant_id, "client-id", cert_path, password=cert_password, transport=Mock(send=mock_send), authority=authority + mock_ctor = Mock( + return_value=Mock(acquire_token_silent_with_error=lambda *_, **__: {"access_token": "**", "expires_in": 42}) ) - token = cred.get_token("scope") - assert token.token == access_token + + credential = CertificateCredential(tenant_id, "client-id", CERT_PATH, authority=authority) + with patch("msal.ConfidentialClientApplication", mock_ctor): + # must call get_token because the credential constructs the MSAL application lazily + credential.get_token("scope") + + assert mock_ctor.call_count == 1 + _, kwargs = mock_ctor.call_args + assert kwargs["authority"] == expected_authority + mock_ctor.reset_mock() # authority can be configured via environment variable with patch.dict("os.environ", {EnvironmentVariables.AZURE_AUTHORITY_HOST: authority}, clear=True): - credential = CertificateCredential( - tenant_id, "client-id", cert_path, password=cert_password, transport=Mock(send=mock_send) - ) + credential = CertificateCredential(tenant_id, "client-id", CERT_PATH, authority=authority) + with patch("msal.ConfidentialClientApplication", mock_ctor): credential.get_token("scope") - assert token.token == access_token + + assert mock_ctor.call_count == 1 + _, kwargs = mock_ctor.call_args + assert kwargs["authority"] == expected_authority @pytest.mark.parametrize("cert_path,cert_password", BOTH_CERTS) -def test_request_body(cert_path, cert_password): +@pytest.mark.parametrize("send_certificate", (True, False)) +def test_request_body(cert_path, cert_password, send_certificate): access_token = "***" authority = "authority.com" client_id = "client-id" @@ -105,22 +118,31 @@ def test_request_body(cert_path, cert_password): tenant_id = "tenant" def mock_send(request, **kwargs): + if not request.body: + return get_discovery_response() + assert request.body["grant_type"] == "client_credentials" assert request.body["scope"] == expected_scope with open(cert_path, "rb") as cert_file: - validate_jwt(request, client_id, cert_file.read()) + validate_jwt(request, client_id, cert_file.read(), expect_x5c=send_certificate) - return mock_response(json_payload={"token_type": "Bearer", "expires_in": 42, "access_token": access_token}) + return mock_response(json_payload=build_aad_response(access_token=access_token)) cred = CertificateCredential( - tenant_id, client_id, cert_path, password=cert_password, transport=Mock(send=mock_send), authority=authority + tenant_id, + client_id, + cert_path, + password=cert_password, + transport=Mock(send=mock_send), + authority=authority, + send_certificate=send_certificate, ) token = cred.get_token(expected_scope) assert token.token == access_token -def validate_jwt(request, client_id, pem_bytes): +def validate_jwt(request, client_id, pem_bytes, expect_x5c=False): """Validate the request meets AAD's expectations for a client credential grant using a certificate, as documented at https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-certificate-credentials """ @@ -128,19 +150,31 @@ def validate_jwt(request, client_id, pem_bytes): cert = x509.load_pem_x509_certificate(pem_bytes, default_backend()) # jwt is of the form 'header.payload.signature'; 'signature' is 'header.payload' signed with cert's private key - jwt = request.body["client_assertion"] + jwt = six.ensure_str(request.body["client_assertion"]) header, payload, signature = (urlsafeb64_decode(s) for s in jwt.split(".")) signed_part = jwt[: jwt.rfind(".")] + claims = json.loads(payload.decode("utf-8")) + assert claims["aud"] == request.url + assert claims["iss"] == claims["sub"] == client_id deserialized_header = json.loads(header.decode("utf-8")) assert deserialized_header["alg"] == "RS256" assert deserialized_header["typ"] == "JWT" + if expect_x5c: + # x5c should have all the certs in the PEM file, in order, minus headers and footers + pem_lines = pem_bytes.decode("utf-8").splitlines() + header = "-----BEGIN CERTIFICATE-----" + assert len(deserialized_header["x5c"]) == pem_lines.count(header) + + # concatenate the PEM file's certs, removing headers and footers + chain_start = pem_lines.index(header) + pem_chain_content = "".join(line for line in pem_lines[chain_start:] if not line.startswith("-" * 5)) + assert "".join(deserialized_header["x5c"]) == pem_chain_content, "JWT's x5c claim contains unexpected content" + else: + assert "x5c" not in deserialized_header assert urlsafeb64_decode(deserialized_header["x5t"]) == cert.fingerprint(hashes.SHA1()) # nosec - assert claims["aud"] == request.url - assert claims["iss"] == claims["sub"] == client_id - cert.public_key().verify(signature, signed_part.encode("utf-8"), padding.PKCS1v15(), hashes.SHA256()) @@ -157,20 +191,20 @@ def test_enable_persistent_cache(cert_path, cert_password): CertificateCredential(*required_arguments, password=cert_password) # allowing an unencrypted cache doesn't count as opting in to the persistent cache - CertificateCredential(*required_arguments, password=cert_password, _allow_unencrypted_cache=True) + CertificateCredential(*required_arguments, password=cert_password, allow_unencrypted_cache=True) # keyword argument opts in to persistent cache with patch(persistent_cache + ".msal_extensions") as mock_extensions: - CertificateCredential(*required_arguments, password=cert_password, _enable_persistent_cache=True) + CertificateCredential(*required_arguments, password=cert_password, enable_persistent_cache=True) assert mock_extensions.PersistedTokenCache.call_count == 1 # opting in on an unsupported platform raises an exception with patch(persistent_cache + ".sys.platform", "commodore64"): with pytest.raises(NotImplementedError): - CertificateCredential(*required_arguments, password=cert_password, _enable_persistent_cache=True) + CertificateCredential(*required_arguments, password=cert_password, enable_persistent_cache=True) with pytest.raises(NotImplementedError): CertificateCredential( - *required_arguments, password=cert_password, _enable_persistent_cache=True, _allow_unencrypted_cache=True + *required_arguments, password=cert_password, enable_persistent_cache=True, allow_unencrypted_cache=True ) @@ -187,7 +221,7 @@ def test_persistent_cache_linux(mock_extensions, cert_path, cert_password): # the credential should prefer an encrypted cache even when the user allows an unencrypted one CertificateCredential( - *required_arguments, password=cert_password, _enable_persistent_cache=True, _allow_unencrypted_cache=True + *required_arguments, password=cert_password, enable_persistent_cache=True, allow_unencrypted_cache=True ) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.LibsecretPersistence) mock_extensions.PersistedTokenCache.reset_mock() @@ -197,10 +231,10 @@ def test_persistent_cache_linux(mock_extensions, cert_path, cert_password): # encryption unavailable, no opt in to unencrypted cache -> credential should raise with pytest.raises(ValueError): - CertificateCredential(*required_arguments, password=cert_password, _enable_persistent_cache=True) + CertificateCredential(*required_arguments, password=cert_password, enable_persistent_cache=True) CertificateCredential( - *required_arguments, password=cert_password, _enable_persistent_cache=True, _allow_unencrypted_cache=True + *required_arguments, password=cert_password, enable_persistent_cache=True, allow_unencrypted_cache=True ) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.FilePersistence) @@ -211,10 +245,10 @@ def test_persistent_cache_multiple_clients(cert_path, cert_password): access_token_a = "token a" access_token_b = "not " + access_token_a - transport_a = validating_transport( + transport_a = msal_validating_transport( requests=[Request()], responses=[mock_response(json_payload=build_aad_response(access_token=access_token_a))] ) - transport_b = validating_transport( + transport_b = msal_validating_transport( requests=[Request()], responses=[mock_response(json_payload=build_aad_response(access_token=access_token_b))] ) @@ -222,11 +256,11 @@ def test_persistent_cache_multiple_clients(cert_path, cert_password): with patch("azure.identity._internal.persistent_cache._load_persistent_cache") as mock_cache_loader: mock_cache_loader.return_value = Mock(wraps=cache) credential_a = CertificateCredential( - "tenant", "client-a", cert_path, password=cert_password, _enable_persistent_cache=True, transport=transport_a + "tenant", "client-a", cert_path, password=cert_password, enable_persistent_cache=True, transport=transport_a ) assert mock_cache_loader.call_count == 1, "credential should load the persistent cache" credential_b = CertificateCredential( - "tenant", "client-b", cert_path, password=cert_password, _enable_persistent_cache=True, transport=transport_b + "tenant", "client-b", cert_path, password=cert_password, enable_persistent_cache=True, transport=transport_b ) assert mock_cache_loader.call_count == 2, "credential should load the persistent cache" @@ -234,9 +268,9 @@ def test_persistent_cache_multiple_clients(cert_path, cert_password): scope = "scope" token_a = credential_a.get_token(scope) assert token_a.token == access_token_a - assert transport_a.send.call_count == 1 + assert transport_a.send.call_count == 3 # two MSAL discovery requests, one token request # B should get a different token for the same scope token_b = credential_b.get_token(scope) assert token_b.token == access_token_b - assert transport_b.send.call_count == 1 + assert transport_b.send.call_count == 3 diff --git a/sdk/identity/azure-identity/tests/test_certificate_credential_async.py b/sdk/identity/azure-identity/tests/test_certificate_credential_async.py index 9d0f5a2e08cbf..01d2839fc2cc6 100644 --- a/sdk/identity/azure-identity/tests/test_certificate_credential_async.py +++ b/sdk/identity/azure-identity/tests/test_certificate_credential_async.py @@ -149,20 +149,20 @@ def test_enable_persistent_cache(cert_path, cert_password): CertificateCredential(*required_arguments, password=cert_password) # allowing an unencrypted cache doesn't count as opting in to the persistent cache - CertificateCredential(*required_arguments, password=cert_password, _allow_unencrypted_cache=True) + CertificateCredential(*required_arguments, password=cert_password, allow_unencrypted_cache=True) # keyword argument opts in to persistent cache with patch(persistent_cache + ".msal_extensions") as mock_extensions: - CertificateCredential(*required_arguments, password=cert_password, _enable_persistent_cache=True) + CertificateCredential(*required_arguments, password=cert_password, enable_persistent_cache=True) assert mock_extensions.PersistedTokenCache.call_count == 1 # opting in on an unsupported platform raises an exception with patch(persistent_cache + ".sys.platform", "commodore64"): with pytest.raises(NotImplementedError): - CertificateCredential(*required_arguments, password=cert_password, _enable_persistent_cache=True) + CertificateCredential(*required_arguments, password=cert_password, enable_persistent_cache=True) with pytest.raises(NotImplementedError): CertificateCredential( - *required_arguments, password=cert_password, _enable_persistent_cache=True, _allow_unencrypted_cache=True + *required_arguments, password=cert_password, enable_persistent_cache=True, allow_unencrypted_cache=True ) @@ -179,7 +179,7 @@ def test_persistent_cache_linux(mock_extensions, cert_path, cert_password): # the credential should prefer an encrypted cache even when the user allows an unencrypted one CertificateCredential( - *required_arguments, password=cert_password, _enable_persistent_cache=True, _allow_unencrypted_cache=True + *required_arguments, password=cert_password, enable_persistent_cache=True, allow_unencrypted_cache=True ) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.LibsecretPersistence) mock_extensions.PersistedTokenCache.reset_mock() @@ -189,10 +189,10 @@ def test_persistent_cache_linux(mock_extensions, cert_path, cert_password): # encryption unavailable, no opt in to unencrypted cache -> credential should raise with pytest.raises(ValueError): - CertificateCredential(*required_arguments, password=cert_password, _enable_persistent_cache=True) + CertificateCredential(*required_arguments, password=cert_password, enable_persistent_cache=True) CertificateCredential( - *required_arguments, password=cert_password, _enable_persistent_cache=True, _allow_unencrypted_cache=True + *required_arguments, password=cert_password, enable_persistent_cache=True, allow_unencrypted_cache=True ) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.FilePersistence) @@ -215,11 +215,11 @@ async def test_persistent_cache_multiple_clients(cert_path, cert_password): with patch("azure.identity._internal.persistent_cache._load_persistent_cache") as mock_cache_loader: mock_cache_loader.return_value = Mock(wraps=cache) credential_a = CertificateCredential( - "tenant", "client-a", cert_path, password=cert_password, _enable_persistent_cache=True, transport=transport_a + "tenant", "client-a", cert_path, password=cert_password, enable_persistent_cache=True, transport=transport_a ) assert mock_cache_loader.call_count == 1, "credential should load the persistent cache" credential_b = CertificateCredential( - "tenant", "client-b", cert_path, password=cert_password, _enable_persistent_cache=True, transport=transport_b + "tenant", "client-b", cert_path, password=cert_password, enable_persistent_cache=True, transport=transport_b ) assert mock_cache_loader.call_count == 2, "credential should load the persistent cache" diff --git a/sdk/identity/azure-identity/tests/test_client_secret_credential.py b/sdk/identity/azure-identity/tests/test_client_secret_credential.py index 542ea203fe105..a204c6cf8c6d7 100644 --- a/sdk/identity/azure-identity/tests/test_client_secret_credential.py +++ b/sdk/identity/azure-identity/tests/test_client_secret_credential.py @@ -2,9 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -import time - -from azure.core.credentials import AccessToken from azure.core.pipeline.policies import ContentDecodePolicy, SansIOHTTPPolicy from azure.identity import ClientSecretCredential from azure.identity._constants import EnvironmentVariables @@ -13,7 +10,7 @@ import pytest from six.moves.urllib_parse import urlparse -from helpers import build_aad_response, mock_response, Request, validating_transport +from helpers import build_aad_response, mock_response, msal_validating_transport, Request, validating_transport try: from unittest.mock import Mock, patch @@ -32,11 +29,12 @@ def test_no_scopes(): def test_policies_configurable(): policy = Mock(spec_set=SansIOHTTPPolicy, on_request=Mock()) - def send(*_, **__): - return mock_response(json_payload=build_aad_response(access_token="**")) + transport = msal_validating_transport( + requests=[Request()], responses=[mock_response(json_payload=build_aad_response(access_token="**"))], + ) credential = ClientSecretCredential( - "tenant-id", "client-id", "client-secret", policies=[ContentDecodePolicy(), policy], transport=Mock(send=send) + "tenant-id", "client-id", "client-secret", policies=[ContentDecodePolicy(), policy], transport=transport ) credential.get_token("scope") @@ -45,7 +43,7 @@ def send(*_, **__): def test_user_agent(): - transport = validating_transport( + transport = msal_validating_transport( requests=[Request(required_headers={"User-Agent": USER_AGENT})], responses=[mock_response(json_payload=build_aad_response(access_token="**"))], ) @@ -61,89 +59,49 @@ def test_client_secret_credential(): tenant_id = "fake-tenant-id" access_token = "***" - transport = validating_transport( + transport = msal_validating_transport( + endpoint="https://localhost/" + tenant_id, requests=[Request(url_substring=tenant_id, required_data={"client_id": client_id, "client_secret": secret})], - responses=[ - mock_response( - json_payload={ - "token_type": "Bearer", - "expires_in": 42, - "ext_expires_in": 42, - "access_token": access_token, - } - ) - ], + responses=[mock_response(json_payload=build_aad_response(access_token=access_token))], ) token = ClientSecretCredential(tenant_id, client_id, secret, transport=transport).get_token("scope") - # not validating expires_on because doing so requires monkeypatching time, and this is tested elsewhere assert token.token == access_token @pytest.mark.parametrize("authority", ("localhost", "https://localhost")) -def test_request_url(authority): +def test_authority(authority): """the credential should accept an authority, with or without scheme, as an argument or environment variable""" tenant_id = "expected_tenant" - access_token = "***" parsed_authority = urlparse(authority) - expected_netloc = parsed_authority.netloc or authority # "localhost" parses to netloc "", path "localhost" + expected_netloc = parsed_authority.netloc or authority + expected_authority = "https://{}/{}".format(expected_netloc, tenant_id) - def mock_send(request, **kwargs): - actual = urlparse(request.url) - assert actual.scheme == "https" - assert actual.netloc == expected_netloc - assert actual.path.startswith("/" + tenant_id) - return mock_response(json_payload={"token_type": "Bearer", "expires_in": 42, "access_token": access_token}) - - credential = ClientSecretCredential( - tenant_id, "client-id", "secret", transport=Mock(send=mock_send), authority=authority + mock_ctor = Mock( + return_value=Mock(acquire_token_silent_with_error=lambda *_, **__: {"access_token": "**", "expires_in": 42}) ) - token = credential.get_token("scope") - assert token.token == access_token - # authority can be configured via environment variable - with patch.dict("os.environ", {EnvironmentVariables.AZURE_AUTHORITY_HOST: authority}, clear=True): - credential = ClientSecretCredential(tenant_id, "client-id", "secret", transport=Mock(send=mock_send)) + credential = ClientSecretCredential(tenant_id, "client-id", "secret", authority=authority) + with patch("msal.ConfidentialClientApplication", mock_ctor): + # must call get_token because the credential constructs the MSAL application lazily credential.get_token("scope") - assert token.token == access_token + assert mock_ctor.call_count == 1 + _, kwargs = mock_ctor.call_args + assert kwargs["authority"] == expected_authority + mock_ctor.reset_mock() -def test_cache(): - expired = "this token's expired" - now = int(time.time()) - expired_on = now - 3600 - expired_token = AccessToken(expired, expired_on) - token_payload = { - "access_token": expired, - "expires_in": 0, - "ext_expires_in": 0, - "expires_on": expired_on, - "not_before": now, - "token_type": "Bearer", - } - mock_send = Mock(return_value=mock_response(json_payload=token_payload)) - scope = "scope" - - credential = ClientSecretCredential( - tenant_id="some-guid", client_id="client_id", client_secret="secret", transport=Mock(send=mock_send) - ) - - # get_token initially returns the expired token because the credential - # doesn't check whether tokens it receives from the service have expired - token = credential.get_token(scope) - assert token == expired_token - - access_token = "new token" - token_payload["access_token"] = access_token - token_payload["expires_on"] = now + 3600 - valid_token = AccessToken(access_token, now + 3600) + # authority can be configured via environment variable + with patch.dict("os.environ", {EnvironmentVariables.AZURE_AUTHORITY_HOST: authority}, clear=True): + credential = ClientSecretCredential(tenant_id, "client-id", "secret") + with patch("msal.ConfidentialClientApplication", mock_ctor): + credential.get_token("scope") - # second call should observe the cached token has expired, and request another - token = credential.get_token(scope) - assert token == valid_token - assert mock_send.call_count == 2 + assert mock_ctor.call_count == 1 + _, kwargs = mock_ctor.call_args + assert kwargs["authority"] == expected_authority def test_enable_persistent_cache(): @@ -158,19 +116,19 @@ def test_enable_persistent_cache(): ClientSecretCredential(*required_arguments) # allowing an unencrypted cache doesn't count as opting in to the persistent cache - ClientSecretCredential(*required_arguments, _allow_unencrypted_cache=True) + ClientSecretCredential(*required_arguments, allow_unencrypted_cache=True) # keyword argument opts in to persistent cache with patch(persistent_cache + ".msal_extensions") as mock_extensions: - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True) assert mock_extensions.PersistedTokenCache.call_count == 1 # opting in on an unsupported platform raises an exception with patch(persistent_cache + ".sys.platform", "commodore64"): with pytest.raises(NotImplementedError): - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True) with pytest.raises(NotImplementedError): - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True, _allow_unencrypted_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True, allow_unencrypted_cache=True) @patch("azure.identity._internal.persistent_cache.sys.platform", "linux2") @@ -184,7 +142,7 @@ def test_persistent_cache_linux(mock_extensions): required_arguments = ("tenant-id", "client-id", "secret") # the credential should prefer an encrypted cache even when the user allows an unencrypted one - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True, _allow_unencrypted_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True, allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.LibsecretPersistence) mock_extensions.PersistedTokenCache.reset_mock() @@ -193,9 +151,9 @@ def test_persistent_cache_linux(mock_extensions): # encryption unavailable, no opt in to unencrypted cache -> credential should raise with pytest.raises(ValueError): - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True) - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True, _allow_unencrypted_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True, allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.FilePersistence) @@ -204,10 +162,10 @@ def test_persistent_cache_multiple_clients(): access_token_a = "token a" access_token_b = "not " + access_token_a - transport_a = validating_transport( + transport_a = msal_validating_transport( requests=[Request()], responses=[mock_response(json_payload=build_aad_response(access_token=access_token_a))] ) - transport_b = validating_transport( + transport_b = msal_validating_transport( requests=[Request()], responses=[mock_response(json_payload=build_aad_response(access_token=access_token_b))] ) @@ -215,11 +173,11 @@ def test_persistent_cache_multiple_clients(): with patch("azure.identity._internal.persistent_cache._load_persistent_cache") as mock_cache_loader: mock_cache_loader.return_value = Mock(wraps=cache) credential_a = ClientSecretCredential( - "tenant-id", "client-a", "...", _enable_persistent_cache=True, transport=transport_a + "tenant-id", "client-a", "...", enable_persistent_cache=True, transport=transport_a ) assert mock_cache_loader.call_count == 1, "credential should load the persistent cache" credential_b = ClientSecretCredential( - "tenant-id", "client-b", "...", _enable_persistent_cache=True, transport=transport_b + "tenant-id", "client-b", "...", enable_persistent_cache=True, transport=transport_b ) assert mock_cache_loader.call_count == 2, "credential should load the persistent cache" @@ -227,9 +185,9 @@ def test_persistent_cache_multiple_clients(): scope = "scope" token_a = credential_a.get_token(scope) assert token_a.token == access_token_a - assert transport_a.send.call_count == 1 + assert transport_a.send.call_count == 3 # two MSAL discovery requests, one token request # B should get a different token for the same scope token_b = credential_b.get_token(scope) assert token_b.token == access_token_b - assert transport_b.send.call_count == 1 + assert transport_b.send.call_count == 3 diff --git a/sdk/identity/azure-identity/tests/test_client_secret_credential_async.py b/sdk/identity/azure-identity/tests/test_client_secret_credential_async.py index 24ff4f3dc224b..4731f1cb7bc22 100644 --- a/sdk/identity/azure-identity/tests/test_client_secret_credential_async.py +++ b/sdk/identity/azure-identity/tests/test_client_secret_credential_async.py @@ -184,19 +184,19 @@ def test_enable_persistent_cache(): ClientSecretCredential(*required_arguments) # allowing an unencrypted cache doesn't count as opting in to the persistent cache - ClientSecretCredential(*required_arguments, _allow_unencrypted_cache=True) + ClientSecretCredential(*required_arguments, allow_unencrypted_cache=True) # keyword argument opts in to persistent cache with patch(persistent_cache + ".msal_extensions") as mock_extensions: - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True) assert mock_extensions.PersistedTokenCache.call_count == 1 # opting in on an unsupported platform raises an exception with patch(persistent_cache + ".sys.platform", "commodore64"): with pytest.raises(NotImplementedError): - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True) with pytest.raises(NotImplementedError): - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True, _allow_unencrypted_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True, allow_unencrypted_cache=True) @patch("azure.identity._internal.persistent_cache.sys.platform", "linux2") @@ -210,7 +210,7 @@ def test_persistent_cache_linux(mock_extensions): required_arguments = ("tenant-id", "client-id", "secret") # the credential should prefer an encrypted cache even when the user allows an unencrypted one - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True, _allow_unencrypted_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True, allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.LibsecretPersistence) mock_extensions.PersistedTokenCache.reset_mock() @@ -219,9 +219,9 @@ def test_persistent_cache_linux(mock_extensions): # encryption unavailable, no opt in to unencrypted cache -> credential should raise with pytest.raises(ValueError): - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True) - ClientSecretCredential(*required_arguments, _enable_persistent_cache=True, _allow_unencrypted_cache=True) + ClientSecretCredential(*required_arguments, enable_persistent_cache=True, allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.FilePersistence) @@ -242,11 +242,11 @@ async def test_persistent_cache_multiple_clients(): with patch("azure.identity._internal.persistent_cache._load_persistent_cache") as mock_cache_loader: mock_cache_loader.return_value = Mock(wraps=cache) credential_a = ClientSecretCredential( - "tenant-id", "client-a", "...", _enable_persistent_cache=True, transport=transport_a + "tenant-id", "client-a", "...", enable_persistent_cache=True, transport=transport_a ) assert mock_cache_loader.call_count == 1, "credential should load the persistent cache" credential_b = ClientSecretCredential( - "tenant-id", "client-b", "...", _enable_persistent_cache=True, transport=transport_b + "tenant-id", "client-b", "...", enable_persistent_cache=True, transport=transport_b ) assert mock_cache_loader.call_count == 2, "credential should load the persistent cache" diff --git a/sdk/identity/azure-identity/tests/test_default.py b/sdk/identity/azure-identity/tests/test_default.py index fd47c180cb0e3..2f8564da19575 100644 --- a/sdk/identity/azure-identity/tests/test_default.py +++ b/sdk/identity/azure-identity/tests/test_default.py @@ -265,20 +265,27 @@ def test_default_credential_shared_cache_use(mock_credential): def test_managed_identity_client_id(): - """The credential should initialize ManagedIdentityCredential with the value of AZURE_CLIENT_ID""" + """the credential should accept a user-assigned managed identity's client ID by kwarg or environment variable""" - expected_client_id = "the-client" - with patch.dict(os.environ, {EnvironmentVariables.AZURE_CLIENT_ID: expected_client_id}, clear=True): - with patch(DefaultAzureCredential.__module__ + ".ManagedIdentityCredential") as mock_credential: - DefaultAzureCredential() + expected_args = {"client_id": "the-client"} - mock_credential.assert_called_once_with(client_id=expected_client_id) + with patch(DefaultAzureCredential.__module__ + ".ManagedIdentityCredential") as mock_credential: + DefaultAzureCredential(managed_identity_client_id=expected_args["client_id"]) + mock_credential.assert_called_once_with(**expected_args) - with patch.dict(os.environ, {}, clear=True): + # client id can also be specified in $AZURE_CLIENT_ID + with patch.dict(os.environ, {EnvironmentVariables.AZURE_CLIENT_ID: expected_args["client_id"]}, clear=True): with patch(DefaultAzureCredential.__module__ + ".ManagedIdentityCredential") as mock_credential: DefaultAzureCredential() + mock_credential.assert_called_once_with(**expected_args) - mock_credential.assert_called_once_with(client_id=None) + # keyword argument should override environment variable + with patch.dict( + os.environ, {EnvironmentVariables.AZURE_CLIENT_ID: "not-" + expected_args["client_id"]}, clear=True + ): + with patch(DefaultAzureCredential.__module__ + ".ManagedIdentityCredential") as mock_credential: + DefaultAzureCredential(managed_identity_client_id=expected_args["client_id"]) + mock_credential.assert_called_once_with(**expected_args) def get_credential_for_shared_cache_test(expected_refresh_token, expected_access_token, cache, **kwargs): diff --git a/sdk/identity/azure-identity/tests/test_default_async.py b/sdk/identity/azure-identity/tests/test_default_async.py index 79d862f116417..4e74e55e745ab 100644 --- a/sdk/identity/azure-identity/tests/test_default_async.py +++ b/sdk/identity/azure-identity/tests/test_default_async.py @@ -253,20 +253,27 @@ async def test_default_credential_shared_cache_use(): def test_managed_identity_client_id(): - """The credential should initialize ManagedIdentityCredential with the value of AZURE_CLIENT_ID""" + """the credential should accept a user-assigned managed identity's client ID by kwarg or environment variable""" - expected_client_id = "the-client" - with patch.dict(os.environ, {EnvironmentVariables.AZURE_CLIENT_ID: expected_client_id}, clear=True): - with patch(DefaultAzureCredential.__module__ + ".ManagedIdentityCredential") as mock_credential: - DefaultAzureCredential() + expected_args = {"client_id": "the client"} - mock_credential.assert_called_once_with(client_id=expected_client_id) + with patch(DefaultAzureCredential.__module__ + ".ManagedIdentityCredential") as mock_credential: + DefaultAzureCredential(managed_identity_client_id=expected_args["client_id"]) + mock_credential.assert_called_once_with(**expected_args) - with patch.dict(os.environ, {}, clear=True): + # client id can also be specified in $AZURE_CLIENT_ID + with patch.dict(os.environ, {EnvironmentVariables.AZURE_CLIENT_ID: expected_args["client_id"]}, clear=True): with patch(DefaultAzureCredential.__module__ + ".ManagedIdentityCredential") as mock_credential: DefaultAzureCredential() + mock_credential.assert_called_once_with(**expected_args) - mock_credential.assert_called_once_with(client_id=None) + # keyword argument should override environment variable + with patch.dict( + os.environ, {EnvironmentVariables.AZURE_CLIENT_ID: "not-" + expected_args["client_id"]}, clear=True + ): + with patch(DefaultAzureCredential.__module__ + ".ManagedIdentityCredential") as mock_credential: + DefaultAzureCredential(managed_identity_client_id=expected_args["client_id"]) + mock_credential.assert_called_once_with(**expected_args) def get_credential_for_shared_cache_test(expected_refresh_token, expected_access_token, cache, **kwargs): diff --git a/sdk/identity/azure-identity/tests/test_device_code_credential.py b/sdk/identity/azure-identity/tests/test_device_code_credential.py index 896b3ef4e1b9c..6428f7035345d 100644 --- a/sdk/identity/azure-identity/tests/test_device_code_credential.py +++ b/sdk/identity/azure-identity/tests/test_device_code_credential.py @@ -6,8 +6,7 @@ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline.policies import SansIOHTTPPolicy -from azure.identity import DeviceCodeCredential -from azure.identity._exceptions import AuthenticationRequiredError +from azure.identity import AuthenticationRequiredError, DeviceCodeCredential from azure.identity._internal.user_agent import USER_AGENT from msal import TokenCache import pytest @@ -78,7 +77,7 @@ def test_authenticate(): tenant_id=tenant_id, _cache=TokenCache(), ) - record = credential._authenticate(scopes=(scope,)) + record = credential.authenticate(scopes=(scope,)) assert record.authority == environment assert record.home_account_id == object_id + "." + home_tenant assert record.tenant_id == home_tenant @@ -94,7 +93,9 @@ def test_disable_automatic_authentication(): empty_cache = TokenCache() # empty cache makes silent auth impossible transport = Mock(send=Mock(side_effect=Exception("no request should be sent"))) - credential = DeviceCodeCredential("client-id", _disable_automatic_authentication=True, transport=transport, _cache=empty_cache) + credential = DeviceCodeCredential( + "client-id", disable_automatic_authentication=True, transport=transport, _cache=empty_cache + ) with pytest.raises(AuthenticationRequiredError): credential.get_token("scope") @@ -103,6 +104,7 @@ def test_disable_automatic_authentication(): def test_policies_configurable(): policy = Mock(spec_set=SansIOHTTPPolicy, on_request=Mock()) + client_id = "client-id" transport = validating_transport( requests=[Request()] * 3, responses=[ @@ -116,12 +118,16 @@ def test_policies_configurable(): "expires_in": 42, } ), - mock_response(json_payload=dict(build_aad_response(access_token="**"), scope="scope")), + mock_response( + json_payload=dict( + build_aad_response(access_token="**", id_token=build_id_token(aud=client_id)), scope="scope" + ) + ), ], ) credential = DeviceCodeCredential( - client_id="client-id", prompt_callback=Mock(), policies=[policy], transport=transport, _cache=TokenCache() + client_id=client_id, prompt_callback=Mock(), policies=[policy], transport=transport, _cache=TokenCache() ) credential.get_token("scope") @@ -130,6 +136,7 @@ def test_policies_configurable(): def test_user_agent(): + client_id = "client-id" transport = validating_transport( requests=[Request()] * 2 + [Request(required_headers={"User-Agent": USER_AGENT})], responses=[ @@ -142,18 +149,23 @@ def test_user_agent(): "expires_in": 42, } ), - mock_response(json_payload=dict(build_aad_response(access_token="**"), scope="scope")), + mock_response( + json_payload=dict( + build_aad_response(access_token="**", id_token=build_id_token(aud=client_id)), scope="scope" + ) + ), ], ) credential = DeviceCodeCredential( - client_id="client-id", prompt_callback=Mock(), transport=transport, _cache=TokenCache() + client_id=client_id, prompt_callback=Mock(), transport=transport, _cache=TokenCache() ) credential.get_token("scope") def test_device_code_credential(): + client_id = "client-id" expected_token = "access-token" user_code = "user-code" verification_uri = "verification-uri" @@ -173,20 +185,26 @@ def test_device_code_credential(): } ), mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": expires_in, - "scope": "scope", - "token_type": "Bearer", - "refresh_token": "_", - } + json_payload=dict( + build_aad_response( + access_token=expected_token, + expires_in=expires_in, + refresh_token="_", + id_token=build_id_token(aud=client_id), + ), + scope="scope", + ), ), ], ) callback = Mock() credential = DeviceCodeCredential( - client_id="_", prompt_callback=callback, transport=transport, instance_discovery=False, _cache=TokenCache() + client_id=client_id, + prompt_callback=callback, + transport=transport, + instance_discovery=False, + _cache=TokenCache(), ) now = datetime.datetime.utcnow() diff --git a/sdk/identity/azure-identity/tests/test_environment_credential.py b/sdk/identity/azure-identity/tests/test_environment_credential.py index 3efb578b7aa99..35ce51045ef71 100644 --- a/sdk/identity/azure-identity/tests/test_environment_credential.py +++ b/sdk/identity/azure-identity/tests/test_environment_credential.py @@ -143,34 +143,3 @@ def test_username_password_configuration(): assert kwargs["password"] == password assert kwargs["tenant_id"] == tenant_id assert kwargs["foo"] == bar - - -def test_client_secret_credential(): - client_id = "fake-client-id" - secret = "fake-client-secret" - tenant_id = "fake-tenant-id" - access_token = "***" - - transport = validating_transport( - requests=[Request(url_substring=tenant_id, required_data={"client_id": client_id, "client_secret": secret})], - responses=[ - mock_response( - json_payload={ - "token_type": "Bearer", - "expires_in": 42, - "ext_expires_in": 42, - "access_token": access_token, - } - ) - ], - ) - - environment = { - EnvironmentVariables.AZURE_CLIENT_ID: client_id, - EnvironmentVariables.AZURE_CLIENT_SECRET: secret, - EnvironmentVariables.AZURE_TENANT_ID: tenant_id, - } - with mock.patch.dict("os.environ", environment, clear=True): - token = EnvironmentCredential(transport=transport).get_token("scope") - - assert token.token == access_token diff --git a/sdk/identity/azure-identity/tests/test_get_token_mixin.py b/sdk/identity/azure-identity/tests/test_get_token_mixin.py new file mode 100644 index 0000000000000..28d2e5df2705c --- /dev/null +++ b/sdk/identity/azure-identity/tests/test_get_token_mixin.py @@ -0,0 +1,110 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import time + +try: + from unittest import mock +except ImportError: + import mock + +from azure.core.credentials import AccessToken +import pytest + +from azure.identity._constants import DEFAULT_REFRESH_OFFSET +from azure.identity._internal.get_token_mixin import GetTokenMixin + + +class MockCredential(GetTokenMixin): + NEW_TOKEN = AccessToken("new token", 42) + + def __init__(self, cached_token=None): + super(MockCredential, self).__init__() + self.request_token = mock.Mock(return_value=MockCredential.NEW_TOKEN) + self.acquire_token_silently = mock.Mock(return_value=cached_token) + + def _acquire_token_silently(self, *scopes): + return self.acquire_token_silently(*scopes) + + def _request_token(self, *scopes, **kwargs): + return self.request_token(*scopes, **kwargs) + + def get_token(self, *_, **__): + return super(MockCredential, self).get_token(*_, **__) + + +CACHED_TOKEN = "cached token" +SCOPE = "scope" + + +def test_no_cached_token(): + """When it has no token cached, a credential should request one every time get_token is called""" + + credential = MockCredential() + token = credential.get_token(SCOPE) + + credential.acquire_token_silently.assert_called_once_with(SCOPE) + credential.request_token.assert_called_once_with(SCOPE) + assert token.token == MockCredential.NEW_TOKEN.token + + +def test_token_acquisition_failure(): + """When the credential has no token cached, every get_token call should prompt a token request""" + + credential = MockCredential() + credential.request_token = mock.Mock(side_effect=Exception("whoops")) + for i in range(4): + with pytest.raises(Exception): + credential.get_token(SCOPE) + assert credential.request_token.call_count == i + 1 + credential.request_token.assert_called_with(SCOPE) + + +def test_expired_token(): + """A credential should request a token when it has an expired token cached""" + + now = time.time() + credential = MockCredential(cached_token=AccessToken(CACHED_TOKEN, now - 1)) + token = credential.get_token(SCOPE) + + credential.acquire_token_silently.assert_called_once_with(SCOPE) + credential.request_token.assert_called_once_with(SCOPE) + assert token.token == MockCredential.NEW_TOKEN.token + + +def test_cached_token_outside_refresh_window(): + """A credential shouldn't request a new token when it has a cached one with sufficient validity remaining""" + + credential = MockCredential(cached_token=AccessToken(CACHED_TOKEN, time.time() + DEFAULT_REFRESH_OFFSET + 1)) + token = credential.get_token(SCOPE) + + credential.acquire_token_silently.assert_called_once_with(SCOPE) + assert credential.request_token.call_count == 0 + assert token.token == CACHED_TOKEN + + +def test_cached_token_within_refresh_window(): + """A credential should request a new token when its cached one is within the refresh window""" + + credential = MockCredential(cached_token=AccessToken(CACHED_TOKEN, time.time() + DEFAULT_REFRESH_OFFSET - 1)) + token = credential.get_token(SCOPE) + + credential.acquire_token_silently.assert_called_once_with(SCOPE) + credential.request_token.assert_called_once_with(SCOPE) + assert token.token == MockCredential.NEW_TOKEN.token + + +def test_retry_delay(): + """A credential should wait between requests when trying to refresh a token""" + + now = time.time() + credential = MockCredential(cached_token=AccessToken(CACHED_TOKEN, now + DEFAULT_REFRESH_OFFSET - 1)) + + # the credential should swallow exceptions during proactive refresh attempts + credential.request_token = mock.Mock(side_effect=Exception("whoops")) + for i in range(4): + token = credential.get_token(SCOPE) + assert token.token == CACHED_TOKEN + credential.acquire_token_silently.assert_called_with(SCOPE) + credential.request_token.assert_called_once_with(SCOPE) diff --git a/sdk/identity/azure-identity/tests/test_get_token_mixin_async.py b/sdk/identity/azure-identity/tests/test_get_token_mixin_async.py new file mode 100644 index 0000000000000..a76c7a82faf70 --- /dev/null +++ b/sdk/identity/azure-identity/tests/test_get_token_mixin_async.py @@ -0,0 +1,109 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import time +from unittest import mock + +from azure.core.credentials import AccessToken +import pytest + +from azure.identity._constants import DEFAULT_REFRESH_OFFSET +from azure.identity.aio._internal.get_token_mixin import GetTokenMixin + +pytestmark = pytest.mark.asyncio + + +class MockCredential(GetTokenMixin): + NEW_TOKEN = AccessToken("new token", 42) + + def __init__(self, cached_token=None): + super(MockCredential, self).__init__() + self.token = cached_token + self.request_token = mock.Mock(return_value=MockCredential.NEW_TOKEN) + self.acquire_token_silently = mock.Mock(return_value=cached_token) + + async def _acquire_token_silently(self, *scopes): + return self.acquire_token_silently(*scopes) + + async def _request_token(self, *scopes, **kwargs): + return self.request_token(*scopes, **kwargs) + + async def get_token(self, *_, **__): + return await super().get_token(*_, **__) + + +CACHED_TOKEN = "cached token" +SCOPE = "scope" + + +async def test_no_cached_token(): + """When it has no token cached, a credential should request one every time get_token is called""" + + credential = MockCredential() + token = await credential.get_token(SCOPE) + + credential.acquire_token_silently.assert_called_once_with(SCOPE) + credential.request_token.assert_called_once_with(SCOPE) + assert token.token == MockCredential.NEW_TOKEN.token + + +async def test_token_acquisition_failure(): + """When the credential has no token cached, every get_token call should prompt a token request""" + + credential = MockCredential() + credential.request_token = mock.Mock(side_effect=Exception("whoops")) + for i in range(4): + with pytest.raises(Exception): + await credential.get_token(SCOPE) + assert credential.request_token.call_count == i + 1 + credential.request_token.assert_called_with(SCOPE) + + +async def test_expired_token(): + """A credential should request a token when it has an expired token cached""" + + now = time.time() + credential = MockCredential(cached_token=AccessToken(CACHED_TOKEN, now - 1)) + token = await credential.get_token(SCOPE) + + credential.acquire_token_silently.assert_called_once_with(SCOPE) + credential.request_token.assert_called_once_with(SCOPE) + assert token.token == MockCredential.NEW_TOKEN.token + + +async def test_cached_token_outside_refresh_window(): + """A credential shouldn't request a new token when it has a cached one with sufficient validity remaining""" + + credential = MockCredential(cached_token=AccessToken(CACHED_TOKEN, time.time() + DEFAULT_REFRESH_OFFSET + 1)) + token = await credential.get_token(SCOPE) + + credential.acquire_token_silently.assert_called_once_with(SCOPE) + assert credential.request_token.call_count == 0 + assert token.token == CACHED_TOKEN + + +async def test_cached_token_within_refresh_window(): + """A credential should request a new token when its cached one is within the refresh window""" + + credential = MockCredential(cached_token=AccessToken(CACHED_TOKEN, time.time() + DEFAULT_REFRESH_OFFSET - 1)) + token = await credential.get_token(SCOPE) + + credential.acquire_token_silently.assert_called_once_with(SCOPE) + credential.request_token.assert_called_once_with(SCOPE) + assert token.token == MockCredential.NEW_TOKEN.token + + +async def test_retry_delay(): + """A credential should wait between requests when trying to refresh a token""" + + now = time.time() + credential = MockCredential(cached_token=AccessToken(CACHED_TOKEN, now + DEFAULT_REFRESH_OFFSET - 1)) + + # the credential should swallow exceptions during proactive refresh attempts + credential.request_token = mock.Mock(side_effect=Exception("whoops")) + for i in range(4): + token = await credential.get_token(SCOPE) + assert token.token == CACHED_TOKEN + credential.acquire_token_silently.assert_called_with(SCOPE) + credential.request_token.assert_called_once_with(SCOPE) diff --git a/sdk/identity/azure-identity/tests/test_imds_credential.py b/sdk/identity/azure-identity/tests/test_imds_credential.py index 8b040b769f554..95f53088b11a3 100644 --- a/sdk/identity/azure-identity/tests/test_imds_credential.py +++ b/sdk/identity/azure-identity/tests/test_imds_credential.py @@ -169,7 +169,7 @@ def test_identity_config(): ], ) - credential = ImdsCredential(_identity_config={param_name: param_value}, transport=transport) + credential = ImdsCredential(identity_config={param_name: param_value}, transport=transport) token = credential.get_token(scope) assert token == expected_token diff --git a/sdk/identity/azure-identity/tests/test_imds_credential_async.py b/sdk/identity/azure-identity/tests/test_imds_credential_async.py index 8c42e643a8555..a4d056f399fc5 100644 --- a/sdk/identity/azure-identity/tests/test_imds_credential_async.py +++ b/sdk/identity/azure-identity/tests/test_imds_credential_async.py @@ -198,7 +198,7 @@ async def test_identity_config(): ], ) - credential = ImdsCredential(client_id=client_id, _identity_config={param_name: param_value}, transport=transport) + credential = ImdsCredential(client_id=client_id, identity_config={param_name: param_value}, transport=transport) token = await credential.get_token(scope) assert token == expected_token diff --git a/sdk/identity/azure-identity/tests/test_interactive_credential.py b/sdk/identity/azure-identity/tests/test_interactive_credential.py index 9573c76236321..a708b7c2c9fce 100644 --- a/sdk/identity/azure-identity/tests/test_interactive_credential.py +++ b/sdk/identity/azure-identity/tests/test_interactive_credential.py @@ -3,9 +3,12 @@ # Licensed under the MIT License. # ------------------------------------ from azure.core.exceptions import ClientAuthenticationError -from azure.identity import KnownAuthorities, CredentialUnavailableError -from azure.identity._auth_record import AuthenticationRecord -from azure.identity._exceptions import AuthenticationRequiredError +from azure.identity import ( + AuthenticationRequiredError, + AuthenticationRecord, + KnownAuthorities, + CredentialUnavailableError, +) from azure.identity._internal import InteractiveCredential from msal import TokenCache import pytest @@ -15,7 +18,21 @@ except ImportError: # python < 3.3 from mock import Mock, patch # type: ignore -from helpers import build_aad_response +from helpers import build_aad_response, build_id_token, id_token_claims + + +# fake object for tests which need to exercise request_token but don't care about its return value +REQUEST_TOKEN_RESULT = build_aad_response( + access_token="***", + id_token_claims=id_token_claims( + aud="...", + iss="http://localhost/tenant", + sub="subject", + preferred_username="...", + tenant_id="...", + object_id="...", + ), +) class MockCredential(InteractiveCredential): @@ -64,7 +81,7 @@ def validate_app_parameters(authority, client_id, **_): app_factory = Mock(wraps=validate_app_parameters) credential = MockCredential( - _authentication_record=record, _disable_automatic_authentication=True, msal_app_factory=app_factory, + authentication_record=record, disable_automatic_authentication=True, msal_app_factory=app_factory, ) with pytest.raises(AuthenticationRequiredError): credential.get_token("scope") @@ -87,9 +104,9 @@ def validate_authority(authority, **_): return Mock(get_accounts=Mock(return_value=[])) credential = MockCredential( - _authentication_record=record, + authentication_record=record, tenant_id=expected_tenant, - _disable_automatic_authentication=True, + disable_automatic_authentication=True, msal_app_factory=validate_authority, ) with pytest.raises(AuthenticationRequiredError): @@ -107,8 +124,8 @@ def test_disable_automatic_authentication(): ) credential = MockCredential( - _authentication_record=record, - _disable_automatic_authentication=True, + authentication_record=record, + disable_automatic_authentication=True, msal_app_factory=lambda *_, **__: msal_app, request_token=Mock(side_effect=Exception("credential shouldn't begin interactive authentication")), ) @@ -129,14 +146,14 @@ def test_scopes_round_trip(): def validate_scopes(*scopes, **_): assert scopes == (scope,) - return {"access_token": "**", "expires_in": 42} + return REQUEST_TOKEN_RESULT request_token = Mock(wraps=validate_scopes) - credential = MockCredential(_disable_automatic_authentication=True, request_token=request_token) + credential = MockCredential(disable_automatic_authentication=True, request_token=request_token) with pytest.raises(AuthenticationRequiredError) as ex: credential.get_token(scope) - credential._authenticate(scopes=ex.value.scopes) + credential.authenticate(scopes=ex.value.scopes) assert request_token.call_count == 1, "validation method wasn't called" @@ -155,10 +172,10 @@ def test_authenticate_default_scopes(authority, expected_scope): def validate_scopes(*scopes): assert scopes == (expected_scope,) - return {"access_token": "**", "expires_in": 42} + return REQUEST_TOKEN_RESULT request_token = Mock(wraps=validate_scopes) - MockCredential(authority=authority, request_token=request_token)._authenticate() + MockCredential(authority=authority, request_token=request_token).authenticate() assert request_token.call_count == 1 @@ -166,15 +183,15 @@ def test_authenticate_unknown_cloud(): """authenticate should raise when given no scopes in an unknown cloud""" with pytest.raises(CredentialUnavailableError): - MockCredential(authority="localhost")._authenticate() + MockCredential(authority="localhost").authenticate() @pytest.mark.parametrize("option", (True, False)) def test_authenticate_ignores_disable_automatic_authentication(option): """authenticate should prompt for authentication regardless of the credential's configuration""" - request_token = Mock(return_value={"access_token": "**", "expires_in": 42}) - MockCredential(request_token=request_token, _disable_automatic_authentication=option)._authenticate() + request_token = Mock(return_value=REQUEST_TOKEN_RESULT) + MockCredential(request_token=request_token, disable_automatic_authentication=option).authenticate() assert request_token.call_count == 1, "credential didn't begin interactive authentication" @@ -190,7 +207,7 @@ class CustomException(Exception): acquire_token_silent_with_error=Mock(side_effect=CustomException(expected_message)), get_accounts=Mock(return_value=[{"home_account_id": record.home_account_id}]), ) - credential = MockCredential(msal_app_factory=lambda *_, **__: msal_app, _authentication_record=record) + credential = MockCredential(msal_app_factory=lambda *_, **__: msal_app, authentication_record=record) with pytest.raises(ClientAuthenticationError) as ex: credential.get_token("scope") @@ -220,20 +237,20 @@ def _request_token(self, *_, **__): assert credential._cache is in_memory_cache # allowing an unencrypted cache doesn't count as opting in to the persistent cache - credential = TestCredential(_allow_unencrypted_cache=True) + credential = TestCredential(allow_unencrypted_cache=True) assert credential._cache is in_memory_cache # keyword argument opts in to persistent cache with patch(persistent_cache + ".msal_extensions") as mock_extensions: - TestCredential(_enable_persistent_cache=True) + TestCredential(enable_persistent_cache=True) assert mock_extensions.PersistedTokenCache.call_count == 1 # opting in on an unsupported platform raises an exception with patch(persistent_cache + ".sys.platform", "commodore64"): with pytest.raises(NotImplementedError): - TestCredential(_enable_persistent_cache=True) + TestCredential(enable_persistent_cache=True) with pytest.raises(NotImplementedError): - TestCredential(_enable_persistent_cache=True, _allow_unencrypted_cache=True) + TestCredential(enable_persistent_cache=True, allow_unencrypted_cache=True) @patch("azure.identity._internal.persistent_cache.sys.platform", "linux2") @@ -252,7 +269,7 @@ def _request_token(self, *_, **__): pass # the credential should prefer an encrypted cache even when the user allows an unencrypted one - TestCredential(_enable_persistent_cache=True, _allow_unencrypted_cache=True) + TestCredential(enable_persistent_cache=True, allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.LibsecretPersistence) mock_extensions.PersistedTokenCache.reset_mock() @@ -261,9 +278,9 @@ def _request_token(self, *_, **__): # encryption unavailable, no opt in to unencrypted cache -> credential should raise with pytest.raises(ValueError): - TestCredential(_enable_persistent_cache=True) + TestCredential(enable_persistent_cache=True) - TestCredential(_enable_persistent_cache=True, _allow_unencrypted_cache=True) + TestCredential(enable_persistent_cache=True, allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.FilePersistence) @@ -289,23 +306,26 @@ def __init__(self, **kwargs): def _request_token(self, *_, **__): return msal_response - record = TestCredential()._authenticate() + record = TestCredential().authenticate() assert record.home_account_id == "{}.{}".format(object_id, home_tenant) -def test_home_account_id_no_client_info(): - """the credential should use the subject claim as home_account_id when MSAL doesn't provide client_info""" +def test_adfs(): + """the credential should be able to construct an AuthenticationRecord from an ADFS response returned by MSAL""" + authority = "localhost" subject = "subject" + tenant = "adfs" + username = "username" msal_response = build_aad_response(access_token="***", refresh_token="**") - msal_response["id_token_claims"] = { - "aud": "client-id", - "iss": "https://localhost", - "object_id": "some-guid", - "tid": "some-tenant", - "preferred_username": "me", - "sub": subject, - } + msal_response["id_token_claims"] = id_token_claims( + aud="client-id", + iss="https://{}/{}".format(authority, tenant), + sub=subject, + tenant_id=tenant, + object_id="object-id", + upn=username, + ) class TestCredential(InteractiveCredential): def __init__(self, **kwargs): @@ -314,5 +334,8 @@ def __init__(self, **kwargs): def _request_token(self, *_, **__): return msal_response - record = TestCredential()._authenticate() + record = TestCredential().authenticate() + assert record.authority == authority assert record.home_account_id == subject + assert record.tenant_id == tenant + assert record.username == username diff --git a/sdk/identity/azure-identity/tests/test_managed_identity.py b/sdk/identity/azure-identity/tests/test_managed_identity.py index e20e3f73ed991..5fc1ea3720d27 100644 --- a/sdk/identity/azure-identity/tests/test_managed_identity.py +++ b/sdk/identity/azure-identity/tests/test_managed_identity.py @@ -13,6 +13,7 @@ from azure.identity import ManagedIdentityCredential from azure.identity._constants import Endpoints, EnvironmentVariables from azure.identity._internal.user_agent import USER_AGENT +import pytest from helpers import build_aad_response, validating_transport, mock_response, Request @@ -92,12 +93,11 @@ def test_cloud_shell_user_assigned_identity(): assert token == expected_token -def test_app_service(): - """App Service environment: MSI_ENDPOINT, MSI_SECRET set""" +def test_prefers_app_service_2019_08_01(): + """When the environment is configured for both App Service versions, the credential should prefer the most recent""" access_token = "****" expires_on = 42 - expected_token = AccessToken(access_token, expires_on) endpoint = "http://localhost:42/token" secret = "expected-secret" scope = "scope" @@ -106,15 +106,15 @@ def test_app_service(): Request( base_url=endpoint, method="GET", - required_headers={"Metadata": "true", "secret": secret, "User-Agent": USER_AGENT}, - required_params={"api-version": "2017-09-01", "resource": scope}, + required_headers={"X-IDENTITY-HEADER": secret, "User-Agent": USER_AGENT}, + required_params={"api-version": "2019-08-01", "resource": scope}, ) ], responses=[ mock_response( json_payload={ "access_token": access_token, - "expires_on": expires_on, + "expires_on": str(expires_on), "resource": scope, "token_type": "Bearer", } @@ -122,11 +122,58 @@ def test_app_service(): ], ) - with mock.patch( - "os.environ", {EnvironmentVariables.MSI_ENDPOINT: endpoint, EnvironmentVariables.MSI_SECRET: secret} - ): + environ = { + EnvironmentVariables.IDENTITY_ENDPOINT: endpoint, + EnvironmentVariables.IDENTITY_HEADER: secret, + EnvironmentVariables.MSI_ENDPOINT: endpoint, + EnvironmentVariables.MSI_SECRET: secret, + } + with mock.patch.dict("os.environ", environ, clear=True): token = ManagedIdentityCredential(transport=transport).get_token(scope) - assert token == expected_token + assert token.token == access_token + assert token.expires_on == expires_on + + +def test_app_service_2019_08_01(): + """App Service 2019-08-01: IDENTITY_ENDPOINT, IDENTITY_HEADER set""" + + access_token = "****" + expires_on = 42 + endpoint = "http://localhost:42/token" + secret = "expected-secret" + scope = "scope" + + def send(request, **_): + assert request.url.startswith(endpoint) + assert request.method == "GET" + assert request.headers["X-IDENTITY-HEADER"] == secret + assert request.headers["User-Agent"] == USER_AGENT + assert request.query["api-version"] == "2019-08-01" + assert request.query["resource"] == scope + + return mock_response( + json_payload={ + "access_token": access_token, + "expires_on": str(expires_on), + "resource": scope, + "token_type": "Bearer", + } + ) + + # when configuration for both API versions is present, the credential should prefer the most recent + for environment in [ + {EnvironmentVariables.IDENTITY_ENDPOINT: endpoint, EnvironmentVariables.IDENTITY_HEADER: secret}, + { + EnvironmentVariables.IDENTITY_ENDPOINT: endpoint, + EnvironmentVariables.IDENTITY_HEADER: secret, + EnvironmentVariables.MSI_ENDPOINT: endpoint, + EnvironmentVariables.MSI_SECRET: secret, + }, + ]: + with mock.patch.dict("os.environ", environment, clear=True): + token = ManagedIdentityCredential(transport=mock.Mock(send=send)).get_token(scope) + assert token.token == access_token + assert token.expires_on == expires_on def test_app_service_2017_09_01(): @@ -144,7 +191,7 @@ def test_app_service_2017_09_01(): Request( url, method="GET", - required_headers={"Metadata": "true", "secret": secret, "User-Agent": USER_AGENT}, + required_headers={"secret": secret, "User-Agent": USER_AGENT}, required_params={"api-version": "2017-09-01", "resource": scope}, ) ] @@ -184,7 +231,7 @@ def test_app_service_2017_09_01(): def test_app_service_user_assigned_identity(): - """App Service environment: MSI_ENDPOINT, MSI_SECRET set""" + """App Service 2017-09-01: MSI_ENDPOINT, MSI_SECRET set""" access_token = "****" expires_on = 42 @@ -198,7 +245,7 @@ def test_app_service_user_assigned_identity(): Request( base_url=endpoint, method="GET", - required_headers={"Metadata": "true", "secret": secret, "User-Agent": USER_AGENT}, + required_headers={"secret": secret, "User-Agent": USER_AGENT}, required_params={"api-version": "2017-09-01", "clientid": client_id, "resource": scope}, ) ], @@ -206,7 +253,7 @@ def test_app_service_user_assigned_identity(): mock_response( json_payload={ "access_token": access_token, - "expires_on": expires_on, + "expires_on": "01/01/1970 00:00:{} +00:00".format(expires_on), "resource": scope, "token_type": "Bearer", } @@ -263,16 +310,23 @@ def test_client_id_none(): """the credential should ignore client_id=None""" expected_access_token = "****" + scope = "scope" def send(request, **_): assert "client_id" not in request.query # IMDS assert "clientid" not in request.query # App Service 2017-09-01 if request.data: assert "client_id" not in request.body # Cloud Shell - return mock_response(json_payload=(build_aad_response(access_token=expected_access_token))) + return mock_response( + json_payload=( + build_aad_response( + access_token=expected_access_token, expires_on="01/01/1970 00:00:42 +00:00", resource=scope + ) + ) + ) credential = ManagedIdentityCredential(client_id=None, transport=mock.Mock(send=send)) - token = credential.get_token("scope") + token = credential.get_token(scope) assert token.token == expected_access_token with mock.patch.dict( @@ -281,14 +335,14 @@ def send(request, **_): clear=True, ): credential = ManagedIdentityCredential(client_id=None, transport=mock.Mock(send=send)) - token = credential.get_token("scope") + token = credential.get_token(scope) assert token.token == expected_access_token with mock.patch.dict( MANAGED_IDENTITY_ENVIRON, {EnvironmentVariables.MSI_ENDPOINT: "https://localhost"}, clear=True, ): credential = ManagedIdentityCredential(client_id=None, transport=mock.Mock(send=send)) - token = credential.get_token("scope") + token = credential.get_token(scope) assert token.token == expected_access_token diff --git a/sdk/identity/azure-identity/tests/test_managed_identity_async.py b/sdk/identity/azure-identity/tests/test_managed_identity_async.py index cab5f2da2de67..517c00f0b43d3 100644 --- a/sdk/identity/azure-identity/tests/test_managed_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_managed_identity_async.py @@ -94,41 +94,46 @@ async def test_cloud_shell_user_assigned_identity(): @pytest.mark.asyncio -async def test_app_service(): - """App Service environment: MSI_ENDPOINT, MSI_SECRET set""" +async def test_app_service_2019_08_01(): + """App Service 2019-08-01: IDENTITY_ENDPOINT, IDENTITY_HEADER set""" access_token = "****" expires_on = 42 - expected_token = AccessToken(access_token, expires_on) endpoint = "http://localhost:42/token" secret = "expected-secret" scope = "scope" - transport = async_validating_transport( - requests=[ - Request( - base_url=endpoint, - method="GET", - required_headers={"Metadata": "true", "secret": secret, "User-Agent": USER_AGENT}, - required_params={"api-version": "2017-09-01", "resource": scope}, - ) - ], - responses=[ - mock_response( - json_payload={ - "access_token": access_token, - "expires_on": expires_on, - "resource": scope, - "token_type": "Bearer", - } - ) - ], - ) - with mock.patch( - "os.environ", {EnvironmentVariables.MSI_ENDPOINT: endpoint, EnvironmentVariables.MSI_SECRET: secret} - ): - token = await ManagedIdentityCredential(transport=transport).get_token(scope) - assert token == expected_token + async def send(request, **_): + assert request.url.startswith(endpoint) + assert request.method == "GET" + assert request.headers["X-IDENTITY-HEADER"] == secret + assert request.headers["User-Agent"] == USER_AGENT + assert request.query["api-version"] == "2019-08-01" + assert request.query["resource"] == scope + + return mock_response( + json_payload={ + "access_token": access_token, + "expires_on": str(expires_on), + "resource": scope, + "token_type": "Bearer", + } + ) + + # when configuration for both API versions is present, the credential should prefer the most recent + for environment in [ + {EnvironmentVariables.IDENTITY_ENDPOINT: endpoint, EnvironmentVariables.IDENTITY_HEADER: secret}, + { + EnvironmentVariables.IDENTITY_ENDPOINT: endpoint, + EnvironmentVariables.IDENTITY_HEADER: secret, + EnvironmentVariables.MSI_ENDPOINT: endpoint, + EnvironmentVariables.MSI_SECRET: secret, + }, + ]: + with mock.patch.dict("os.environ", environment, clear=True): + token = await ManagedIdentityCredential(transport=mock.Mock(send=send)).get_token(scope) + assert token.token == access_token + assert token.expires_on == expires_on @pytest.mark.asyncio @@ -147,7 +152,7 @@ async def test_app_service_2017_09_01(): Request( url, method="GET", - required_headers={"Metadata": "true", "secret": secret, "User-Agent": USER_AGENT}, + required_headers={"secret": secret, "User-Agent": USER_AGENT}, required_params={"api-version": "2017-09-01", "resource": scope}, ) ] @@ -188,7 +193,7 @@ async def test_app_service_2017_09_01(): @pytest.mark.asyncio async def test_app_service_user_assigned_identity(): - """App Service environment: MSI_ENDPOINT, MSI_SECRET set""" + """App Service 2017-09-01: MSI_ENDPOINT, MSI_SECRET set""" access_token = "****" expires_on = 42 @@ -202,7 +207,7 @@ async def test_app_service_user_assigned_identity(): Request( base_url=endpoint, method="GET", - required_headers={"Metadata": "true", "secret": secret, "User-Agent": USER_AGENT}, + required_headers={"secret": secret, "User-Agent": USER_AGENT}, required_params={"api-version": "2017-09-01", "clientid": client_id, "resource": scope}, ) ], @@ -210,7 +215,7 @@ async def test_app_service_user_assigned_identity(): mock_response( json_payload={ "access_token": access_token, - "expires_on": expires_on, + "expires_on": "01/01/1970 00:00:{} +00:00".format(expires_on), "resource": scope, "token_type": "Bearer", } @@ -230,17 +235,24 @@ async def test_client_id_none(): """the credential should ignore client_id=None""" expected_access_token = "****" + scope = "scope" async def send(request, **_): assert "client_id" not in request.query # IMDS assert "clientid" not in request.query # App Service 2017-09-01 if request.data: assert "client_id" not in request.body # Cloud Shell - return mock_response(json_payload=(build_aad_response(access_token=expected_access_token))) + return mock_response( + json_payload=( + build_aad_response( + access_token=expected_access_token, expires_on="01/01/1970 00:00:42 +00:00", resource=scope + ) + ) + ) with mock.patch.dict(MANAGED_IDENTITY_ENVIRON, {}, clear=True): credential = ManagedIdentityCredential(client_id=None, transport=mock.Mock(send=send)) - token = await credential.get_token("scope") + token = await credential.get_token(scope) assert token.token == expected_access_token with mock.patch.dict( @@ -249,14 +261,14 @@ async def send(request, **_): clear=True, ): credential = ManagedIdentityCredential(client_id=None, transport=mock.Mock(send=send)) - token = await credential.get_token("scope") + token = await credential.get_token(scope) assert token.token == expected_access_token with mock.patch.dict( MANAGED_IDENTITY_ENVIRON, {EnvironmentVariables.MSI_ENDPOINT: "https://localhost"}, clear=True, ): credential = ManagedIdentityCredential(client_id=None, transport=mock.Mock(send=send)) - token = await credential.get_token("scope") + token = await credential.get_token(scope) assert token.token == expected_access_token diff --git a/sdk/identity/azure-identity/tests/test_msi_credential.py b/sdk/identity/azure-identity/tests/test_msi_credential.py index 28f67a357790e..7536688774e20 100644 --- a/sdk/identity/azure-identity/tests/test_msi_credential.py +++ b/sdk/identity/azure-identity/tests/test_msi_credential.py @@ -68,7 +68,7 @@ def test_identity_config_app_service(): {EnvironmentVariables.MSI_ENDPOINT: endpoint, EnvironmentVariables.MSI_SECRET: secret}, clear=True, ): - credential = MsiCredential(_identity_config={param_name: param_value}, transport=transport) + credential = MsiCredential(identity_config={param_name: param_value}, transport=transport) token = credential.get_token(scope) assert token == expected_token @@ -107,7 +107,7 @@ def test_identity_config_cloud_shell(): with mock.patch.dict( MsiCredential.__module__ + ".os.environ", {EnvironmentVariables.MSI_ENDPOINT: endpoint}, clear=True ): - credential = MsiCredential(_identity_config={param_name: param_value}, transport=transport) + credential = MsiCredential(identity_config={param_name: param_value}, transport=transport) token = credential.get_token(scope) assert token == expected_token diff --git a/sdk/identity/azure-identity/tests/test_msi_credential_async.py b/sdk/identity/azure-identity/tests/test_msi_credential_async.py index b9ff2bf114f88..dfa038963536f 100644 --- a/sdk/identity/azure-identity/tests/test_msi_credential_async.py +++ b/sdk/identity/azure-identity/tests/test_msi_credential_async.py @@ -96,7 +96,7 @@ async def test_identity_config_app_service(): {EnvironmentVariables.MSI_ENDPOINT: endpoint, EnvironmentVariables.MSI_SECRET: secret}, clear=True, ): - credential = MsiCredential(_identity_config={param_name: param_value}, transport=transport) + credential = MsiCredential(identity_config={param_name: param_value}, transport=transport) token = await credential.get_token(scope) assert token == expected_token @@ -135,7 +135,7 @@ async def test_identity_config_cloud_shell(): with mock.patch.dict( MsiCredential.__module__ + ".os.environ", {EnvironmentVariables.MSI_ENDPOINT: endpoint}, clear=True ): - credential = MsiCredential(_identity_config={param_name: param_value}, transport=transport) + credential = MsiCredential(identity_config={param_name: param_value}, transport=transport) token = await credential.get_token(scope) assert token == expected_token diff --git a/sdk/identity/azure-identity/tests/test_shared_cache_credential.py b/sdk/identity/azure-identity/tests/test_shared_cache_credential.py index e2b1713c9d07d..5d756ecface17 100644 --- a/sdk/identity/azure-identity/tests/test_shared_cache_credential.py +++ b/sdk/identity/azure-identity/tests/test_shared_cache_credential.py @@ -4,8 +4,11 @@ # ------------------------------------ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline.policies import SansIOHTTPPolicy -from azure.identity import CredentialUnavailableError, SharedTokenCacheCredential -from azure.identity._auth_record import AuthenticationRecord +from azure.identity import ( + AuthenticationRecord, + CredentialUnavailableError, + SharedTokenCacheCredential, +) from azure.identity._constants import AZURE_CLI_CLIENT_ID, EnvironmentVariables from azure.identity._internal.shared_token_cache import ( KNOWN_ALIASES, @@ -511,7 +514,7 @@ def test_authority_environment_variable(): def test_authentication_record_empty_cache(): record = AuthenticationRecord("tenant_id", "client_id", "authority", "home_account_id", "username") transport = Mock(side_effect=Exception("the credential shouldn't send a request")) - credential = SharedTokenCacheCredential(_authentication_record=record, transport=transport, _cache=TokenCache()) + credential = SharedTokenCacheCredential(authentication_record=record, transport=transport, _cache=TokenCache()) with pytest.raises(CredentialUnavailableError): credential.get_token("scope") @@ -532,7 +535,7 @@ def test_authentication_record_no_match(): "not-" + username, "not-" + object_id, "different-" + tenant_id, client_id="not-" + client_id, ), ) - credential = SharedTokenCacheCredential(_authentication_record=record, transport=transport, _cache=cache) + credential = SharedTokenCacheCredential(authentication_record=record, transport=transport, _cache=cache) with pytest.raises(CredentialUnavailableError): credential.get_token("scope") @@ -558,7 +561,7 @@ def test_authentication_record(): requests=[Request(authority=authority, required_data={"refresh_token": expected_refresh_token})], responses=[mock_response(json_payload=build_aad_response(access_token=expected_access_token))], ) - credential = SharedTokenCacheCredential(_authentication_record=record, transport=transport, _cache=cache) + credential = SharedTokenCacheCredential(authentication_record=record, transport=transport, _cache=cache) token = credential.get_token("scope") assert token.token == expected_access_token @@ -594,13 +597,12 @@ def test_auth_record_multiple_accounts_for_username(): requests=[Request(authority=authority, required_data={"refresh_token": expected_refresh_token})], responses=[mock_response(json_payload=build_aad_response(access_token=expected_access_token))], ) - credential = SharedTokenCacheCredential(_authentication_record=record, transport=transport, _cache=cache) + credential = SharedTokenCacheCredential(authentication_record=record, transport=transport, _cache=cache) token = credential.get_token("scope") assert token.token == expected_access_token -@pytest.mark.skip("in 1.4.0 allow_unencrypted_cache is private and defaults to True") @patch("azure.identity._internal.persistent_cache.sys.platform", "linux2") @patch("azure.identity._internal.persistent_cache.msal_extensions") def test_allow_unencrypted_cache(mock_extensions): @@ -610,7 +612,7 @@ def test_allow_unencrypted_cache(mock_extensions): """ # the credential should prefer an encrypted cache even when the user allows an unencrypted one - SharedTokenCacheCredential(_allow_unencrypted_cache=True) + SharedTokenCacheCredential(allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.LibsecretPersistence) mock_extensions.PersistedTokenCache.reset_mock() @@ -623,7 +625,7 @@ def test_allow_unencrypted_cache(mock_extensions): assert mock_extensions.PersistedTokenCache.call_count == 0 # still no encryption, but now we allow the unencrypted fallback - SharedTokenCacheCredential(_allow_unencrypted_cache=True) + SharedTokenCacheCredential(allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.FilePersistence) @@ -743,7 +745,7 @@ def test_authentication_record_authenticating_tenant(): with patch.object(SharedTokenCacheCredential, "_get_auth_client") as get_auth_client: credential = SharedTokenCacheCredential( - _authentication_record=record, _cache=TokenCache(), tenant_id=expected_tenant_id + authentication_record=record, _cache=TokenCache(), tenant_id=expected_tenant_id ) with pytest.raises(CredentialUnavailableError): # this raises because the cache is empty @@ -767,7 +769,7 @@ def get_account_event( uid=uid, utid=utid, refresh_token=refresh_token, - id_token=build_id_token(aud=client_id, preferred_username=username), + id_token=build_id_token(aud=client_id, username=username), foci="1", **kwargs ), diff --git a/sdk/identity/azure-identity/tests/test_shared_cache_credential_async.py b/sdk/identity/azure-identity/tests/test_shared_cache_credential_async.py index 518913db4eeb1..389ba606d482e 100644 --- a/sdk/identity/azure-identity/tests/test_shared_cache_credential_async.py +++ b/sdk/identity/azure-identity/tests/test_shared_cache_credential_async.py @@ -7,8 +7,8 @@ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline.policies import SansIOHTTPPolicy -from azure.identity import CredentialUnavailableError -from azure.identity._auth_record import AuthenticationRecord +from azure.identity import AuthenticationRecord, CredentialUnavailableError +from azure.identity.aio import SharedTokenCacheCredential from azure.identity._constants import EnvironmentVariables from azure.identity._internal.shared_token_cache import ( KNOWN_ALIASES, @@ -18,7 +18,6 @@ NO_MATCHING_ACCOUNTS, ) from azure.identity._internal.user_agent import USER_AGENT -from azure.identity.aio import SharedTokenCacheCredential from msal import TokenCache import pytest @@ -594,7 +593,7 @@ async def test_authority_environment_variable(): async def test_authentication_record_empty_cache(): record = AuthenticationRecord("tenant_id", "client_id", "authority", "home_account_id", "username") transport = Mock(side_effect=Exception("the credential shouldn't send a request")) - credential = SharedTokenCacheCredential(_authentication_record=record, transport=transport, _cache=TokenCache()) + credential = SharedTokenCacheCredential(authentication_record=record, transport=transport, _cache=TokenCache()) with pytest.raises(CredentialUnavailableError): await credential.get_token("scope") @@ -616,7 +615,7 @@ async def test_authentication_record_no_match(): "not-" + username, "not-" + object_id, "different-" + tenant_id, client_id="not-" + client_id, ), ) - credential = SharedTokenCacheCredential(_authentication_record=record, transport=transport, _cache=cache) + credential = SharedTokenCacheCredential(authentication_record=record, transport=transport, _cache=cache) with pytest.raises(CredentialUnavailableError): await credential.get_token("scope") @@ -643,7 +642,7 @@ async def test_authentication_record(): requests=[Request(authority=authority, required_data={"refresh_token": expected_refresh_token})], responses=[mock_response(json_payload=build_aad_response(access_token=expected_access_token))], ) - credential = SharedTokenCacheCredential(_authentication_record=record, transport=transport, _cache=cache) + credential = SharedTokenCacheCredential(authentication_record=record, transport=transport, _cache=cache) token = await credential.get_token("scope") assert token.token == expected_access_token @@ -680,7 +679,7 @@ async def test_auth_record_multiple_accounts_for_username(): requests=[Request(authority=authority, required_data={"refresh_token": expected_refresh_token})], responses=[mock_response(json_payload=build_aad_response(access_token=expected_access_token))], ) - credential = SharedTokenCacheCredential(_authentication_record=record, transport=transport, _cache=cache) + credential = SharedTokenCacheCredential(authentication_record=record, transport=transport, _cache=cache) token = await credential.get_token("scope") assert token.token == expected_access_token @@ -695,7 +694,7 @@ async def test_authentication_record_authenticating_tenant(): with patch.object(SharedTokenCacheCredential, "_get_auth_client") as get_auth_client: credential = SharedTokenCacheCredential( - _authentication_record=record, _cache=TokenCache(), tenant_id=expected_tenant_id + authentication_record=record, _cache=TokenCache(), tenant_id=expected_tenant_id ) with pytest.raises(CredentialUnavailableError): # this raises because the cache is empty @@ -706,7 +705,6 @@ async def test_authentication_record_authenticating_tenant(): assert kwargs["tenant_id"] == expected_tenant_id -@pytest.mark.skip("in 1.4.0 allow_unencrypted_cache is private and defaults to True") @pytest.mark.asyncio async def test_allow_unencrypted_cache(): """The credential should use an unencrypted cache when encryption is unavailable and the user explicitly allows it. @@ -721,7 +719,7 @@ async def test_allow_unencrypted_cache(): mock_extensions = msal_extensions_patch.start() # the credential should prefer an encrypted cache even when the user allows an unencrypted one - SharedTokenCacheCredential(_allow_unencrypted_cache=True) + SharedTokenCacheCredential(allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.LibsecretPersistence) mock_extensions.PersistedTokenCache.reset_mock() @@ -730,12 +728,12 @@ async def test_allow_unencrypted_cache(): # encryption unavailable, no opt in to unencrypted cache -> credential should be unavailable credential = SharedTokenCacheCredential() + assert mock_extensions.PersistedTokenCache.call_count == 0 with pytest.raises(CredentialUnavailableError): await credential.get_token("scope") - assert mock_extensions.PersistedTokenCache.call_count == 0 # still no encryption, but now we allow the unencrypted fallback - SharedTokenCacheCredential(_allow_unencrypted_cache=True) + SharedTokenCacheCredential(allow_unencrypted_cache=True) assert mock_extensions.PersistedTokenCache.called_with(mock_extensions.FilePersistence) msal_extensions_patch.stop() diff --git a/sdk/identity/azure-identity/tests/test_username_password_credential.py b/sdk/identity/azure-identity/tests/test_username_password_credential.py index 6a93b79d7827a..5e4349a6e6dff 100644 --- a/sdk/identity/azure-identity/tests/test_username_password_credential.py +++ b/sdk/identity/azure-identity/tests/test_username_password_credential.py @@ -35,7 +35,8 @@ def test_policies_configurable(): transport = validating_transport( requests=[Request()] * 3, - responses=[get_discovery_response()] * 2 + [mock_response(json_payload=build_aad_response(access_token="**"))], + responses=[get_discovery_response()] * 2 + + [mock_response(json_payload=build_aad_response(access_token="**", id_token=build_id_token()))], ) credential = UsernamePasswordCredential("client-id", "username", "password", policies=[policy], transport=transport) @@ -47,7 +48,8 @@ def test_policies_configurable(): def test_user_agent(): transport = validating_transport( requests=[Request()] * 2 + [Request(required_headers={"User-Agent": USER_AGENT})], - responses=[get_discovery_response()] * 2 + [mock_response(json_payload=build_aad_response(access_token="**"))], + responses=[get_discovery_response()] * 2 + + [mock_response(json_payload=build_aad_response(access_token="**", id_token=build_id_token()))], ) credential = UsernamePasswordCredential("client-id", "username", "password", transport=transport) @@ -57,6 +59,7 @@ def test_user_agent(): def test_username_password_credential(): expected_token = "access-token" + client_id = "client-id" transport = validating_transport( requests=[Request()] * 3, # not validating requests because they're formed by MSAL responses=[ @@ -66,18 +69,13 @@ def test_username_password_credential(): mock_response(json_payload={}), # token request mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } + json_payload=build_aad_response(access_token=expected_token, id_token=build_id_token(aud=client_id)) ), ], ) credential = UsernamePasswordCredential( - client_id="some-guid", + client_id=client_id, username="user@azure", password="secret_password", transport=transport, @@ -125,7 +123,7 @@ def test_authenticate(): tenant_id=tenant_id, transport=transport, ) - record = credential._authenticate(scopes=(scope,)) + record = credential.authenticate(scopes=(scope,)) assert record.authority == environment assert record.home_account_id == object_id + "." + home_tenant assert record.tenant_id == home_tenant diff --git a/sdk/identity/ci.yml b/sdk/identity/ci.yml index 9dc9f51b39d36..b60ad946bc9fa 100644 --- a/sdk/identity/ci.yml +++ b/sdk/identity/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -40,4 +39,4 @@ extends: Artifacts: - name: azure_identity - safeName: azureidentity \ No newline at end of file + safeName: azureidentity diff --git a/sdk/iothub/ci.yml b/sdk/iothub/ci.yml index dcd21b01b2b93..a8a117296a6cf 100644 --- a/sdk/iothub/ci.yml +++ b/sdk/iothub/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -34,4 +33,4 @@ extends: - name: azure_mgmt_iothubprovisioningservices safeName: azuremgmtiothubprovisioningservices - name: azure_mgmt_iotcentral - safeName: azuremgmtiotcentral \ No newline at end of file + safeName: azuremgmtiotcentral diff --git a/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md b/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md new file mode 100644 index 0000000000000..332564950c286 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0b1 (Unreleased) diff --git a/sdk/keyvault/azure-keyvault-administration/MANIFEST.in b/sdk/keyvault/azure-keyvault-administration/MANIFEST.in new file mode 100644 index 0000000000000..d1b90ace051f4 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/MANIFEST.in @@ -0,0 +1,5 @@ +include *.md +include azure/__init__.py +include azure/keyvault/__init__.py +recursive-include samples *.py +recursive-include tests *.py \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/README.md b/sdk/keyvault/azure-keyvault-administration/README.md new file mode 100644 index 0000000000000..f4333cb7ed361 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/README.md @@ -0,0 +1,29 @@ +# Azure Key Vault Administration client library for Python + +## Getting started + +## Key concepts + +## Examples + +## Troubleshooting + +## Next steps + +## Contributing +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%2Fkeyvault%2Fazure-keyvault-administration%2FFREADME.png) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/__init__.py new file mode 100644 index 0000000000000..679ab69951347 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/__init__.py @@ -0,0 +1,5 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/__init__.py new file mode 100644 index 0000000000000..679ab69951347 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/__init__.py @@ -0,0 +1,5 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py new file mode 100644 index 0000000000000..f512df41adc15 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py @@ -0,0 +1,19 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from ._access_control_client import KeyVaultAccessControlClient +from ._internal.client_base import ApiVersion +from ._models import ( + KeyVaultPermission, KeyVaultRoleAssignment, KeyVaultRoleDefinition, KeyVaultRoleScope +) + + +__all__ = [ + "ApiVersion", + "KeyVaultAccessControlClient", + "KeyVaultPermission", + "KeyVaultRoleAssignment", + "KeyVaultRoleDefinition", + "KeyVaultRoleScope", +] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_access_control_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_access_control_client.py new file mode 100644 index 0000000000000..03cf21ca5aa14 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_access_control_client.py @@ -0,0 +1,125 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from typing import TYPE_CHECKING + +from azure.core.tracing.decorator import distributed_trace + +from ._models import KeyVaultRoleAssignment, KeyVaultRoleDefinition +from ._internal import KeyVaultClientBase + +if TYPE_CHECKING: + from typing import Any, Union + from uuid import UUID + from azure.core.paging import ItemPaged + from ._models import KeyVaultRoleScope + + +class KeyVaultAccessControlClient(KeyVaultClientBase): + """Manages role-based access to Azure Key Vault. + + :param str vault_url: URL of the vault the client will manage. This is also called the vault's "DNS Name". + :param credential: an object which can provide an access token for the vault, such as a credential from + :mod:`azure.identity` + """ + + # pylint:disable=protected-access + + @distributed_trace + def create_role_assignment(self, role_scope, role_assignment_name, role_definition_id, principal_id, **kwargs): + # type: (Union[str, KeyVaultRoleScope], Union[str, UUID], str, str, **Any) -> KeyVaultRoleAssignment + """Create a role assignment. + + :param role_scope: scope the role assignment will apply over. :class:`KeyVaultRoleScope` defines common + broad scopes. Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :param role_assignment_name: a name for the role assignment. Must be a UUID. + :type role_assignment_name: str or uuid.UUID + :param str role_definition_id: ID of the role's definition + :param str principal_id: Azure Active Directory object ID of the principal which will be assigned the role. The + principal can be a user, service principal, or security group. + :rtype: KeyVaultRoleAssignment + """ + create_parameters = self._client.role_assignments.models.RoleAssignmentCreateParameters( + properties=self._client.role_assignments.models.RoleAssignmentProperties( + principal_id=principal_id, role_definition_id=str(role_definition_id) + ) + ) + assignment = self._client.role_assignments.create( + vault_base_url=self._vault_url, + scope=role_scope, + role_assignment_name=role_assignment_name, + parameters=create_parameters, + **kwargs + ) + return KeyVaultRoleAssignment._from_generated(assignment) + + @distributed_trace + def delete_role_assignment(self, role_scope, role_assignment_name, **kwargs): + # type: (Union[str, KeyVaultRoleScope], Union[str, UUID], **Any) -> KeyVaultRoleAssignment + """Delete a role assignment. + + :param role_scope: the assignment's scope, for example "/", "/keys", or "/keys/" + :class:`KeyVaultRoleScope` defines common broad scopes. Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :param role_assignment_name: the assignment's name. Must be a UUID. + :type role_assignment_name: str or uuid.UUID + :returns: the deleted assignment + :rtype: KeyVaultRoleAssignment + """ + assignment = self._client.role_assignments.delete( + vault_base_url=self._vault_url, scope=role_scope, role_assignment_name=str(role_assignment_name), **kwargs + ) + return KeyVaultRoleAssignment._from_generated(assignment) + + @distributed_trace + def get_role_assignment(self, role_scope, role_assignment_name, **kwargs): + # type: (Union[str, KeyVaultRoleScope], Union[str, UUID], **Any) -> KeyVaultRoleAssignment + """Get a role assignment. + + :param role_scope: the assignment's scope, for example "/", "/keys", or "/keys/" + :class:`KeyVaultRoleScope` defines common broad scopes. Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :param role_assignment_name: the assignment's name. Must be a UUID. + :type role_assignment_name: str or uuid.UUID + :rtype: KeyVaultRoleAssignment + """ + assignment = self._client.role_assignments.get( + vault_base_url=self._vault_url, scope=role_scope, role_assignment_name=str(role_assignment_name), **kwargs + ) + return KeyVaultRoleAssignment._from_generated(assignment) + + @distributed_trace + def list_role_assignments(self, role_scope, **kwargs): + # type: (Union[str, KeyVaultRoleScope], **Any) -> ItemPaged[KeyVaultRoleAssignment] + """List all role assignments for a scope. + + :param role_scope: scope of the role assignments. :class:`KeyVaultRoleScope` defines common broad scopes. + Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :rtype: ~azure.core.paging.ItemPaged[KeyVaultRoleAssignment] + """ + return self._client.role_assignments.list_for_scope( + self._vault_url, + role_scope, + cls=lambda result: [KeyVaultRoleAssignment._from_generated(a) for a in result], + **kwargs + ) + + @distributed_trace + def list_role_definitions(self, role_scope, **kwargs): + # type: (Union[str, KeyVaultRoleScope], **Any) -> ItemPaged[KeyVaultRoleDefinition] + """List all role definitions applicable at and above a scope. + + :param role_scope: scope of the role definitions. :class:`KeyVaultRoleScope` defines common broad scopes. + Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :rtype: ~azure.core.paging.ItemPaged[KeyVaultRoleDefinition] + """ + return self._client.role_definitions.list( + self._vault_url, + role_scope, + cls=lambda result: [KeyVaultRoleDefinition._from_generated(d) for d in result], + **kwargs + ) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/__init__.py new file mode 100644 index 0000000000000..a6c1f9b7a7928 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/__init__.py @@ -0,0 +1,16 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._key_vault_client import KeyVaultClient +__all__ = ['KeyVaultClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_configuration.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_configuration.py new file mode 100644 index 0000000000000..fea6e56a754e9 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_configuration.py @@ -0,0 +1,49 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from ._version import VERSION + + +class KeyVaultClientConfiguration(Configuration): + """Configuration for KeyVaultClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + """ + + def __init__( + self, + **kwargs # type: Any + ): + # type: (...) -> None + super(KeyVaultClientConfiguration, self).__init__(**kwargs) + + kwargs.setdefault('sdk_moniker', 'azure-keyvault/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_key_vault_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_key_vault_client.py new file mode 100644 index 0000000000000..f7e0861520ea4 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_key_vault_client.py @@ -0,0 +1,116 @@ +# 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. +# -------------------------------------------------------------------------- + +from azure.core import PipelineClient +from msrest import Serializer, Deserializer + +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin +from ._configuration import KeyVaultClientConfiguration +from ._operations_mixin import KeyVaultClientOperationsMixin +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass + +class KeyVaultClient(KeyVaultClientOperationsMixin, MultiApiClientMixin, _SDKClient): + """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. + + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + :param str api_version: API version to use if no profile is provided, or if + missing in profile. + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + DEFAULT_API_VERSION = '7.2-preview' + _PROFILE_TAG = "azure.keyvault.KeyVaultClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + + def __init__( + self, + api_version=None, + profile=KnownProfiles.default, + **kwargs # type: Any + ): + if api_version == '7.2-preview': + base_url = '{vaultBaseUrl}' + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + self._config = KeyVaultClientConfiguration(**kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + super(KeyVaultClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 7.2-preview: :mod:`v7_2_preview.models` + """ + if api_version == '7.2-preview': + from .v7_2_preview import models + return models + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + + @property + def role_assignments(self): + """Instance depends on the API version: + + * 7.2-preview: :class:`RoleAssignmentsOperations` + """ + api_version = self._get_api_version('role_assignments') + if api_version == '7.2-preview': + from .v7_2_preview.operations import RoleAssignmentsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def role_definitions(self): + """Instance depends on the API version: + + * 7.2-preview: :class:`RoleDefinitionsOperations` + """ + api_version = self._get_api_version('role_definitions') + if api_version == '7.2-preview': + from .v7_2_preview.operations import RoleDefinitionsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + def close(self): + self._client.close() + def __enter__(self): + self._client.__enter__() + return self + def __exit__(self, *exc_details): + self._client.__exit__(*exc_details) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_operations_mixin.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_operations_mixin.py new file mode 100644 index 0000000000000..f49ed4894e097 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_operations_mixin.py @@ -0,0 +1,195 @@ +# 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. +# -------------------------------------------------------------------------- +from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + +class KeyVaultClientOperationsMixin(object): + + def begin_full_backup( + self, + vault_base_url, # type: str + azure_storage_blob_container_uri=None, # type: Optional["models.SASTokenParameter"] + **kwargs # type: Any + ): + """Creates a full backup using a user-provided SAS token to an Azure blob storage container. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a + valid Azure blob container where full backup needs to be stored. This token needs to be valid + for at least next 24 hours from the time of making this call. + :type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either FullBackupOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.FullBackupOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_full_backup') + if api_version == '7.2-preview': + from .v7_2_preview.operations import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_full_backup(vault_base_url, azure_storage_blob_container_uri, **kwargs) + + def begin_full_restore_operation( + self, + vault_base_url, # type: str + restore_blob_details=None, # type: Optional["models.RestoreOperationParameters"] + **kwargs # type: Any + ): + """Restores all key materials using the SAS token pointing to a previously stored Azure Blob + storage backup folder. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous + successful full backup was stored. + :type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either RestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.RestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_full_restore_operation') + if api_version == '7.2-preview': + from .v7_2_preview.operations import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_full_restore_operation(vault_base_url, restore_blob_details, **kwargs) + + def begin_selective_key_restore_operation( + self, + vault_base_url, # type: str + key_name, # type: str + restore_blob_details=None, # type: Optional["models.SelectiveKeyRestoreOperationParameters"] + **kwargs # type: Any + ): + """Restores all key versions of a given key using user supplied SAS token pointing to a previously + stored Azure Blob storage backup folder. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param key_name: The name of the key to be restored from the user supplied backup. + :type key_name: str + :param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous + successful full backup was stored. + :type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either SelectiveKeyRestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_selective_key_restore_operation') + if api_version == '7.2-preview': + from .v7_2_preview.operations import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_selective_key_restore_operation(vault_base_url, key_name, restore_blob_details, **kwargs) + + def full_backup_status( + self, + vault_base_url, # type: str + job_id, # type: str + **kwargs # type: Any + ): + """Returns the status of full backup operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The id returned as part of the backup request. + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FullBackupOperation, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.FullBackupOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('full_backup_status') + if api_version == '7.2-preview': + from .v7_2_preview.operations import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.full_backup_status(vault_base_url, job_id, **kwargs) + + def restore_status( + self, + vault_base_url, # type: str + job_id, # type: str + **kwargs # type: Any + ): + """Returns the status of restore operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The Job Id returned part of the restore operation. + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreOperation, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RestoreOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('restore_status') + if api_version == '7.2-preview': + from .v7_2_preview.operations import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.restore_status(vault_base_url, job_id, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_version.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_version.py new file mode 100644 index 0000000000000..a30a458f8b5b3 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_version.py @@ -0,0 +1,8 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/__init__.py new file mode 100644 index 0000000000000..71ceadebe4301 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/__init__.py @@ -0,0 +1,10 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._key_vault_client_async import KeyVaultClient +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_configuration_async.py new file mode 100644 index 0000000000000..6725478d133dc --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_configuration_async.py @@ -0,0 +1,47 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from .._version import VERSION + + +class KeyVaultClientConfiguration(Configuration): + """Configuration for KeyVaultClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + """ + + def __init__( + self, + **kwargs # type: Any + ) -> None: + super(KeyVaultClientConfiguration, self).__init__(**kwargs) + + kwargs.setdefault('sdk_moniker', 'azure-keyvault/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_key_vault_client_async.py new file mode 100644 index 0000000000000..24bb6d619c517 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_key_vault_client_async.py @@ -0,0 +1,116 @@ +# 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. +# -------------------------------------------------------------------------- + +from azure.core import AsyncPipelineClient +from msrest import Serializer, Deserializer + +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin +from ._configuration_async import KeyVaultClientConfiguration +from ._operations_mixin_async import KeyVaultClientOperationsMixin +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass + +class KeyVaultClient(KeyVaultClientOperationsMixin, MultiApiClientMixin, _SDKClient): + """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. + + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + :param str api_version: API version to use if no profile is provided, or if + missing in profile. + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + DEFAULT_API_VERSION = '7.2-preview' + _PROFILE_TAG = "azure.keyvault.KeyVaultClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + + def __init__( + self, + api_version=None, + profile=KnownProfiles.default, + **kwargs # type: Any + ) -> None: + if api_version == '7.2-preview': + base_url = '{vaultBaseUrl}' + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + self._config = KeyVaultClientConfiguration(**kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + super(KeyVaultClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 7.2-preview: :mod:`v7_2_preview.models` + """ + if api_version == '7.2-preview': + from ..v7_2_preview import models + return models + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + + @property + def role_assignments(self): + """Instance depends on the API version: + + * 7.2-preview: :class:`RoleAssignmentsOperations` + """ + api_version = self._get_api_version('role_assignments') + if api_version == '7.2-preview': + from ..v7_2_preview.aio.operations_async import RoleAssignmentsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def role_definitions(self): + """Instance depends on the API version: + + * 7.2-preview: :class:`RoleDefinitionsOperations` + """ + api_version = self._get_api_version('role_definitions') + if api_version == '7.2-preview': + from ..v7_2_preview.aio.operations_async import RoleDefinitionsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + async def close(self): + await self._client.close() + async def __aenter__(self): + await self._client.__aenter__() + return self + async def __aexit__(self, *exc_details): + await self._client.__aexit__(*exc_details) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_operations_mixin_async.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_operations_mixin_async.py new file mode 100644 index 0000000000000..19f1dfa324e20 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_operations_mixin_async.py @@ -0,0 +1,191 @@ +# 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. +# -------------------------------------------------------------------------- +from msrest import Serializer, Deserializer +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.polling.async_base_polling import AsyncLROBasePolling + + +class KeyVaultClientOperationsMixin(object): + + async def begin_full_backup( + self, + vault_base_url: str, + azure_storage_blob_container_uri: Optional["models.SASTokenParameter"] = None, + **kwargs + ) -> AsyncLROPoller["models.FullBackupOperation"]: + """Creates a full backup using a user-provided SAS token to an Azure blob storage container. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a + valid Azure blob container where full backup needs to be stored. This token needs to be valid + for at least next 24 hours from the time of making this call. + :type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FullBackupOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.FullBackupOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_full_backup') + if api_version == '7.2-preview': + from ..v7_2_preview.aio.operations_async import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_full_backup(vault_base_url, azure_storage_blob_container_uri, **kwargs) + + async def begin_full_restore_operation( + self, + vault_base_url: str, + restore_blob_details: Optional["models.RestoreOperationParameters"] = None, + **kwargs + ) -> AsyncLROPoller["models.RestoreOperation"]: + """Restores all key materials using the SAS token pointing to a previously stored Azure Blob + storage backup folder. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous + successful full backup was stored. + :type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.RestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_full_restore_operation') + if api_version == '7.2-preview': + from ..v7_2_preview.aio.operations_async import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_full_restore_operation(vault_base_url, restore_blob_details, **kwargs) + + async def begin_selective_key_restore_operation( + self, + vault_base_url: str, + key_name: str, + restore_blob_details: Optional["models.SelectiveKeyRestoreOperationParameters"] = None, + **kwargs + ) -> AsyncLROPoller["models.SelectiveKeyRestoreOperation"]: + """Restores all key versions of a given key using user supplied SAS token pointing to a previously + stored Azure Blob storage backup folder. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param key_name: The name of the key to be restored from the user supplied backup. + :type key_name: str + :param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous + successful full backup was stored. + :type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SelectiveKeyRestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_selective_key_restore_operation') + if api_version == '7.2-preview': + from ..v7_2_preview.aio.operations_async import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_selective_key_restore_operation(vault_base_url, key_name, restore_blob_details, **kwargs) + + async def full_backup_status( + self, + vault_base_url: str, + job_id: str, + **kwargs + ) -> "models.FullBackupOperation": + """Returns the status of full backup operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The id returned as part of the backup request. + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FullBackupOperation, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.FullBackupOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('full_backup_status') + if api_version == '7.2-preview': + from ..v7_2_preview.aio.operations_async import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.full_backup_status(vault_base_url, job_id, **kwargs) + + async def restore_status( + self, + vault_base_url: str, + job_id: str, + **kwargs + ) -> "models.RestoreOperation": + """Returns the status of restore operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The Job Id returned part of the restore operation. + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreOperation, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RestoreOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('restore_status') + if api_version == '7.2-preview': + from ..v7_2_preview.aio.operations_async import KeyVaultClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.restore_status(vault_base_url, job_id, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/models.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/models.py new file mode 100644 index 0000000000000..ef435f1d96670 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/models.py @@ -0,0 +1,7 @@ +# 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. +# -------------------------------------------------------------------------- +from .v7_2_preview.models import * diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/py.typed b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/__init__.py new file mode 100644 index 0000000000000..a6c1f9b7a7928 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/__init__.py @@ -0,0 +1,16 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._key_vault_client import KeyVaultClient +__all__ = ['KeyVaultClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_configuration.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_configuration.py new file mode 100644 index 0000000000000..f6a651dad142a --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_configuration.py @@ -0,0 +1,52 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + +VERSION = "unknown" + +class KeyVaultClientConfiguration(Configuration): + """Configuration for KeyVaultClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + """ + + def __init__( + self, + **kwargs # type: Any + ): + # type: (...) -> None + super(KeyVaultClientConfiguration, self).__init__(**kwargs) + + self.api_version = "7.2-preview" + kwargs.setdefault('sdk_moniker', 'keyvault/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_key_vault_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_key_vault_client.py new file mode 100644 index 0000000000000..91acb44b0c6b6 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_key_vault_client.py @@ -0,0 +1,64 @@ +# 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. +# -------------------------------------------------------------------------- + +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 KeyVaultClientConfiguration +from .operations import KeyVaultClientOperationsMixin +from .operations import RoleDefinitionsOperations +from .operations import RoleAssignmentsOperations +from . import models + + +class KeyVaultClient(KeyVaultClientOperationsMixin): + """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. + + :ivar role_definitions: RoleDefinitionsOperations operations + :vartype role_definitions: azure.keyvault.v7_2.operations.RoleDefinitionsOperations + :ivar role_assignments: RoleAssignmentsOperations operations + :vartype role_assignments: azure.keyvault.v7_2.operations.RoleAssignmentsOperations + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + **kwargs # type: Any + ): + # type: (...) -> None + base_url = '{vaultBaseUrl}' + self._config = KeyVaultClientConfiguration(**kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.role_definitions = RoleDefinitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.role_assignments = RoleAssignmentsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> KeyVaultClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_metadata.json b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_metadata.json new file mode 100644 index 0000000000000..2e1b4f3b0f3cb --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/_metadata.json @@ -0,0 +1,131 @@ +{ + "chosen_version": "7.2-preview", + "total_api_version_list": ["7.2-preview"], + "client": { + "name": "KeyVaultClient", + "filename": "_key_vault_client", + "description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", + "base_url": null, + "custom_base_url": "\u0027{vaultBaseUrl}\u0027", + "azure_arm": false + }, + "global_parameters": { + "sync_method": { + }, + "async_method": { + }, + "constant": { + }, + "call": "" + }, + "config": { + "credential": false, + "credential_scopes": null, + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true + }, + "operation_groups": { + "role_definitions": "RoleDefinitionsOperations", + "role_assignments": "RoleAssignmentsOperations" + }, + "operation_mixins": { + "_full_backup_initial" : { + "sync": { + "signature": "def _full_backup_initial(\n self,\n vault_base_url, # type: str\n azure_storage_blob_container_uri=None, # type: Optional[\"models.SASTokenParameter\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _full_backup_initial(\n self,\n vault_base_url: str,\n azure_storage_blob_container_uri: Optional[\"models.SASTokenParameter\"] = None,\n **kwargs\n) -\u003e \"models.FullBackupOperation\":\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, azure_storage_blob_container_uri" + }, + "begin_full_backup" : { + "sync": { + "signature": "def begin_full_backup(\n self,\n vault_base_url, # type: str\n azure_storage_blob_container_uri=None, # type: Optional[\"models.SASTokenParameter\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Creates a full backup using a user-provided SAS token to an Azure blob storage container.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either FullBackupOperation or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.FullBackupOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_full_backup(\n self,\n vault_base_url: str,\n azure_storage_blob_container_uri: Optional[\"models.SASTokenParameter\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.FullBackupOperation\"]:\n", + "doc": "\"\"\"Creates a full backup using a user-provided SAS token to an Azure blob storage container.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either FullBackupOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.FullBackupOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "vault_base_url, azure_storage_blob_container_uri" + }, + "full_backup_status" : { + "sync": { + "signature": "def full_backup_status(\n self,\n vault_base_url, # type: str\n job_id, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns the status of full backup operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The id returned as part of the backup request.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def full_backup_status(\n self,\n vault_base_url: str,\n job_id: str,\n **kwargs\n) -\u003e \"models.FullBackupOperation\":\n", + "doc": "\"\"\"Returns the status of full backup operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The id returned as part of the backup request.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, job_id" + }, + "_full_restore_operation_initial" : { + "sync": { + "signature": "def _full_restore_operation_initial(\n self,\n vault_base_url, # type: str\n restore_blob_details=None, # type: Optional[\"models.RestoreOperationParameters\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _full_restore_operation_initial(\n self,\n vault_base_url: str,\n restore_blob_details: Optional[\"models.RestoreOperationParameters\"] = None,\n **kwargs\n) -\u003e \"models.RestoreOperation\":\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, restore_blob_details" + }, + "begin_full_restore_operation" : { + "sync": { + "signature": "def begin_full_restore_operation(\n self,\n vault_base_url, # type: str\n restore_blob_details=None, # type: Optional[\"models.RestoreOperationParameters\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Restores all key materials using the SAS token pointing to a previously stored Azure Blob\nstorage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either RestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.RestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_full_restore_operation(\n self,\n vault_base_url: str,\n restore_blob_details: Optional[\"models.RestoreOperationParameters\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.RestoreOperation\"]:\n", + "doc": "\"\"\"Restores all key materials using the SAS token pointing to a previously stored Azure Blob\nstorage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either RestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.RestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "vault_base_url, restore_blob_details" + }, + "restore_status" : { + "sync": { + "signature": "def restore_status(\n self,\n vault_base_url, # type: str\n job_id, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns the status of restore operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The Job Id returned part of the restore operation.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def restore_status(\n self,\n vault_base_url: str,\n job_id: str,\n **kwargs\n) -\u003e \"models.RestoreOperation\":\n", + "doc": "\"\"\"Returns the status of restore operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The Job Id returned part of the restore operation.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, job_id" + }, + "_selective_key_restore_operation_initial" : { + "sync": { + "signature": "def _selective_key_restore_operation_initial(\n self,\n vault_base_url, # type: str\n key_name, # type: str\n restore_blob_details=None, # type: Optional[\"models.SelectiveKeyRestoreOperationParameters\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SelectiveKeyRestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _selective_key_restore_operation_initial(\n self,\n vault_base_url: str,\n key_name: str,\n restore_blob_details: Optional[\"models.SelectiveKeyRestoreOperationParameters\"] = None,\n **kwargs\n) -\u003e \"models.SelectiveKeyRestoreOperation\":\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SelectiveKeyRestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, key_name, restore_blob_details" + }, + "begin_selective_key_restore_operation" : { + "sync": { + "signature": "def begin_selective_key_restore_operation(\n self,\n vault_base_url, # type: str\n key_name, # type: str\n restore_blob_details=None, # type: Optional[\"models.SelectiveKeyRestoreOperationParameters\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Restores all key versions of a given key using user supplied SAS token pointing to a previously\nstored Azure Blob storage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either SelectiveKeyRestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_selective_key_restore_operation(\n self,\n vault_base_url: str,\n key_name: str,\n restore_blob_details: Optional[\"models.SelectiveKeyRestoreOperationParameters\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.SelectiveKeyRestoreOperation\"]:\n", + "doc": "\"\"\"Restores all key versions of a given key using user supplied SAS token pointing to a previously\nstored Azure Blob storage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either SelectiveKeyRestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "vault_base_url, key_name, restore_blob_details" + } + }, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.core.polling.base_polling\": [\"LROBasePolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.core.polling.async_base_polling\": [\"AsyncLROBasePolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}" +} \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/__init__.py new file mode 100644 index 0000000000000..71ceadebe4301 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._key_vault_client_async import KeyVaultClient +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/_configuration_async.py new file mode 100644 index 0000000000000..5abffe30345d8 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/_configuration_async.py @@ -0,0 +1,46 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +VERSION = "unknown" + +class KeyVaultClientConfiguration(Configuration): + """Configuration for KeyVaultClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + """ + + def __init__( + self, + **kwargs: Any + ) -> None: + super(KeyVaultClientConfiguration, self).__init__(**kwargs) + + self.api_version = "7.2-preview" + kwargs.setdefault('sdk_moniker', 'keyvault/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/_key_vault_client_async.py new file mode 100644 index 0000000000000..9b3ec815b8e8f --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/_key_vault_client_async.py @@ -0,0 +1,56 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core import AsyncPipelineClient +from msrest import Deserializer, Serializer + +from ._configuration_async import KeyVaultClientConfiguration +from .operations_async import KeyVaultClientOperationsMixin +from .operations_async import RoleDefinitionsOperations +from .operations_async import RoleAssignmentsOperations +from .. import models + + +class KeyVaultClient(KeyVaultClientOperationsMixin): + """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. + + :ivar role_definitions: RoleDefinitionsOperations operations + :vartype role_definitions: azure.keyvault.v7_2.aio.operations_async.RoleDefinitionsOperations + :ivar role_assignments: RoleAssignmentsOperations operations + :vartype role_assignments: azure.keyvault.v7_2.aio.operations_async.RoleAssignmentsOperations + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + **kwargs: Any + ) -> None: + base_url = '{vaultBaseUrl}' + self._config = KeyVaultClientConfiguration(**kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.role_definitions = RoleDefinitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.role_assignments = RoleAssignmentsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "KeyVaultClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/__init__.py new file mode 100644 index 0000000000000..1934ebc06adf5 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/__init__.py @@ -0,0 +1,17 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._key_vault_client_operations_async import KeyVaultClientOperationsMixin +from ._role_definitions_operations_async import RoleDefinitionsOperations +from ._role_assignments_operations_async import RoleAssignmentsOperations + +__all__ = [ + 'KeyVaultClientOperationsMixin', + 'RoleDefinitionsOperations', + 'RoleAssignmentsOperations', +] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_key_vault_client_operations_async.py new file mode 100644 index 0000000000000..2aa256e4d1b01 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_key_vault_client_operations_async.py @@ -0,0 +1,504 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.polling.async_base_polling import AsyncLROBasePolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class KeyVaultClientOperationsMixin: + + async def _full_backup_initial( + self, + vault_base_url: str, + azure_storage_blob_container_uri: Optional["models.SASTokenParameter"] = None, + **kwargs + ) -> "models.FullBackupOperation": + cls = kwargs.pop('cls', None) # type: ClsType["models.FullBackupOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._full_backup_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if azure_storage_blob_container_uri is not None: + body_content = self._serialize.body(azure_storage_blob_container_uri, 'SASTokenParameter') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _full_backup_initial.metadata = {'url': '/backup'} # type: ignore + + async def begin_full_backup( + self, + vault_base_url: str, + azure_storage_blob_container_uri: Optional["models.SASTokenParameter"] = None, + **kwargs + ) -> AsyncLROPoller["models.FullBackupOperation"]: + """Creates a full backup using a user-provided SAS token to an Azure blob storage container. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a + valid Azure blob container where full backup needs to be stored. This token needs to be valid + for at least next 24 hours from the time of making this call. + :type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FullBackupOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.FullBackupOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.FullBackupOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._full_backup_initial( + vault_base_url=vault_base_url, + azure_storage_blob_container_uri=azure_storage_blob_container_uri, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_full_backup.metadata = {'url': '/backup'} # type: ignore + + async def full_backup_status( + self, + vault_base_url: str, + job_id: str, + **kwargs + ) -> "models.FullBackupOperation": + """Returns the status of full backup operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The id returned as part of the backup request. + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FullBackupOperation, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.FullBackupOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FullBackupOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + # Construct URL + url = self.full_backup_status.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'jobId': self._serialize.url("job_id", job_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + full_backup_status.metadata = {'url': '/backup/{jobId}/pending'} # type: ignore + + async def _full_restore_operation_initial( + self, + vault_base_url: str, + restore_blob_details: Optional["models.RestoreOperationParameters"] = None, + **kwargs + ) -> "models.RestoreOperation": + cls = kwargs.pop('cls', None) # type: ClsType["models.RestoreOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._full_restore_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if restore_blob_details is not None: + body_content = self._serialize.body(restore_blob_details, 'RestoreOperationParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _full_restore_operation_initial.metadata = {'url': '/restore'} # type: ignore + + async def begin_full_restore_operation( + self, + vault_base_url: str, + restore_blob_details: Optional["models.RestoreOperationParameters"] = None, + **kwargs + ) -> AsyncLROPoller["models.RestoreOperation"]: + """Restores all key materials using the SAS token pointing to a previously stored Azure Blob + storage backup folder. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous + successful full backup was stored. + :type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.RestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.RestoreOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._full_restore_operation_initial( + vault_base_url=vault_base_url, + restore_blob_details=restore_blob_details, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_full_restore_operation.metadata = {'url': '/restore'} # type: ignore + + async def restore_status( + self, + vault_base_url: str, + job_id: str, + **kwargs + ) -> "models.RestoreOperation": + """Returns the status of restore operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The Job Id returned part of the restore operation. + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreOperation, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RestoreOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RestoreOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + # Construct URL + url = self.restore_status.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'jobId': self._serialize.url("job_id", job_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + restore_status.metadata = {'url': '/restore/{jobId}/pending'} # type: ignore + + async def _selective_key_restore_operation_initial( + self, + vault_base_url: str, + key_name: str, + restore_blob_details: Optional["models.SelectiveKeyRestoreOperationParameters"] = None, + **kwargs + ) -> "models.SelectiveKeyRestoreOperation": + cls = kwargs.pop('cls', None) # type: ClsType["models.SelectiveKeyRestoreOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._selective_key_restore_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if restore_blob_details is not None: + body_content = self._serialize.body(restore_blob_details, 'SelectiveKeyRestoreOperationParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('SelectiveKeyRestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _selective_key_restore_operation_initial.metadata = {'url': '/keys/{keyName}/restore'} # type: ignore + + async def begin_selective_key_restore_operation( + self, + vault_base_url: str, + key_name: str, + restore_blob_details: Optional["models.SelectiveKeyRestoreOperationParameters"] = None, + **kwargs + ) -> AsyncLROPoller["models.SelectiveKeyRestoreOperation"]: + """Restores all key versions of a given key using user supplied SAS token pointing to a previously + stored Azure Blob storage backup folder. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param key_name: The name of the key to be restored from the user supplied backup. + :type key_name: str + :param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous + successful full backup was stored. + :type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SelectiveKeyRestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.SelectiveKeyRestoreOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._selective_key_restore_operation_initial( + vault_base_url=vault_base_url, + key_name=key_name, + restore_blob_details=restore_blob_details, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('SelectiveKeyRestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_selective_key_restore_operation.metadata = {'url': '/keys/{keyName}/restore'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_role_assignments_operations_async.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_role_assignments_operations_async.py new file mode 100644 index 0000000000000..156ca54342fa6 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_role_assignments_operations_async.py @@ -0,0 +1,311 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RoleAssignmentsOperations: + """RoleAssignmentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.keyvault.v7_2.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def delete( + self, + vault_base_url: str, + scope: str, + role_assignment_name: str, + **kwargs + ) -> "models.RoleAssignment": + """Deletes a role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment to delete. + :type scope: str + :param role_assignment_name: The name of the role assignment to delete. + :type role_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + async def create( + self, + vault_base_url: str, + scope: str, + role_assignment_name: str, + parameters: "models.RoleAssignmentCreateParameters", + **kwargs + ) -> "models.RoleAssignment": + """Creates a role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment to create. + :type scope: str + :param role_assignment_name: The name of the role assignment to create. It can be any valid + GUID. + :type role_assignment_name: str + :param parameters: Parameters for the role assignment. + :type parameters: ~azure.keyvault.v7_2.models.RoleAssignmentCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RoleAssignmentCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + async def get( + self, + vault_base_url: str, + scope: str, + role_assignment_name: str, + **kwargs + ) -> "models.RoleAssignment": + """Get the specified role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment. + :type scope: str + :param role_assignment_name: The name of the role assignment to get. + :type role_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + def list_for_scope( + self, + vault_base_url: str, + scope: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.RoleAssignmentListResult"]: + """Gets role assignments for a scope. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignments. + :type scope: str + :param filter: The filter to apply on the operation. Use $filter=atScope() to return all role + assignments at or above the scope. Use $filter=principalId eq {id} to return all role + assignments at, above or below the scope for the specified principal. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RoleAssignmentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_2.models.RoleAssignmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleAssignmentListResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_for_scope.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RoleAssignmentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.KeyVaultError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_for_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_role_definitions_operations_async.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_role_definitions_operations_async.py new file mode 100644 index 0000000000000..2fa72d1ca4d57 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/aio/operations_async/_role_definitions_operations_async.py @@ -0,0 +1,123 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RoleDefinitionsOperations: + """RoleDefinitionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.keyvault.v7_2.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_base_url: str, + scope: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.RoleDefinitionListResult"]: + """Get all role definitions that are applicable at scope and above. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition. + :type scope: str + :param filter: The filter to apply on the operation. Use atScopeAndBelow filter to search below + the given scope as well. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RoleDefinitionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_2.models.RoleDefinitionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleDefinitionListResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RoleDefinitionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.KeyVaultError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/__init__.py new file mode 100644 index 0000000000000..cbd7e3697d362 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/__init__.py @@ -0,0 +1,70 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Attributes + from ._models_py3 import Error + from ._models_py3 import FullBackupOperation + from ._models_py3 import KeyVaultError + from ._models_py3 import Permission + from ._models_py3 import RestoreOperation + from ._models_py3 import RestoreOperationParameters + from ._models_py3 import RoleAssignment + from ._models_py3 import RoleAssignmentCreateParameters + from ._models_py3 import RoleAssignmentFilter + from ._models_py3 import RoleAssignmentListResult + from ._models_py3 import RoleAssignmentProperties + from ._models_py3 import RoleAssignmentPropertiesWithScope + from ._models_py3 import RoleDefinition + from ._models_py3 import RoleDefinitionFilter + from ._models_py3 import RoleDefinitionListResult + from ._models_py3 import SASTokenParameter + from ._models_py3 import SelectiveKeyRestoreOperation + from ._models_py3 import SelectiveKeyRestoreOperationParameters +except (SyntaxError, ImportError): + from ._models import Attributes # type: ignore + from ._models import Error # type: ignore + from ._models import FullBackupOperation # type: ignore + from ._models import KeyVaultError # type: ignore + from ._models import Permission # type: ignore + from ._models import RestoreOperation # type: ignore + from ._models import RestoreOperationParameters # type: ignore + from ._models import RoleAssignment # type: ignore + from ._models import RoleAssignmentCreateParameters # type: ignore + from ._models import RoleAssignmentFilter # type: ignore + from ._models import RoleAssignmentListResult # type: ignore + from ._models import RoleAssignmentProperties # type: ignore + from ._models import RoleAssignmentPropertiesWithScope # type: ignore + from ._models import RoleDefinition # type: ignore + from ._models import RoleDefinitionFilter # type: ignore + from ._models import RoleDefinitionListResult # type: ignore + from ._models import SASTokenParameter # type: ignore + from ._models import SelectiveKeyRestoreOperation # type: ignore + from ._models import SelectiveKeyRestoreOperationParameters # type: ignore + +__all__ = [ + 'Attributes', + 'Error', + 'FullBackupOperation', + 'KeyVaultError', + 'Permission', + 'RestoreOperation', + 'RestoreOperationParameters', + 'RoleAssignment', + 'RoleAssignmentCreateParameters', + 'RoleAssignmentFilter', + 'RoleAssignmentListResult', + 'RoleAssignmentProperties', + 'RoleAssignmentPropertiesWithScope', + 'RoleDefinition', + 'RoleDefinitionFilter', + 'RoleDefinitionListResult', + 'SASTokenParameter', + 'SelectiveKeyRestoreOperation', + 'SelectiveKeyRestoreOperationParameters', +] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/_models.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/_models.py new file mode 100644 index 0000000000000..99da7b8a82c3d --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/_models.py @@ -0,0 +1,618 @@ +# 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. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class Attributes(msrest.serialization.Model): + """The object attributes managed by the KeyVault service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether the object is enabled. + :type enabled: bool + :param not_before: Not before date in UTC. + :type not_before: ~datetime.datetime + :param expires: Expiry date in UTC. + :type expires: ~datetime.datetime + :ivar created: Creation time in UTC. + :vartype created: ~datetime.datetime + :ivar updated: Last updated time in UTC. + :vartype updated: ~datetime.datetime + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'unix-time'}, + 'expires': {'key': 'exp', 'type': 'unix-time'}, + 'created': {'key': 'created', 'type': 'unix-time'}, + 'updated': {'key': 'updated', 'type': 'unix-time'}, + } + + def __init__( + self, + **kwargs + ): + super(Attributes, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.not_before = kwargs.get('not_before', None) + self.expires = kwargs.get('expires', None) + self.created = None + self.updated = None + + +class Error(msrest.serialization.Model): + """The key vault server error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar inner_error: The key vault server error. + :vartype inner_error: ~azure.keyvault.v7_2.models.Error + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'inner_error': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'inner_error': {'key': 'innererror', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = None + self.message = None + self.inner_error = None + + +class FullBackupOperation(msrest.serialization.Model): + """Full backup operation. + + :param status: Status of the backup operation. + :type status: str + :param status_details: The status details of backup operation. + :type status_details: str + :param error: Error encountered, if any, during the full backup operation. + :type error: ~azure.keyvault.v7_2.models.Error + :param start_time: The start time of the backup operation in UTC. + :type start_time: ~datetime.datetime + :param end_time: The end time of the backup operation in UTC. + :type end_time: ~datetime.datetime + :param job_id: Identifier for the full backup operation. + :type job_id: str + :param azure_storage_blob_container_uri: The Azure blob storage container Uri which contains + the full backup. + :type azure_storage_blob_container_uri: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'azure_storage_blob_container_uri': {'key': 'azureStorageBlobContainerUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FullBackupOperation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.error = kwargs.get('error', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.job_id = kwargs.get('job_id', None) + self.azure_storage_blob_container_uri = kwargs.get('azure_storage_blob_container_uri', None) + + +class KeyVaultError(msrest.serialization.Model): + """The key vault error exception. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: The key vault server error. + :vartype error: ~azure.keyvault.v7_2.models.Error + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultError, self).__init__(**kwargs) + self.error = None + + +class Permission(msrest.serialization.Model): + """Role definition permissions. + + :param actions: Allowed actions. + :type actions: list[str] + :param not_actions: Denied actions. + :type not_actions: list[str] + :param data_actions: Allowed Data actions. + :type data_actions: list[str] + :param not_data_actions: Denied Data actions. + :type not_data_actions: list[str] + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[str]'}, + 'not_actions': {'key': 'notActions', 'type': '[str]'}, + 'data_actions': {'key': 'dataActions', 'type': '[str]'}, + 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(Permission, self).__init__(**kwargs) + self.actions = kwargs.get('actions', None) + self.not_actions = kwargs.get('not_actions', None) + self.data_actions = kwargs.get('data_actions', None) + self.not_data_actions = kwargs.get('not_data_actions', None) + + +class RestoreOperation(msrest.serialization.Model): + """Restore operation. + + :param status: Status of the restore operation. + :type status: str + :param status_details: The status details of restore operation. + :type status_details: str + :param error: Error encountered, if any, during the restore operation. + :type error: ~azure.keyvault.v7_2.models.Error + :param job_id: Identifier for the restore operation. + :type job_id: str + :param start_time: The start time of the restore operation. + :type start_time: ~datetime.datetime + :param end_time: The end time of the restore operation. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreOperation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.error = kwargs.get('error', None) + self.job_id = kwargs.get('job_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class RestoreOperationParameters(msrest.serialization.Model): + """RestoreOperationParameters. + + All required parameters must be populated in order to send to Azure. + + :param sas_token_parameters: Required. + :type sas_token_parameters: ~azure.keyvault.v7_2.models.SASTokenParameter + :param folder_to_restore: Required. The Folder name of the blob where the previous successful + full backup was stored. + :type folder_to_restore: str + """ + + _validation = { + 'sas_token_parameters': {'required': True}, + 'folder_to_restore': {'required': True}, + } + + _attribute_map = { + 'sas_token_parameters': {'key': 'sasTokenParameters', 'type': 'SASTokenParameter'}, + 'folder_to_restore': {'key': 'folderToRestore', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreOperationParameters, self).__init__(**kwargs) + self.sas_token_parameters = kwargs['sas_token_parameters'] + self.folder_to_restore = kwargs['folder_to_restore'] + + +class RoleAssignment(msrest.serialization.Model): + """Role Assignments. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The role assignment ID. + :vartype id: str + :ivar name: The role assignment name. + :vartype name: str + :ivar type: The role assignment type. + :vartype type: str + :param properties: Role assignment properties. + :type properties: ~azure.keyvault.v7_2.models.RoleAssignmentPropertiesWithScope + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'RoleAssignmentPropertiesWithScope'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignment, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class RoleAssignmentCreateParameters(msrest.serialization.Model): + """Role assignment create parameters. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Role assignment properties. + :type properties: ~azure.keyvault.v7_2.models.RoleAssignmentProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RoleAssignmentProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentCreateParameters, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class RoleAssignmentFilter(msrest.serialization.Model): + """Role Assignments filter. + + :param principal_id: Returns role assignment of the specific principal. + :type principal_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentFilter, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + + +class RoleAssignmentListResult(msrest.serialization.Model): + """Role assignment list operation result. + + :param value: Role assignment list. + :type value: list[~azure.keyvault.v7_2.models.RoleAssignment] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoleAssignment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RoleAssignmentProperties(msrest.serialization.Model): + """Role assignment properties. + + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. The role definition ID used in the role assignment. + :type role_definition_id: str + :param principal_id: Required. The principal ID assigned to the role. This maps to the ID + inside the Active Directory. It can point to a user, service principal, or security group. + :type principal_id: str + """ + + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentProperties, self).__init__(**kwargs) + self.role_definition_id = kwargs['role_definition_id'] + self.principal_id = kwargs['principal_id'] + + +class RoleAssignmentPropertiesWithScope(msrest.serialization.Model): + """Role assignment properties with scope. + + :param scope: The role assignment scope. + :type scope: str + :param role_definition_id: The role definition ID. + :type role_definition_id: str + :param principal_id: The principal ID. + :type principal_id: str + """ + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentPropertiesWithScope, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + self.principal_id = kwargs.get('principal_id', None) + + +class RoleDefinition(msrest.serialization.Model): + """Role definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The role definition ID. + :vartype id: str + :ivar name: The role definition name. + :vartype name: str + :ivar type: The role definition type. + :vartype type: str + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. + :type role_type: str + :param permissions: Role definition permissions. + :type permissions: list[~azure.keyvault.v7_2.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[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'}, + 'role_name': {'key': 'properties.roleName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'role_type': {'key': 'properties.type', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleDefinition, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.role_name = kwargs.get('role_name', None) + self.description = kwargs.get('description', None) + self.role_type = kwargs.get('role_type', None) + self.permissions = kwargs.get('permissions', None) + self.assignable_scopes = kwargs.get('assignable_scopes', None) + + +class RoleDefinitionFilter(msrest.serialization.Model): + """Role Definitions filter. + + :param role_name: Returns role definition with the specific name. + :type role_name: str + """ + + _attribute_map = { + 'role_name': {'key': 'roleName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleDefinitionFilter, self).__init__(**kwargs) + self.role_name = kwargs.get('role_name', None) + + +class RoleDefinitionListResult(msrest.serialization.Model): + """Role definition list operation result. + + :param value: Role definition list. + :type value: list[~azure.keyvault.v7_2.models.RoleDefinition] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoleDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleDefinitionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SASTokenParameter(msrest.serialization.Model): + """SASTokenParameter. + + All required parameters must be populated in order to send to Azure. + + :param storage_resource_uri: Required. Azure Blob storage container Uri. + :type storage_resource_uri: str + :param token: Required. The SAS token pointing to an Azure Blob storage container. + :type token: str + """ + + _validation = { + 'storage_resource_uri': {'required': True}, + 'token': {'required': True}, + } + + _attribute_map = { + 'storage_resource_uri': {'key': 'storageResourceUri', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SASTokenParameter, self).__init__(**kwargs) + self.storage_resource_uri = kwargs['storage_resource_uri'] + self.token = kwargs['token'] + + +class SelectiveKeyRestoreOperation(msrest.serialization.Model): + """Selective Key Restore operation. + + :param status: Status of the restore operation. + :type status: str + :param status_details: The status details of restore operation. + :type status_details: str + :param error: Error encountered, if any, during the selective key restore operation. + :type error: ~azure.keyvault.v7_2.models.Error + :param job_id: Identifier for the selective key restore operation. + :type job_id: str + :param start_time: The start time of the restore operation. + :type start_time: ~datetime.datetime + :param end_time: The end time of the restore operation. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + } + + def __init__( + self, + **kwargs + ): + super(SelectiveKeyRestoreOperation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.error = kwargs.get('error', None) + self.job_id = kwargs.get('job_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class SelectiveKeyRestoreOperationParameters(msrest.serialization.Model): + """SelectiveKeyRestoreOperationParameters. + + All required parameters must be populated in order to send to Azure. + + :param sas_token_parameters: Required. + :type sas_token_parameters: ~azure.keyvault.v7_2.models.SASTokenParameter + :param folder: Required. The Folder name of the blob where the previous successful full backup + was stored. + :type folder: str + """ + + _validation = { + 'sas_token_parameters': {'required': True}, + 'folder': {'required': True}, + } + + _attribute_map = { + 'sas_token_parameters': {'key': 'sasTokenParameters', 'type': 'SASTokenParameter'}, + 'folder': {'key': 'folder', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SelectiveKeyRestoreOperationParameters, self).__init__(**kwargs) + self.sas_token_parameters = kwargs['sas_token_parameters'] + self.folder = kwargs['folder'] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/_models_py3.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/_models_py3.py new file mode 100644 index 0000000000000..dab1cd313c38d --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/models/_models_py3.py @@ -0,0 +1,688 @@ +# 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 datetime +from typing import List, Optional + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class Attributes(msrest.serialization.Model): + """The object attributes managed by the KeyVault service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether the object is enabled. + :type enabled: bool + :param not_before: Not before date in UTC. + :type not_before: ~datetime.datetime + :param expires: Expiry date in UTC. + :type expires: ~datetime.datetime + :ivar created: Creation time in UTC. + :vartype created: ~datetime.datetime + :ivar updated: Last updated time in UTC. + :vartype updated: ~datetime.datetime + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'unix-time'}, + 'expires': {'key': 'exp', 'type': 'unix-time'}, + 'created': {'key': 'created', 'type': 'unix-time'}, + 'updated': {'key': 'updated', 'type': 'unix-time'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + not_before: Optional[datetime.datetime] = None, + expires: Optional[datetime.datetime] = None, + **kwargs + ): + super(Attributes, self).__init__(**kwargs) + self.enabled = enabled + self.not_before = not_before + self.expires = expires + self.created = None + self.updated = None + + +class Error(msrest.serialization.Model): + """The key vault server error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar inner_error: The key vault server error. + :vartype inner_error: ~azure.keyvault.v7_2.models.Error + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'inner_error': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'inner_error': {'key': 'innererror', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = None + self.message = None + self.inner_error = None + + +class FullBackupOperation(msrest.serialization.Model): + """Full backup operation. + + :param status: Status of the backup operation. + :type status: str + :param status_details: The status details of backup operation. + :type status_details: str + :param error: Error encountered, if any, during the full backup operation. + :type error: ~azure.keyvault.v7_2.models.Error + :param start_time: The start time of the backup operation in UTC. + :type start_time: ~datetime.datetime + :param end_time: The end time of the backup operation in UTC. + :type end_time: ~datetime.datetime + :param job_id: Identifier for the full backup operation. + :type job_id: str + :param azure_storage_blob_container_uri: The Azure blob storage container Uri which contains + the full backup. + :type azure_storage_blob_container_uri: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'azure_storage_blob_container_uri': {'key': 'azureStorageBlobContainerUri', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + status_details: Optional[str] = None, + error: Optional["Error"] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + job_id: Optional[str] = None, + azure_storage_blob_container_uri: Optional[str] = None, + **kwargs + ): + super(FullBackupOperation, self).__init__(**kwargs) + self.status = status + self.status_details = status_details + self.error = error + self.start_time = start_time + self.end_time = end_time + self.job_id = job_id + self.azure_storage_blob_container_uri = azure_storage_blob_container_uri + + +class KeyVaultError(msrest.serialization.Model): + """The key vault error exception. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: The key vault server error. + :vartype error: ~azure.keyvault.v7_2.models.Error + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultError, self).__init__(**kwargs) + self.error = None + + +class Permission(msrest.serialization.Model): + """Role definition permissions. + + :param actions: Allowed actions. + :type actions: list[str] + :param not_actions: Denied actions. + :type not_actions: list[str] + :param data_actions: Allowed Data actions. + :type data_actions: list[str] + :param not_data_actions: Denied Data actions. + :type not_data_actions: list[str] + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[str]'}, + 'not_actions': {'key': 'notActions', 'type': '[str]'}, + 'data_actions': {'key': 'dataActions', 'type': '[str]'}, + 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + } + + def __init__( + self, + *, + actions: Optional[List[str]] = None, + not_actions: Optional[List[str]] = None, + data_actions: Optional[List[str]] = None, + not_data_actions: Optional[List[str]] = None, + **kwargs + ): + super(Permission, self).__init__(**kwargs) + self.actions = actions + self.not_actions = not_actions + self.data_actions = data_actions + self.not_data_actions = not_data_actions + + +class RestoreOperation(msrest.serialization.Model): + """Restore operation. + + :param status: Status of the restore operation. + :type status: str + :param status_details: The status details of restore operation. + :type status_details: str + :param error: Error encountered, if any, during the restore operation. + :type error: ~azure.keyvault.v7_2.models.Error + :param job_id: Identifier for the restore operation. + :type job_id: str + :param start_time: The start time of the restore operation. + :type start_time: ~datetime.datetime + :param end_time: The end time of the restore operation. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + status_details: Optional[str] = None, + error: Optional["Error"] = None, + job_id: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(RestoreOperation, self).__init__(**kwargs) + self.status = status + self.status_details = status_details + self.error = error + self.job_id = job_id + self.start_time = start_time + self.end_time = end_time + + +class RestoreOperationParameters(msrest.serialization.Model): + """RestoreOperationParameters. + + All required parameters must be populated in order to send to Azure. + + :param sas_token_parameters: Required. + :type sas_token_parameters: ~azure.keyvault.v7_2.models.SASTokenParameter + :param folder_to_restore: Required. The Folder name of the blob where the previous successful + full backup was stored. + :type folder_to_restore: str + """ + + _validation = { + 'sas_token_parameters': {'required': True}, + 'folder_to_restore': {'required': True}, + } + + _attribute_map = { + 'sas_token_parameters': {'key': 'sasTokenParameters', 'type': 'SASTokenParameter'}, + 'folder_to_restore': {'key': 'folderToRestore', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_token_parameters: "SASTokenParameter", + folder_to_restore: str, + **kwargs + ): + super(RestoreOperationParameters, self).__init__(**kwargs) + self.sas_token_parameters = sas_token_parameters + self.folder_to_restore = folder_to_restore + + +class RoleAssignment(msrest.serialization.Model): + """Role Assignments. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The role assignment ID. + :vartype id: str + :ivar name: The role assignment name. + :vartype name: str + :ivar type: The role assignment type. + :vartype type: str + :param properties: Role assignment properties. + :type properties: ~azure.keyvault.v7_2.models.RoleAssignmentPropertiesWithScope + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'RoleAssignmentPropertiesWithScope'}, + } + + def __init__( + self, + *, + properties: Optional["RoleAssignmentPropertiesWithScope"] = None, + **kwargs + ): + super(RoleAssignment, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class RoleAssignmentCreateParameters(msrest.serialization.Model): + """Role assignment create parameters. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Role assignment properties. + :type properties: ~azure.keyvault.v7_2.models.RoleAssignmentProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RoleAssignmentProperties'}, + } + + def __init__( + self, + *, + properties: "RoleAssignmentProperties", + **kwargs + ): + super(RoleAssignmentCreateParameters, self).__init__(**kwargs) + self.properties = properties + + +class RoleAssignmentFilter(msrest.serialization.Model): + """Role Assignments filter. + + :param principal_id: Returns role assignment of the specific principal. + :type principal_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + *, + principal_id: Optional[str] = None, + **kwargs + ): + super(RoleAssignmentFilter, self).__init__(**kwargs) + self.principal_id = principal_id + + +class RoleAssignmentListResult(msrest.serialization.Model): + """Role assignment list operation result. + + :param value: Role assignment list. + :type value: list[~azure.keyvault.v7_2.models.RoleAssignment] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoleAssignment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RoleAssignment"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RoleAssignmentListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RoleAssignmentProperties(msrest.serialization.Model): + """Role assignment properties. + + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. The role definition ID used in the role assignment. + :type role_definition_id: str + :param principal_id: Required. The principal ID assigned to the role. This maps to the ID + inside the Active Directory. It can point to a user, service principal, or security group. + :type principal_id: str + """ + + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + *, + role_definition_id: str, + principal_id: str, + **kwargs + ): + super(RoleAssignmentProperties, self).__init__(**kwargs) + self.role_definition_id = role_definition_id + self.principal_id = principal_id + + +class RoleAssignmentPropertiesWithScope(msrest.serialization.Model): + """Role assignment properties with scope. + + :param scope: The role assignment scope. + :type scope: str + :param role_definition_id: The role definition ID. + :type role_definition_id: str + :param principal_id: The principal ID. + :type principal_id: str + """ + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + *, + scope: Optional[str] = None, + role_definition_id: Optional[str] = None, + principal_id: Optional[str] = None, + **kwargs + ): + super(RoleAssignmentPropertiesWithScope, self).__init__(**kwargs) + self.scope = scope + self.role_definition_id = role_definition_id + self.principal_id = principal_id + + +class RoleDefinition(msrest.serialization.Model): + """Role definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The role definition ID. + :vartype id: str + :ivar name: The role definition name. + :vartype name: str + :ivar type: The role definition type. + :vartype type: str + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. + :type role_type: str + :param permissions: Role definition permissions. + :type permissions: list[~azure.keyvault.v7_2.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[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'}, + 'role_name': {'key': 'properties.roleName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'role_type': {'key': 'properties.type', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, + } + + def __init__( + self, + *, + role_name: Optional[str] = None, + description: Optional[str] = None, + role_type: Optional[str] = None, + permissions: Optional[List["Permission"]] = None, + assignable_scopes: Optional[List[str]] = None, + **kwargs + ): + super(RoleDefinition, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.role_name = role_name + self.description = description + self.role_type = role_type + self.permissions = permissions + self.assignable_scopes = assignable_scopes + + +class RoleDefinitionFilter(msrest.serialization.Model): + """Role Definitions filter. + + :param role_name: Returns role definition with the specific name. + :type role_name: str + """ + + _attribute_map = { + 'role_name': {'key': 'roleName', 'type': 'str'}, + } + + def __init__( + self, + *, + role_name: Optional[str] = None, + **kwargs + ): + super(RoleDefinitionFilter, self).__init__(**kwargs) + self.role_name = role_name + + +class RoleDefinitionListResult(msrest.serialization.Model): + """Role definition list operation result. + + :param value: Role definition list. + :type value: list[~azure.keyvault.v7_2.models.RoleDefinition] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoleDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RoleDefinition"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RoleDefinitionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SASTokenParameter(msrest.serialization.Model): + """SASTokenParameter. + + All required parameters must be populated in order to send to Azure. + + :param storage_resource_uri: Required. Azure Blob storage container Uri. + :type storage_resource_uri: str + :param token: Required. The SAS token pointing to an Azure Blob storage container. + :type token: str + """ + + _validation = { + 'storage_resource_uri': {'required': True}, + 'token': {'required': True}, + } + + _attribute_map = { + 'storage_resource_uri': {'key': 'storageResourceUri', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_resource_uri: str, + token: str, + **kwargs + ): + super(SASTokenParameter, self).__init__(**kwargs) + self.storage_resource_uri = storage_resource_uri + self.token = token + + +class SelectiveKeyRestoreOperation(msrest.serialization.Model): + """Selective Key Restore operation. + + :param status: Status of the restore operation. + :type status: str + :param status_details: The status details of restore operation. + :type status_details: str + :param error: Error encountered, if any, during the selective key restore operation. + :type error: ~azure.keyvault.v7_2.models.Error + :param job_id: Identifier for the selective key restore operation. + :type job_id: str + :param start_time: The start time of the restore operation. + :type start_time: ~datetime.datetime + :param end_time: The end time of the restore operation. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + status_details: Optional[str] = None, + error: Optional["Error"] = None, + job_id: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(SelectiveKeyRestoreOperation, self).__init__(**kwargs) + self.status = status + self.status_details = status_details + self.error = error + self.job_id = job_id + self.start_time = start_time + self.end_time = end_time + + +class SelectiveKeyRestoreOperationParameters(msrest.serialization.Model): + """SelectiveKeyRestoreOperationParameters. + + All required parameters must be populated in order to send to Azure. + + :param sas_token_parameters: Required. + :type sas_token_parameters: ~azure.keyvault.v7_2.models.SASTokenParameter + :param folder: Required. The Folder name of the blob where the previous successful full backup + was stored. + :type folder: str + """ + + _validation = { + 'sas_token_parameters': {'required': True}, + 'folder': {'required': True}, + } + + _attribute_map = { + 'sas_token_parameters': {'key': 'sasTokenParameters', 'type': 'SASTokenParameter'}, + 'folder': {'key': 'folder', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_token_parameters: "SASTokenParameter", + folder: str, + **kwargs + ): + super(SelectiveKeyRestoreOperationParameters, self).__init__(**kwargs) + self.sas_token_parameters = sas_token_parameters + self.folder = folder diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/__init__.py new file mode 100644 index 0000000000000..fbdd396542936 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/__init__.py @@ -0,0 +1,17 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._key_vault_client_operations import KeyVaultClientOperationsMixin +from ._role_definitions_operations import RoleDefinitionsOperations +from ._role_assignments_operations import RoleAssignmentsOperations + +__all__ = [ + 'KeyVaultClientOperationsMixin', + 'RoleDefinitionsOperations', + 'RoleAssignmentsOperations', +] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_key_vault_client_operations.py new file mode 100644 index 0000000000000..3c12ff62a347f --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_key_vault_client_operations.py @@ -0,0 +1,516 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class KeyVaultClientOperationsMixin(object): + + def _full_backup_initial( + self, + vault_base_url, # type: str + azure_storage_blob_container_uri=None, # type: Optional["models.SASTokenParameter"] + **kwargs # type: Any + ): + # type: (...) -> "models.FullBackupOperation" + cls = kwargs.pop('cls', None) # type: ClsType["models.FullBackupOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._full_backup_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if azure_storage_blob_container_uri is not None: + body_content = self._serialize.body(azure_storage_blob_container_uri, 'SASTokenParameter') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _full_backup_initial.metadata = {'url': '/backup'} # type: ignore + + def begin_full_backup( + self, + vault_base_url, # type: str + azure_storage_blob_container_uri=None, # type: Optional["models.SASTokenParameter"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.FullBackupOperation"] + """Creates a full backup using a user-provided SAS token to an Azure blob storage container. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a + valid Azure blob container where full backup needs to be stored. This token needs to be valid + for at least next 24 hours from the time of making this call. + :type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either FullBackupOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.FullBackupOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.FullBackupOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._full_backup_initial( + vault_base_url=vault_base_url, + azure_storage_blob_container_uri=azure_storage_blob_container_uri, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_full_backup.metadata = {'url': '/backup'} # type: ignore + + def full_backup_status( + self, + vault_base_url, # type: str + job_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.FullBackupOperation" + """Returns the status of full backup operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The id returned as part of the backup request. + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FullBackupOperation, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.FullBackupOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FullBackupOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + # Construct URL + url = self.full_backup_status.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'jobId': self._serialize.url("job_id", job_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + full_backup_status.metadata = {'url': '/backup/{jobId}/pending'} # type: ignore + + def _full_restore_operation_initial( + self, + vault_base_url, # type: str + restore_blob_details=None, # type: Optional["models.RestoreOperationParameters"] + **kwargs # type: Any + ): + # type: (...) -> "models.RestoreOperation" + cls = kwargs.pop('cls', None) # type: ClsType["models.RestoreOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._full_restore_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if restore_blob_details is not None: + body_content = self._serialize.body(restore_blob_details, 'RestoreOperationParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _full_restore_operation_initial.metadata = {'url': '/restore'} # type: ignore + + def begin_full_restore_operation( + self, + vault_base_url, # type: str + restore_blob_details=None, # type: Optional["models.RestoreOperationParameters"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.RestoreOperation"] + """Restores all key materials using the SAS token pointing to a previously stored Azure Blob + storage backup folder. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous + successful full backup was stored. + :type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either RestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.RestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.RestoreOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._full_restore_operation_initial( + vault_base_url=vault_base_url, + restore_blob_details=restore_blob_details, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_full_restore_operation.metadata = {'url': '/restore'} # type: ignore + + def restore_status( + self, + vault_base_url, # type: str + job_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.RestoreOperation" + """Returns the status of restore operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The Job Id returned part of the restore operation. + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreOperation, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RestoreOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RestoreOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + # Construct URL + url = self.restore_status.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'jobId': self._serialize.url("job_id", job_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + restore_status.metadata = {'url': '/restore/{jobId}/pending'} # type: ignore + + def _selective_key_restore_operation_initial( + self, + vault_base_url, # type: str + key_name, # type: str + restore_blob_details=None, # type: Optional["models.SelectiveKeyRestoreOperationParameters"] + **kwargs # type: Any + ): + # type: (...) -> "models.SelectiveKeyRestoreOperation" + cls = kwargs.pop('cls', None) # type: ClsType["models.SelectiveKeyRestoreOperation"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._selective_key_restore_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if restore_blob_details is not None: + body_content = self._serialize.body(restore_blob_details, 'SelectiveKeyRestoreOperationParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('SelectiveKeyRestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _selective_key_restore_operation_initial.metadata = {'url': '/keys/{keyName}/restore'} # type: ignore + + def begin_selective_key_restore_operation( + self, + vault_base_url, # type: str + key_name, # type: str + restore_blob_details=None, # type: Optional["models.SelectiveKeyRestoreOperationParameters"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.SelectiveKeyRestoreOperation"] + """Restores all key versions of a given key using user supplied SAS token pointing to a previously + stored Azure Blob storage backup folder. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param key_name: The name of the key to be restored from the user supplied backup. + :type key_name: str + :param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous + successful full backup was stored. + :type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either SelectiveKeyRestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.SelectiveKeyRestoreOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._selective_key_restore_operation_initial( + vault_base_url=vault_base_url, + key_name=key_name, + restore_blob_details=restore_blob_details, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('SelectiveKeyRestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_selective_key_restore_operation.metadata = {'url': '/keys/{keyName}/restore'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_role_assignments_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_role_assignments_operations.py new file mode 100644 index 0000000000000..eb04fd51c6983 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_role_assignments_operations.py @@ -0,0 +1,319 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RoleAssignmentsOperations(object): + """RoleAssignmentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.keyvault.v7_2.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def delete( + self, + vault_base_url, # type: str + scope, # type: str + role_assignment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.RoleAssignment" + """Deletes a role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment to delete. + :type scope: str + :param role_assignment_name: The name of the role assignment to delete. + :type role_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + def create( + self, + vault_base_url, # type: str + scope, # type: str + role_assignment_name, # type: str + parameters, # type: "models.RoleAssignmentCreateParameters" + **kwargs # type: Any + ): + # type: (...) -> "models.RoleAssignment" + """Creates a role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment to create. + :type scope: str + :param role_assignment_name: The name of the role assignment to create. It can be any valid + GUID. + :type role_assignment_name: str + :param parameters: Parameters for the role assignment. + :type parameters: ~azure.keyvault.v7_2.models.RoleAssignmentCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RoleAssignmentCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + def get( + self, + vault_base_url, # type: str + scope, # type: str + role_assignment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.RoleAssignment" + """Get the specified role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment. + :type scope: str + :param role_assignment_name: The name of the role assignment to get. + :type role_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_2.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleAssignment"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + def list_for_scope( + self, + vault_base_url, # type: str + scope, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.RoleAssignmentListResult"] + """Gets role assignments for a scope. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignments. + :type scope: str + :param filter: The filter to apply on the operation. Use $filter=atScope() to return all role + assignments at or above the scope. Use $filter=principalId eq {id} to return all role + assignments at, above or below the scope for the specified principal. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RoleAssignmentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_2.models.RoleAssignmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleAssignmentListResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_for_scope.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RoleAssignmentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.KeyVaultError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_for_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_role_definitions_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_role_definitions_operations.py new file mode 100644 index 0000000000000..ba3d7a757dc59 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/operations/_role_definitions_operations.py @@ -0,0 +1,128 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RoleDefinitionsOperations(object): + """RoleDefinitionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.keyvault.v7_2.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_base_url, # type: str + scope, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.RoleDefinitionListResult"] + """Get all role definitions that are applicable at scope and above. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition. + :type scope: str + :param filter: The filter to apply on the operation. Use atScopeAndBelow filter to search below + the given scope as well. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RoleDefinitionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_2.models.RoleDefinitionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RoleDefinitionListResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.2-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RoleDefinitionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.KeyVaultError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/py.typed b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py new file mode 100644 index 0000000000000..e13f15a61c713 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py @@ -0,0 +1,58 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from collections import namedtuple + +try: + import urllib.parse as parse +except ImportError: + # pylint:disable=import-error + import urlparse as parse # type: ignore + +from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase +from .client_base import KeyVaultClientBase +from .http_challenge import HttpChallenge +from . import http_challenge_cache as HttpChallengeCache + + +__all__ = [ + "ChallengeAuthPolicy", + "ChallengeAuthPolicyBase", + "HttpChallenge", + "HttpChallengeCache", + "KeyVaultClientBase", +] + +_VaultId = namedtuple("VaultId", ["vault_url", "collection", "name", "version"]) + + +def parse_vault_id(url): + try: + parsed_uri = parse.urlparse(url) + except Exception: # pylint: disable=broad-except + raise ValueError("'{}' is not not a valid url".format(url)) + if not (parsed_uri.scheme and parsed_uri.hostname): + raise ValueError("'{}' is not not a valid url".format(url)) + + path = list(filter(None, parsed_uri.path.split("/"))) + + if len(path) < 2 or len(path) > 3: + raise ValueError("'{}' is not not a valid vault url".format(url)) + + return _VaultId( + vault_url="{}://{}".format(parsed_uri.scheme, parsed_uri.hostname), + collection=path[0], + name=path[1], + version=path[2] if len(path) == 3 else None, + ) + + +try: + # pylint:disable=unused-import + from .async_challenge_auth_policy import AsyncChallengeAuthPolicy + from .async_client_base import AsyncKeyVaultClientBase + + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) +except (SyntaxError, ImportError): + pass diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/api_version.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/api_version.py new file mode 100644 index 0000000000000..ce44867820f8f --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/api_version.py @@ -0,0 +1,15 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from enum import Enum + + +class ApiVersion(str, Enum): + """Key Vault API versions supported by this package""" + + #: this is the default version + V7_2_preview = "7.2-preview" + + +DEFAULT_VERSION = ApiVersion.V7_2_preview diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py new file mode 100644 index 0000000000000..97f1d093e20f1 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py @@ -0,0 +1,79 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Policy implementing Key Vault's challenge authentication protocol. + +Normally the protocol is only used for the client's first service request, upon which: +1. The challenge authentication policy sends a copy of the request, without authorization or content. +2. Key Vault responds 401 with a header (the 'challenge') detailing how the client should authenticate such a request. +3. The policy authenticates according to the challenge and sends the original request with authorization. + +The policy caches the challenge and thus knows how to authenticate future requests. However, authentication +requirements can change. For example, a vault may move to a new tenant. In such a case the policy will attempt the +protocol again. +""" +from typing import TYPE_CHECKING + +from azure.core.pipeline.policies import AsyncHTTPPolicy + +from . import HttpChallengeCache +from .challenge_auth_policy import _enforce_tls, _get_challenge_request, _update_challenge, ChallengeAuthPolicyBase + +if TYPE_CHECKING: + from typing import Any + from azure.core.credentials_async import AsyncTokenCredential + from azure.core.pipeline import PipelineRequest + from azure.core.pipeline.transport import AsyncHttpResponse + from . import HttpChallenge + + +class AsyncChallengeAuthPolicy(ChallengeAuthPolicyBase, AsyncHTTPPolicy): + """policy for handling HTTP authentication challenges""" + + def __init__(self, credential: "AsyncTokenCredential", **kwargs: "Any") -> None: + self._credential = credential + super(AsyncChallengeAuthPolicy, self).__init__(**kwargs) + + async def send(self, request: "PipelineRequest") -> "AsyncHttpResponse": + _enforce_tls(request) + + challenge = HttpChallengeCache.get_challenge_for_url(request.http_request.url) + if not challenge: + challenge_request = _get_challenge_request(request) + challenger = await self.next.send(challenge_request) + try: + challenge = _update_challenge(request, challenger) + except ValueError: + # didn't receive the expected challenge -> nothing more this policy can do + return challenger + + await self._handle_challenge(request, challenge) + response = await self.next.send(request) + + if response.http_response.status_code == 401: + # any cached token must be invalid + self._token = None + + # cached challenge could be outdated; maybe this response has a new one? + try: + challenge = _update_challenge(request, response) + except ValueError: + # 401 with no legible challenge -> nothing more this policy can do + return response + + await self._handle_challenge(request, challenge) + response = await self.next.send(request) + + return response + + async def _handle_challenge(self, request: "PipelineRequest", challenge: "HttpChallenge") -> None: + """authenticate according to challenge, add Authorization header to request""" + + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = await self._credential.get_token(scope) + + # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py new file mode 100644 index 0000000000000..815ce86516d4b --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py @@ -0,0 +1,91 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from typing import TYPE_CHECKING +from azure.core.pipeline.policies import HttpLoggingPolicy +from . import AsyncChallengeAuthPolicy +from .client_base import ApiVersion, DEFAULT_VERSION +from .._sdk_moniker import SDK_MONIKER +from .._generated.aio import KeyVaultClient as _KeyVaultClient + +if TYPE_CHECKING: + try: + # pylint:disable=unused-import + from typing import Any + from azure.core.configuration import Configuration + from azure.core.pipeline.transport import AsyncHttpTransport + from azure.core.credentials_async import AsyncTokenCredential + except ImportError: + # AsyncTokenCredential is a typing_extensions.Protocol; we don't depend on that package + pass + + +class AsyncKeyVaultClientBase(object): + def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: "Any") -> None: + if not credential: + raise ValueError( + "credential should be an object supporting the AsyncTokenCredential protocol, " + "such as a credential from azure-identity" + ) + if not vault_url: + raise ValueError("vault_url must be the URL of an Azure Key Vault") + + self._vault_url = vault_url.strip(" /") + client = kwargs.get("generated_client") + if client: + # caller provided a configured client -> nothing left to initialize + self._client = client + return + + api_version = kwargs.pop("api_version", DEFAULT_VERSION) + + pipeline = kwargs.pop("pipeline", None) + transport = kwargs.pop("transport", None) + http_logging_policy = HttpLoggingPolicy(**kwargs) + http_logging_policy.allowed_header_names.update( + { + "x-ms-keyvault-network-info", + "x-ms-keyvault-region", + "x-ms-keyvault-service-version" + } + ) + + if not transport and not pipeline: + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) + + try: + self._client = _KeyVaultClient( + api_version=api_version, + pipeline=pipeline, + transport=transport, + authentication_policy=AsyncChallengeAuthPolicy(credential), + sdk_moniker=SDK_MONIKER, + http_logging_policy=http_logging_policy, + **kwargs + ) + self._models = _KeyVaultClient.models(api_version=api_version) + except NotImplementedError: + raise NotImplementedError( + "This package doesn't support API version '{}'. ".format(api_version) + + "Supported versions: {}".format(", ".join(v.value for v in ApiVersion)) + ) + + @property + def vault_url(self) -> str: + return self._vault_url + + async def __aenter__(self) -> "AsyncKeyVaultClientBase": + await self._client.__aenter__() + return self + + async def __aexit__(self, *args: "Any") -> None: + await self._client.__aexit__(*args) + + async def close(self) -> None: + """Close sockets opened by the client. + + Calling this method is unnecessary when using the client as a context manager. + """ + await self._client.close() diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/challenge_auth_policy.py new file mode 100644 index 0000000000000..fca7dc6f01d2b --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/challenge_auth_policy.py @@ -0,0 +1,140 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Policy implementing Key Vault's challenge authentication protocol. + +Normally the protocol is only used for the client's first service request, upon which: +1. The challenge authentication policy sends a copy of the request, without authorization or content. +2. Key Vault responds 401 with a header (the 'challenge') detailing how the client should authenticate such a request. +3. The policy authenticates according to the challenge and sends the original request with authorization. + +The policy caches the challenge and thus knows how to authenticate future requests. However, authentication +requirements can change. For example, a vault may move to a new tenant. In such a case the policy will attempt the +protocol again. +""" + +import copy +import time + +from azure.core.exceptions import ServiceRequestError +from azure.core.pipeline import PipelineContext, PipelineRequest +from azure.core.pipeline.policies import HTTPPolicy +from azure.core.pipeline.transport import HttpRequest + +from .http_challenge import HttpChallenge +from . import http_challenge_cache as ChallengeCache + +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, Dict, Optional + from azure.core.credentials import AccessToken, TokenCredential + from azure.core.pipeline.transport import HttpResponse + + +def _enforce_tls(request): + # type: (PipelineRequest) -> None + if not request.http_request.url.lower().startswith("https"): + raise ServiceRequestError( + "Bearer token authentication is not permitted for non-TLS protected (non-https) URLs." + ) + + +def _get_challenge_request(request): + # type: (PipelineRequest) -> PipelineRequest + + # The challenge request is intended to provoke an authentication challenge from Key Vault, to learn how the + # service request should be authenticated. It should be identical to the service request but with no body. + challenge_request = HttpRequest( + request.http_request.method, request.http_request.url, headers=request.http_request.headers + ) + challenge_request.headers["Content-Length"] = "0" + + options = copy.deepcopy(request.context.options) + context = PipelineContext(request.context.transport, **options) + + return PipelineRequest(http_request=challenge_request, context=context) + + +def _update_challenge(request, challenger): + # type: (HttpRequest, HttpResponse) -> HttpChallenge + """parse challenge from challenger, cache it, return it""" + + challenge = HttpChallenge( + request.http_request.url, + challenger.http_response.headers.get("WWW-Authenticate"), + response_headers=challenger.http_response.headers, + ) + ChallengeCache.set_challenge_for_url(request.http_request.url, challenge) + return challenge + + +class ChallengeAuthPolicyBase(object): + """Sans I/O base for challenge authentication policies""" + + def __init__(self, **kwargs): + self._token = None # type: Optional[AccessToken] + super(ChallengeAuthPolicyBase, self).__init__(**kwargs) + + @property + def _need_new_token(self): + # type: () -> bool + return not self._token or self._token.expires_on - time.time() < 300 + + +class ChallengeAuthPolicy(ChallengeAuthPolicyBase, HTTPPolicy): + """policy for handling HTTP authentication challenges""" + + def __init__(self, credential, **kwargs): + # type: (TokenCredential, **Any) -> None + self._credential = credential + super(ChallengeAuthPolicy, self).__init__(**kwargs) + + def send(self, request): + # type: (PipelineRequest) -> HttpResponse + _enforce_tls(request) + + challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) + if not challenge: + challenge_request = _get_challenge_request(request) + challenger = self.next.send(challenge_request) + try: + challenge = _update_challenge(request, challenger) + except ValueError: + # didn't receive the expected challenge -> nothing more this policy can do + return challenger + + self._handle_challenge(request, challenge) + response = self.next.send(request) + + if response.http_response.status_code == 401: + # any cached token must be invalid + self._token = None + + # cached challenge could be outdated; maybe this response has a new one? + try: + challenge = _update_challenge(request, response) + except ValueError: + # 401 with no legible challenge -> nothing more this policy can do + return response + + self._handle_challenge(request, challenge) + response = self.next.send(request) + + return response + + def _handle_challenge(self, request, challenge): + # type: (PipelineRequest, HttpChallenge) -> None + """authenticate according to challenge, add Authorization header to request""" + + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = self._credential.get_token(scope) + + # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py new file mode 100644 index 0000000000000..132492f976aeb --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py @@ -0,0 +1,94 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from typing import TYPE_CHECKING +from enum import Enum + +from azure.core.pipeline.transport import RequestsTransport +from azure.core.pipeline.policies import HttpLoggingPolicy + +from . import ChallengeAuthPolicy +from .._generated import KeyVaultClient as _KeyVaultClient +from .._sdk_moniker import SDK_MONIKER + +if TYPE_CHECKING: + # pylint:disable=unused-import,ungrouped-imports + from typing import Any + from azure.core.credentials import TokenCredential + + +class ApiVersion(str, Enum): + """Key Vault API versions supported by this package""" + + #: this is the default version + V7_2_preview = "7.2-preview" + + +DEFAULT_VERSION = ApiVersion.V7_2_preview + + +class KeyVaultClientBase(object): + def __init__(self, vault_url, credential, **kwargs): + # type: (str, TokenCredential, **Any) -> None + if not credential: + raise ValueError( + "credential should be an object supporting the TokenCredential protocol, " + "such as a credential from azure-identity" + ) + if not vault_url: + raise ValueError("vault_url must be the URL of an Azure Key Vault") + + self._vault_url = vault_url.strip(" /") + client = kwargs.get("generated_client") + if client: + # caller provided a configured client -> nothing left to initialize + self._client = client + return + + api_version = kwargs.pop("api_version", DEFAULT_VERSION) + + pipeline = kwargs.pop("pipeline", None) + transport = kwargs.pop("transport", RequestsTransport(**kwargs)) + http_logging_policy = HttpLoggingPolicy(**kwargs) + http_logging_policy.allowed_header_names.update( + {"x-ms-keyvault-network-info", "x-ms-keyvault-region", "x-ms-keyvault-service-version"} + ) + try: + self._client = _KeyVaultClient( + api_version=api_version, + pipeline=pipeline, + transport=transport, + authentication_policy=ChallengeAuthPolicy(credential), + sdk_moniker=SDK_MONIKER, + http_logging_policy=http_logging_policy, + **kwargs + ) + self._models = _KeyVaultClient.models(api_version=api_version) + except NotImplementedError: + raise NotImplementedError( + "This package doesn't support API version '{}'. ".format(api_version) + + "Supported versions: {}".format(", ".join(v.value for v in ApiVersion)) + ) + + @property + def vault_url(self): + # type: () -> str + return self._vault_url + + def __enter__(self): + # type: () -> KeyVaultClientBase + self._client.__enter__() + return self + + def __exit__(self, *args): + # type: (*Any) -> None + self._client.__exit__(*args) + + def close(self): + # type: () -> None + """Close sockets opened by the client. + + Calling this method is unnecessary when using the client as a context manager. + """ + self._client.close() diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/exceptions.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/exceptions.py new file mode 100644 index 0000000000000..407c7d872c79c --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/exceptions.py @@ -0,0 +1,57 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from collections import defaultdict +import functools +from typing import TYPE_CHECKING + +from azure.core.exceptions import DecodeError, HttpResponseError, ResourceExistsError, ResourceNotFoundError +from azure.core.pipeline.policies import ContentDecodePolicy + +if TYPE_CHECKING: + # pylint:disable=unused-import,ungrouped-imports + from typing import Optional, Type + from azure.core.pipeline.transport import HttpResponse + + +def _get_exception_for_key_vault_error(cls, response): + # type: (Type[HttpResponseError], HttpResponse) -> HttpResponseError + """Construct cls (HttpResponseError or subclass thereof) with Key Vault's error message.""" + + try: + body = ContentDecodePolicy.deserialize_from_http_generics(response) + message = "({}) {}".format(body["error"]["code"], body["error"]["message"]) # type: Optional[str] + except (DecodeError, KeyError): + # Key Vault error response bodies should have the expected shape and be deserializable. + # If we somehow land here, we'll take HttpResponse's default message. + message = None + + return cls(message=message, response=response) + + +# errors map to HttpResponseError... +_default = functools.partial(_get_exception_for_key_vault_error, HttpResponseError) + +# ...unless this mapping specifies another type +_code_to_core_error = {404: ResourceNotFoundError, 409: ResourceExistsError} + + +class _ErrorMap(defaultdict): + """A dict whose 'get' method returns a default value. + + defaultdict would be preferable but defaultdict.get returns None for keys having no value + (azure.core.exceptions.map_error calls error_map.get) + """ + + def get(self, key, value=None): # pylint:disable=unused-argument + return self[key] + + +# map status codes to callables returning appropriate azure-core errors +error_map = _ErrorMap(lambda: _default, + { + status_code: functools.partial(_get_exception_for_key_vault_error, cls) + for status_code, cls in _code_to_core_error.items() + } +) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py new file mode 100644 index 0000000000000..c762e1ae50ef9 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py @@ -0,0 +1,114 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +try: + import urllib.parse as parse +except ImportError: + import urlparse as parse # type: ignore + + +class HttpChallenge(object): + def __init__(self, request_uri, challenge, response_headers=None): + """ Parses an HTTP WWW-Authentication Bearer challenge from a server. """ + self.source_authority = self._validate_request_uri(request_uri) + self.source_uri = request_uri + self._parameters = {} + + # get the scheme of the challenge and remove from the challenge string + trimmed_challenge = self._validate_challenge(challenge) + split_challenge = trimmed_challenge.split(" ", 1) + self.scheme = split_challenge[0] + trimmed_challenge = split_challenge[1] + + # split trimmed challenge into comma-separated name=value pairs. Values are expected + # to be surrounded by quotes which are stripped here. + for item in trimmed_challenge.split(","): + # process name=value pairs + comps = item.split("=") + if len(comps) == 2: + key = comps[0].strip(' "') + value = comps[1].strip(' "') + if key: + self._parameters[key] = value + + # minimum set of parameters + if not self._parameters: + raise ValueError("Invalid challenge parameters") + + # must specify authorization or authorization_uri + if "authorization" not in self._parameters and "authorization_uri" not in self._parameters: + raise ValueError("Invalid challenge parameters") + + # if the response headers were supplied + if response_headers: + # get the message signing key and message key encryption key from the headers + self.server_signature_key = response_headers.get("x-ms-message-signing-key", None) + self.server_encryption_key = response_headers.get("x-ms-message-encryption-key", None) + + def is_bearer_challenge(self): + """ Tests whether the HttpChallenge a Bearer challenge. + rtype: bool """ + if not self.scheme: + return False + + return self.scheme.lower() == "bearer" + + def is_pop_challenge(self): + """ Tests whether the HttpChallenge is a proof of possession challenge. + rtype: bool """ + if not self.scheme: + return False + + return self.scheme.lower() == "pop" + + def get_value(self, key): + return self._parameters.get(key) + + def get_authorization_server(self): + """ Returns the URI for the authorization server if present, otherwise empty string. """ + value = "" + for key in ["authorization_uri", "authorization"]: + value = self.get_value(key) or "" + if value: + break + return value + + def get_resource(self): + """ Returns the resource if present, otherwise empty string. """ + return self.get_value("resource") or "" + + def get_scope(self): + """ Returns the scope if present, otherwise empty string. """ + return self.get_value("scope") or "" + + def supports_pop(self): + """ Returns True if challenge supports pop token auth else False """ + return self._parameters.get("supportspop", "").lower() == "true" + + def supports_message_protection(self): + """ Returns True if challenge vault supports message protection """ + return self.supports_pop() and self.server_encryption_key and self.server_signature_key + + # pylint:disable=no-self-use + def _validate_challenge(self, challenge): + """ Verifies that the challenge is a valid auth challenge and returns the key=value pairs. """ + if not challenge: + raise ValueError("Challenge cannot be empty") + + return challenge.strip() + + # pylint:disable=no-self-use + def _validate_request_uri(self, uri): + """ Extracts the host authority from the given URI. """ + if not uri: + raise ValueError("request_uri cannot be empty") + + uri = parse.urlparse(uri) + if not uri.netloc: + raise ValueError("request_uri must be an absolute URI") + + if uri.scheme.lower() not in ["http", "https"]: + raise ValueError("request_uri must be HTTP or HTTPS") + + return uri.netloc diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge_cache.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge_cache.py new file mode 100644 index 0000000000000..07cda1366aa8c --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge_cache.py @@ -0,0 +1,89 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import threading + +try: + import urllib.parse as parse +except ImportError: + import urlparse as parse # type: ignore + +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + # pylint: disable=unused-import + from typing import Dict + from .http_challenge import HttpChallenge + + +_cache = {} # type: Dict[str, HttpChallenge] +_lock = threading.Lock() + + +def get_challenge_for_url(url): + """ Gets the challenge for the cached URL. + :param url: the URL the challenge is cached for. + :rtype: HttpBearerChallenge """ + + if not url: + raise ValueError("URL cannot be None") + + key = _get_cache_key(url) + + with _lock: + return _cache.get(key) + + +def _get_cache_key(url): + """Use the URL's netloc as cache key except when the URL specifies the default port for its scheme. In that case + use the netloc without the port. That is to say, https://foo.bar and https://foo.bar:443 are considered equivalent. + + This equivalency prevents an unnecessary challenge when using Key Vault's paging API. The Key Vault client doesn't + specify ports, but Key Vault's next page links do, so a redundant challenge would otherwise be executed when the + client requests the next page.""" + + parsed = parse.urlparse(url) + if parsed.scheme == "https" and parsed.port == 443: + return parsed.netloc[:-4] + return parsed.netloc + + +def remove_challenge_for_url(url): + """ Removes the cached challenge for the specified URL. + :param url: the URL for which to remove the cached challenge """ + if not url: + raise ValueError("URL cannot be empty") + + url = parse.urlparse(url) + + with _lock: + del _cache[url.netloc] + + +def set_challenge_for_url(url, challenge): + """ Caches the challenge for the specified URL. + :param url: the URL for which to cache the challenge + :param challenge: the challenge to cache """ + if not url: + raise ValueError("URL cannot be empty") + + if not challenge: + raise ValueError("Challenge cannot be empty") + + src_url = parse.urlparse(url) + if src_url.netloc != challenge.source_authority: + raise ValueError("Source URL and Challenge URL do not match") + + with _lock: + _cache[src_url.netloc] = challenge + + +def clear(): + """ Clears the cache. """ + + with _lock: + _cache.clear() diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py new file mode 100644 index 0000000000000..28b35b68930ea --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py @@ -0,0 +1,176 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from enum import Enum +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from typing import Any + + +# pylint:disable=protected-access + + +class KeyVaultRoleScope(str, Enum): + """Collection of well known role scopes. This list is not exhaustive""" + + global_value = "/" #: use this if you want role assignments to apply to everything on the resource + + keys_value = "/keys" #: use this if you want role assignments to apply to all keys + + +class KeyVaultPermission(object): + """Role definition permissions. + + :ivar list[str] actions: allowed actions + :ivar list[str] not_actions: denied actions + :ivar list[str] data_actions: allowed data actions + :ivar list[str] not_data_actions: denied data actions + """ + + def __init__(self, **kwargs): + # type: (**Any) -> None + self.actions = kwargs.get("actions") + self.not_actions = kwargs.get("not_actions") + self.data_actions = kwargs.get("data_actions") + self.not_data_actions = kwargs.get("not_data_actions") + + @classmethod + def _from_generated(cls, permissions): + return cls( + actions=permissions.actions, + not_actions=permissions.not_actions, + data_actions=permissions.data_actions, + not_data_actions=permissions.not_data_actions, + ) + + +class KeyVaultRoleAssignment(object): + """Represents the assignment to a principal of a role over a scope""" + + def __init__(self, **kwargs): + # type: (**Any) -> None + self._assignment_id = kwargs.get("assignment_id") + self._name = kwargs.get("name") + self._properties = kwargs.get("properties") + self._type = kwargs.get("assignment_type") + + def __repr__(self): + # type: () -> str + return "KeyVaultRoleAssignment<{}>".format(self._assignment_id) + + @property + def assignment_id(self): + # type: () -> str + """unique identifier for this assignment""" + return self._assignment_id + + @property + def name(self): + # type: () -> str + """name of the assignment""" + return self._name + + @property + def principal_id(self): + # type: () -> str + """ID of the principal this assignment applies to. + + This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group. + """ + return self._properties.principal_id + + @property + def role_definition_id(self): + # type: () -> str + """ID of the role's definition""" + return self._properties.role_definition_id + + @property + def scope(self): + # type: () -> str + """scope of the assignment""" + return self._properties.scope + + @property + def type(self): + # type: () -> str + """the type of this assignment""" + return self._type + + @classmethod + def _from_generated(cls, role_assignment): + return cls( + assignment_id=role_assignment.id, + name=role_assignment.name, + assignment_type=role_assignment.type, + properties=KeyVaultRoleAssignmentProperties._from_generated(role_assignment.properties), + ) + + +class KeyVaultRoleAssignmentProperties(object): + def __init__(self, **kwargs): + # type: (**Any) -> None + self.principal_id = kwargs.get("principal_id") + self.role_definition_id = kwargs.get("role_definition_id") + self.scope = kwargs.get("scope") + + def __repr__(self): + # type: () -> str + return "KeyVaultRoleAssignmentProperties(principal_id={}, role_definition_id={}, scope={})".format( + self.principal_id, self.role_definition_id, self.scope + )[:1024] + + @classmethod + def _from_generated(cls, role_assignment_properties): + # the generated RoleAssignmentProperties and RoleAssignmentPropertiesWithScope + # models differ only in that the latter has a "scope" attribute + return cls( + principal_id=role_assignment_properties.principal_id, + role_definition_id=role_assignment_properties.role_definition_id, + scope=getattr(role_assignment_properties, "scope", None), + ) + + +class KeyVaultRoleDefinition(object): + """Role definition. + + :ivar str id: The role definition ID. + :ivar str name: The role definition name. + :ivar str type: The role definition type. + :ivar str role_name: The role name. + :ivar str description: The role definition description. + :ivar str role_type: The role type. + :ivar permissions: Role definition permissions. + :vartype permissions: list[KeyVaultPermission] + :ivar list[str] assignable_scopes: Role definition assignable scopes. + """ + + def __init__(self, **kwargs): + # type: (**Any) -> None + self.id = kwargs.get("id") + self.name = kwargs.get("name") + self.role_name = kwargs.get("role_name") + self.description = kwargs.get("description") + self.role_type = kwargs.get("role_type") + self.type = kwargs.get("type") + self.permissions = kwargs.get("permissions") + self.assignable_scopes = kwargs.get("assignable_scopes") + + def __repr__(self): + # type: () -> str + return "".format(self.role_name)[:1024] + + @classmethod + def _from_generated(cls, definition): + return cls( + assignable_scopes=definition.assignable_scopes, + description=definition.description, + id=definition.id, + name=definition.name, + permissions=[KeyVaultPermission._from_generated(p) for p in definition.permissions], + role_name=definition.role_name, + role_type=definition.role_type, + type=definition.type, + ) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_sdk_moniker.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_sdk_moniker.py new file mode 100644 index 0000000000000..0327b8f929e98 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_sdk_moniker.py @@ -0,0 +1,7 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from ._version import VERSION + +SDK_MONIKER = "keyvault-administration/{}".format(VERSION) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py new file mode 100644 index 0000000000000..ac9f392f513e1 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py @@ -0,0 +1,6 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +VERSION = "1.0.0b1" diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/__init__.py new file mode 100644 index 0000000000000..45ea36c883e7c --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/__init__.py @@ -0,0 +1,7 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from ._access_control_client import KeyVaultAccessControlClient + +__all__ = ["KeyVaultAccessControlClient"] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_access_control_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_access_control_client.py new file mode 100644 index 0000000000000..fcc0fa53ede62 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_access_control_client.py @@ -0,0 +1,136 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from typing import TYPE_CHECKING + +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async + +from .._models import KeyVaultRoleAssignment, KeyVaultRoleDefinition +from .._internal import AsyncKeyVaultClientBase + +if TYPE_CHECKING: + from typing import Any, Union + from uuid import UUID + from azure.core.async_paging import AsyncItemPaged + from .._models import KeyVaultRoleScope + + +class KeyVaultAccessControlClient(AsyncKeyVaultClientBase): + """Manages role-based access to Azure Key Vault. + + :param str vault_url: URL of the vault the client will manage. This is also called the vault's "DNS Name". + :param credential: an object which can provide an access token for the vault, such as a credential from + :mod:`azure.identity` + """ + + # pylint:disable=protected-access + + @distributed_trace_async + async def create_role_assignment( + self, + role_scope: "Union[str, KeyVaultRoleScope]", + role_assignment_name: "Union[str, UUID]", + role_definition_id: str, + principal_id: str, + **kwargs: "Any" + ) -> KeyVaultRoleAssignment: + """Create a role assignment. + + :param role_scope: scope the role assignment will apply over. :class:`KeyVaultRoleScope` defines common broad + scopes. Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :param role_assignment_name: a name for the role assignment. Must be a UUID. + :type role_assignment_name: str or uuid.UUID + :param str role_definition_id: ID of the role's definition + :param str principal_id: Azure Active Directory object ID of the principal which will be assigned the role. The + principal can be a user, service principal, or security group. + :rtype: KeyVaultRoleAssignment + """ + create_parameters = self._client.role_assignments.models.RoleAssignmentCreateParameters( + properties=self._client.role_assignments.models.RoleAssignmentProperties( + principal_id=principal_id, role_definition_id=str(role_definition_id) + ) + ) + assignment = await self._client.role_assignments.create( + vault_base_url=self._vault_url, + scope=role_scope, + role_assignment_name=role_assignment_name, + parameters=create_parameters, + **kwargs + ) + return KeyVaultRoleAssignment._from_generated(assignment) + + @distributed_trace_async + async def delete_role_assignment( + self, role_scope: "Union[str, KeyVaultRoleScope]", role_assignment_name: "Union[str, UUID]", **kwargs: "Any" + ) -> KeyVaultRoleAssignment: + """Delete a role assignment. + + :param role_scope: the assignment's scope, for example "/", "/keys", or "/keys/". + :class:`KeyVaultRoleScope` defines common broad scopes. Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :param role_assignment_name: the assignment's name. Must be a UUID. + :type role_assignment_name: str or uuid.UUID + :returns: the deleted assignment + :rtype: KeyVaultRoleAssignment + """ + assignment = await self._client.role_assignments.delete( + vault_base_url=self._vault_url, scope=role_scope, role_assignment_name=str(role_assignment_name), **kwargs + ) + return KeyVaultRoleAssignment._from_generated(assignment) + + @distributed_trace_async + async def get_role_assignment( + self, role_scope: "Union[str, KeyVaultRoleScope]", role_assignment_name: "Union[str, UUID]", **kwargs: "Any" + ) -> KeyVaultRoleAssignment: + """Get a role assignment. + + :param role_scope: the assignment's scope, for example "/", "/keys", or "/keys/". + :class:`KeyVaultRoleScope` defines common broad scopes. Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :param role_assignment_name: the assignment's name. Must be a UUID. + :type role_assignment_name: str or uuid.UUID + :rtype: KeyVaultRoleAssignment + """ + assignment = await self._client.role_assignments.get( + vault_base_url=self._vault_url, scope=role_scope, role_assignment_name=str(role_assignment_name), **kwargs + ) + return KeyVaultRoleAssignment._from_generated(assignment) + + @distributed_trace + def list_role_assignments( + self, role_scope: "Union[str, KeyVaultRoleScope]", **kwargs: "Any" + ) -> "AsyncItemPaged[KeyVaultRoleAssignment]": + """List all role assignments for a scope. + + :param role_scope: scope of the role assignments. :class:`KeyVaultRoleScope` defines common broad + scopes. Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :rtype: ~azure.core.async_paging.AsyncItemPaged[KeyVaultRoleAssignment] + """ + return self._client.role_assignments.list_for_scope( + self._vault_url, + role_scope, + cls=lambda result: [KeyVaultRoleAssignment._from_generated(a) for a in result], + **kwargs + ) + + @distributed_trace + def list_role_definitions( + self, role_scope: "Union[str, KeyVaultRoleScope]", **kwargs: "Any" + ) -> "AsyncItemPaged[KeyVaultRoleDefinition]": + """List all role definitions applicable at and above a scope. + + :param role_scope: scope of the role definitions. :class:`KeyVaultRoleScope` defines common broad + scopes. Specify a narrower scope as a string. + :type role_scope: str or KeyVaultRoleScope + :rtype: ~azure.core.async_paging.AsyncItemPaged[KeyVaultRoleDefinition] + """ + return self._client.role_definitions.list( + self._vault_url, + role_scope, + cls=lambda result: [KeyVaultRoleDefinition._from_generated(d) for d in result], + **kwargs + ) diff --git a/sdk/keyvault/azure-keyvault-administration/conftest.py b/sdk/keyvault/azure-keyvault-administration/conftest.py new file mode 100644 index 0000000000000..445dcb60c7d2c --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/conftest.py @@ -0,0 +1,8 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import sys + +if sys.version_info < (3, 5, 3): + collect_ignore_glob = ["*_async.py"] diff --git a/sdk/keyvault/azure-keyvault-administration/dev_requirements.txt b/sdk/keyvault/azure-keyvault-administration/dev_requirements.txt new file mode 100644 index 0000000000000..6641317a85160 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/dev_requirements.txt @@ -0,0 +1,7 @@ +-e ../../../tools/azure-devtools +-e ../../../tools/azure-sdk-tools +-e ../../core/azure-core +-e ../../identity/azure-identity +-e ../azure-mgmt-keyvault +../azure-keyvault-nspkg +aiohttp>=3.0; python_version >= '3.5' diff --git a/sdk/keyvault/azure-keyvault-administration/sdk_packaging.toml b/sdk/keyvault/azure-keyvault-administration/sdk_packaging.toml new file mode 100644 index 0000000000000..e7687fdae93bc --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/setup.cfg b/sdk/keyvault/azure-keyvault-administration/setup.cfg new file mode 100644 index 0000000000000..3c6e79cf31da1 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/keyvault/azure-keyvault-administration/setup.py b/sdk/keyvault/azure-keyvault-administration/setup.py new file mode 100644 index 0000000000000..f65c427615979 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/setup.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python + +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +# pylint:disable=missing-docstring + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-keyvault-administration" +PACKAGE_PPRINT_NAME = "Key Vault Administration" + +# a-b-c => a/b/c +PACKAGE_FOLDER_PATH = PACKAGE_NAME.replace("-", "/") +# a-b-c => a.b.c +NAMESPACE_NAME = PACKAGE_NAME.replace("-", ".") + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + + try: + VER = azure.__version__ # type: ignore + raise Exception( + "This package is incompatible with azure=={}. ".format(VER) + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(PACKAGE_FOLDER_PATH, "_version.py"), "r") as fd: + VERSION = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not VERSION: + raise RuntimeError("Cannot find version information") + +with open("README.md", encoding="utf-8") as f: + README = f.read() +with open("CHANGELOG.md", encoding="utf-8") as f: + CHANGELOG = f.read() + +setup( + name=PACKAGE_NAME, + version=VERSION, + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=README + "\n\n" + CHANGELOG, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azurekeyvault@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-administration", + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "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, + packages=find_packages( + exclude=[ + "samples", + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.keyvault", + ] + ), + install_requires=["azure-common~=1.1", "azure-core<2.0.0,>=1.7.0", "msrest>=0.6.0"], + extras_require={ + ":python_version<'3.0'": ["azure-keyvault-nspkg"], + ":python_version<'3.4'": ["enum34>=1.0.4"], + ":python_version<'3.5'": ["typing"], + }, +) diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_shared/__init__.py b/sdk/keyvault/azure-keyvault-administration/tests/_shared/__init__.py new file mode 100644 index 0000000000000..b74cfa3b899cc --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/_shared/__init__.py @@ -0,0 +1,4 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_shared/helpers.py b/sdk/keyvault/azure-keyvault-administration/tests/_shared/helpers.py new file mode 100644 index 0000000000000..8df36215388e8 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/_shared/helpers.py @@ -0,0 +1,102 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import json +import six + +try: + from unittest import mock +except ImportError: # python < 3.3 + import mock # type: ignore + + +class Request: + def __init__( + self, + base_url=None, + url=None, + authority=None, + url_substring=None, + method=None, + required_headers=None, + required_data=None, + required_params=None, + ): + self.authority = authority + self.base_url = base_url + self.method = method + self.url = url + self.url_substring = url_substring + self.required_headers = required_headers or {} + self.required_data = required_data or {} + self.required_params = required_params or {} + + def assert_matches(self, request): + discrepancies = [] + + def add_discrepancy(name, expected, actual): + discrepancies.append("{}:\n\t expected: {}\n\t actual: {}".format(name, expected, actual)) + + if self.base_url and self.base_url != request.url.split("?")[0]: + add_discrepancy("base url", self.base_url, request.url) + + if self.url and self.url != request.url: + add_discrepancy("url", self.url, request.url) + + if self.url_substring and self.url_substring not in request.url: + add_discrepancy("url substring", self.url_substring, request.url) + + parsed = six.moves.urllib_parse.urlparse(request.url) + if self.authority and parsed.netloc != self.authority: + add_discrepancy("authority", self.authority, parsed.netloc) + + if self.method and request.method != self.method: + add_discrepancy("method", self.method, request.method) + + for param, expected_value in self.required_params.items(): + actual_value = request.query.get(param) + if actual_value != expected_value: + add_discrepancy(param, expected_value, actual_value) + + for header, expected_value in self.required_headers.items(): + actual_value = request.headers.get(header) + + # UserAgentPolicy appends the value of $AZURE_HTTP_USER_AGENT, which is set in + # pipelines, so we accept a user agent which merely contains the expected value + if header.lower() == "user-agent": + if expected_value not in actual_value: + add_discrepancy("user-agent", "contains " + expected_value, actual_value) + elif actual_value != expected_value: + add_discrepancy(header, expected_value, actual_value) + + for field, expected_value in self.required_data.items(): + actual_value = request.body.get(field) + if actual_value != expected_value: + add_discrepancy("form field", expected_value, actual_value) + + assert not discrepancies, "Unexpected request\n\t" + "\n\t".join(discrepancies) + + +def mock_response(status_code=200, headers=None, json_payload=None): + response = mock.Mock(status_code=status_code, headers=headers or {}) + if json_payload is not None: + response.text = lambda encoding=None: json.dumps(json_payload) + response.headers["content-type"] = "application/json" + response.content_type = "application/json" + return response + + +def validating_transport(requests, responses): + if len(requests) != len(responses): + raise ValueError("each request must have one response") + + sessions = zip(requests, responses) + sessions = (s for s in sessions) # 2.7's zip returns a list, and nesting a generator doesn't break it for 3.x + + def validate_request(request, **kwargs): # pylint:disable=unused-argument + expected_request, response = next(sessions) + expected_request.assert_matches(request) + return response + + return mock.Mock(send=validate_request) diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_shared/helpers_async.py b/sdk/keyvault/azure-keyvault-administration/tests/_shared/helpers_async.py new file mode 100644 index 0000000000000..d887c739758ce --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/_shared/helpers_async.py @@ -0,0 +1,49 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import asyncio +import functools +import sys +from unittest import mock + +from .helpers import validating_transport + + +def get_completed_future(result=None): + future = asyncio.Future() + future.set_result(result) + return future + + +def wrap_in_future(fn): + """Return a completed Future whose result is the return of fn. + + Added to simplify using unittest.Mock in async code. Python 3.8's AsyncMock would be preferable. + """ + + @functools.wraps(fn) + def wrapper(*args, **kwargs): + result = fn(*args, **kwargs) + return get_completed_future(result) + + return wrapper + + +class AsyncMockTransport(mock.MagicMock): + """Mock with do-nothing aenter/exit for mocking async transport. + + This is unnecessary on 3.8+, where MagicMocks implement aenter/exit. + """ + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + if sys.version_info < (3, 8): + self.__aenter__ = mock.Mock(return_value=get_completed_future()) + self.__aexit__ = mock.Mock(return_value=get_completed_future()) + + +def async_validating_transport(requests, responses): + sync_transport = validating_transport(requests, responses) + return AsyncMockTransport(send=wrap_in_future(sync_transport.send)) diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_shared/json_attribute_matcher.py b/sdk/keyvault/azure-keyvault-administration/tests/_shared/json_attribute_matcher.py new file mode 100644 index 0000000000000..bf79ad5880826 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/_shared/json_attribute_matcher.py @@ -0,0 +1,18 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import json + +import six + +_has_json_body = lambda req: req.body and "json" in req.headers.get("Content-Type", "") + + +def json_attribute_matcher(r1, r2): + """Tests whether two vcr.py requests have JSON content with identical attributes (ignoring values).""" + + if _has_json_body(r1) and _has_json_body(r2): + c1 = json.loads(six.ensure_str(r1.body)) + c2 = json.loads(six.ensure_str(r2.body)) + assert sorted(c1.keys()) == sorted(c2.keys()) diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_shared/preparer.py b/sdk/keyvault/azure-keyvault-administration/tests/_shared/preparer.py new file mode 100644 index 0000000000000..ea9a7a63d986b --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/_shared/preparer.py @@ -0,0 +1,29 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +try: + from unittest.mock import Mock +except ImportError: # python < 3.3 + from mock import Mock + +from azure.core.credentials import AccessToken +from azure.identity import EnvironmentCredential +from devtools_testutils import AzureMgmtPreparer + + +class KeyVaultClientPreparer(AzureMgmtPreparer): + def __init__(self, client_cls, name_prefix="vault", random_name_enabled=True, **kwargs): + super(KeyVaultClientPreparer, self).__init__(name_prefix, 24, random_name_enabled=random_name_enabled, **kwargs) + self._client_cls = client_cls + + def create_credential(self): + if self.is_live: + return EnvironmentCredential() + + return Mock(get_token=lambda *_: AccessToken("fake-token", 0)) + + def create_resource(self, _, **kwargs): + credential = self.create_credential() + client = self._client_cls(kwargs.get("vault_uri"), credential, **self.client_kwargs) + return {"client": client} diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_shared/preparer_async.py b/sdk/keyvault/azure-keyvault-administration/tests/_shared/preparer_async.py new file mode 100644 index 0000000000000..bf49a31304ccf --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/_shared/preparer_async.py @@ -0,0 +1,19 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +from unittest.mock import Mock + +from azure.core.credentials import AccessToken +from azure.identity.aio import EnvironmentCredential + +from .preparer import KeyVaultClientPreparer as _KeyVaultClientPreparer +from .helpers_async import get_completed_future + + +class KeyVaultClientPreparer(_KeyVaultClientPreparer): + def create_credential(self): + if self.is_live: + return EnvironmentCredential() + + return Mock(get_token=lambda *_: get_completed_future(AccessToken("fake-token", 0))) diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_shared/test_case.py b/sdk/keyvault/azure-keyvault-administration/tests/_shared/test_case.py new file mode 100644 index 0000000000000..c6716ea2574e1 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/_shared/test_case.py @@ -0,0 +1,46 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import time + +from azure_devtools.scenario_tests.patches import patch_time_sleep_api +from devtools_testutils import AzureMgmtTestCase + + +class KeyVaultTestCase(AzureMgmtTestCase): + def __init__(self, *args, **kwargs): + if "match_body" not in kwargs: + kwargs["match_body"] = True + + super(KeyVaultTestCase, self).__init__(*args, **kwargs) + self.replay_patches.append(patch_time_sleep_api) + + def setUp(self): + self.list_test_size = 7 + super(KeyVaultTestCase, self).setUp() + + def _poll_until_no_exception(self, fn, expected_exception, max_retries=20, retry_delay=3): + """polling helper for live tests because some operations take an unpredictable amount of time to complete""" + + for i in range(max_retries): + try: + return fn() + except expected_exception: + if i == max_retries - 1: + raise + if self.is_live: + time.sleep(retry_delay) + + def _poll_until_exception(self, fn, expected_exception, max_retries=20, retry_delay=3): + """polling helper for live tests because some operations take an unpredictable amount of time to complete""" + + for _ in range(max_retries): + try: + fn() + if self.is_live: + time.sleep(retry_delay) + except expected_exception: + return + + self.fail("expected exception {expected_exception} was not raised") diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_shared/test_case_async.py b/sdk/keyvault/azure-keyvault-administration/tests/_shared/test_case_async.py new file mode 100644 index 0000000000000..07991be314ff2 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/_shared/test_case_async.py @@ -0,0 +1,54 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import asyncio + +from azure_devtools.scenario_tests.patches import mock_in_unit_test +from devtools_testutils import AzureMgmtTestCase + + +def skip_sleep(unit_test): + async def immediate_return(_): + return + + return mock_in_unit_test(unit_test, "asyncio.sleep", immediate_return) + + +class KeyVaultTestCase(AzureMgmtTestCase): + def __init__(self, *args, match_body=True, **kwargs): + super().__init__(*args, match_body=match_body, **kwargs) + self.replay_patches.append(skip_sleep) + + def setUp(self): + self.list_test_size = 7 + super(KeyVaultTestCase, self).setUp() + + async def _poll_until_no_exception(self, fn, *resource_names, expected_exception, max_retries=20, retry_delay=3): + """polling helper for live tests because some operations take an unpredictable amount of time to complete""" + + for name in resource_names: + for i in range(max_retries): + try: + # TODO: better for caller to apply args to fn; could also gather + await fn(name) + break + except expected_exception: + if i == max_retries - 1: + raise + if self.is_live: + await asyncio.sleep(retry_delay) + + async def _poll_until_exception(self, fn, *resource_names, expected_exception, max_retries=20, retry_delay=3): + """polling helper for live tests because some operations take an unpredictable amount of time to complete""" + + for name in resource_names: + for _ in range(max_retries): + try: + # TODO: better for caller to apply args to fn; could also gather + await fn(name) + if self.is_live: + await asyncio.sleep(retry_delay) + except expected_exception: + return + self.fail("expected exception {expected_exception} was not raised") diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_list_role_definitions.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_list_role_definitions.yaml new file mode 100644 index 0000000000000..619557270b113 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_list_role_definitions.yaml @@ -0,0 +1,69 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview + response: + body: + string: !!python/unicode OK + headers: + content-length: + - '2' + content-type: + - application/json + www-authenticate: + - Bearer authorization="https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://managedhsm.azure.net" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview + response: + body: + string: !!python/unicode '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/export/action","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Administrator","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/export/action","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Officer","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto User","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Policy Administrator","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Auditor","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Service Encryption","type":""},"type":"Microsoft.Authorization/roleDefinitions"}]}' + headers: + content-length: + - '5517' + content-type: + - application/json + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=24.17.201.78 + x-ms-keyvault-region: + - EASTUS + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_assignment.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_assignment.yaml new file mode 100644 index 0000000000000..595db694da16e --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_assignment.yaml @@ -0,0 +1,226 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview + response: + body: + string: !!python/unicode OK + headers: + content-length: + - '2' + content-type: + - application/json + www-authenticate: + - Bearer authorization="https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://managedhsm.azure.net" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview + response: + body: + string: !!python/unicode '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/export/action","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Administrator","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/export/action","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Officer","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto User","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Policy Administrator","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Auditor","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Service Encryption","type":""},"type":"Microsoft.Authorization/roleDefinitions"}]}' + headers: + content-length: + - '5517' + content-type: + - application/json + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=24.17.201.78 + x-ms-keyvault-region: + - EASTUS + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"properties": {"roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "principalId": "service-principal-id"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '200' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: PUT + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2-preview + response: + body: + string: !!python/unicode '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' + headers: + content-length: + - '398' + content-type: + - application/json + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=24.17.201.78 + x-ms-keyvault-region: + - EASTUS + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2-preview + response: + body: + string: !!python/unicode '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' + headers: + content-length: + - '398' + content-type: + - application/json + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=24.17.201.78 + x-ms-keyvault-region: + - EASTUS + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview + response: + body: + string: !!python/unicode '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/e1392147-41b5-498b-847d-ca061e8808a3","name":"e1392147-41b5-498b-847d-ca061e8808a3","properties":{"principalId":"67ca7f59-968b-4cde-8582-d6a5341fa721","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/f35aa2fd-545a-4f42-a44b-f862a530d4f1","name":"f35aa2fd-545a-4f42-a44b-f862a530d4f1","properties":{"principalId":"f84ae8f9-c979-4750-a2fe-b350a00bebff","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/457acfe4-7ff8-4608-b3ac-87139804539e","name":"457acfe4-7ff8-4608-b3ac-87139804539e","properties":{"principalId":"693a17da-7022-4cdd-9d4e-4e72e4ad449d","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/c6de6e40-d764-49e1-8e7c-be2f2a27de81","name":"c6de6e40-d764-49e1-8e7c-be2f2a27de81","properties":{"principalId":"3c1303ad-140b-493c-ab45-bed8ddbfa72c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/2f070682-b1a6-0ad3-acd3-7b891e5c79b0","name":"2f070682-b1a6-0ad3-acd3-7b891e5c79b0","properties":{"principalId":"bf0cee9f-b26b-4e25-b4ab-92ec7466cf33","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/0480f9fc-1294-4668-b31e-e5d8bae7d5b3","name":"0480f9fc-1294-4668-b31e-e5d8bae7d5b3","properties":{"principalId":"74677558-f369-4792-afe5-f99738b5fa7c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' + headers: + content-length: + - '2804' + content-type: + - application/json + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=24.17.201.78 + x-ms-keyvault-region: + - EASTUS + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: DELETE + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2-preview + response: + body: + string: !!python/unicode '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' + headers: + content-length: + - '398' + content-type: + - application/json + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=24.17.201.78 + x-ms-keyvault-region: + - EASTUS + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/2.7.15 (Windows-10-10.0.19041) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview + response: + body: + string: !!python/unicode '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/e1392147-41b5-498b-847d-ca061e8808a3","name":"e1392147-41b5-498b-847d-ca061e8808a3","properties":{"principalId":"67ca7f59-968b-4cde-8582-d6a5341fa721","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/f35aa2fd-545a-4f42-a44b-f862a530d4f1","name":"f35aa2fd-545a-4f42-a44b-f862a530d4f1","properties":{"principalId":"f84ae8f9-c979-4750-a2fe-b350a00bebff","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/457acfe4-7ff8-4608-b3ac-87139804539e","name":"457acfe4-7ff8-4608-b3ac-87139804539e","properties":{"principalId":"693a17da-7022-4cdd-9d4e-4e72e4ad449d","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/c6de6e40-d764-49e1-8e7c-be2f2a27de81","name":"c6de6e40-d764-49e1-8e7c-be2f2a27de81","properties":{"principalId":"3c1303ad-140b-493c-ab45-bed8ddbfa72c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/2f070682-b1a6-0ad3-acd3-7b891e5c79b0","name":"2f070682-b1a6-0ad3-acd3-7b891e5c79b0","properties":{"principalId":"bf0cee9f-b26b-4e25-b4ab-92ec7466cf33","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/0480f9fc-1294-4668-b31e-e5d8bae7d5b3","name":"0480f9fc-1294-4668-b31e-e5d8bae7d5b3","properties":{"principalId":"74677558-f369-4792-afe5-f99738b5fa7c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' + headers: + content-length: + - '2405' + content-type: + - application/json + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=24.17.201.78 + x-ms-keyvault-region: + - EASTUS + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_list_role_definitions.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_list_role_definitions.yaml new file mode 100644 index 0000000000000..131a7d6c32bca --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_list_role_definitions.yaml @@ -0,0 +1,54 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview + response: + body: + string: OK + headers: + content-length: '2' + content-type: application/json + www-authenticate: Bearer authorization="https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://managedhsm.azure.net" + x-content-type-options: nosniff + status: + code: 401 + message: Unauthorized + url: https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview + response: + body: + string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/export/action","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Administrator","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/export/action","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Officer","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto User","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Policy Administrator","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Auditor","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Service Encryption","type":""},"type":"Microsoft.Authorization/roleDefinitions"}]}' + headers: + content-length: '5517' + content-type: application/json + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.17.201.78 + x-ms-keyvault-region: EASTUS + status: + code: 200 + message: OK + url: https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview +version: 1 diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_assignment.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_assignment.yaml new file mode 100644 index 0000000000000..a884c896a2ea1 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_assignment.yaml @@ -0,0 +1,145 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview + response: + body: + string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/export/action","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Administrator","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/export/action","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Officer","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto User","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Policy Administrator","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Auditor","type":""},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Azure + Key Vault Managed HSM Crypto Service Encryption","type":""},"type":"Microsoft.Authorization/roleDefinitions"}]}' + headers: + content-length: '5517' + content-type: application/json + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.17.201.78 + x-ms-keyvault-region: EASTUS + status: + code: 200 + message: OK + url: https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview +- request: + body: '{"properties": {"roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "principalId": "service-principal-id"}}' + headers: + Accept: + - application/json + Content-Length: + - '200' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2-preview + response: + body: + string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' + headers: + content-length: '398' + content-type: application/json + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.17.201.78 + x-ms-keyvault-region: EASTUS + status: + code: 201 + message: Created + url: https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/4af0820d-e870-4795-878e-1869f6f0888e?api-version=7.2-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2-preview + response: + body: + string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' + headers: + content-length: '398' + content-type: application/json + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.17.201.78 + x-ms-keyvault-region: EASTUS + status: + code: 200 + message: OK + url: https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/4af0820d-e870-4795-878e-1869f6f0888e?api-version=7.2-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview + response: + body: + string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/e1392147-41b5-498b-847d-ca061e8808a3","name":"e1392147-41b5-498b-847d-ca061e8808a3","properties":{"principalId":"67ca7f59-968b-4cde-8582-d6a5341fa721","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/f35aa2fd-545a-4f42-a44b-f862a530d4f1","name":"f35aa2fd-545a-4f42-a44b-f862a530d4f1","properties":{"principalId":"f84ae8f9-c979-4750-a2fe-b350a00bebff","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/457acfe4-7ff8-4608-b3ac-87139804539e","name":"457acfe4-7ff8-4608-b3ac-87139804539e","properties":{"principalId":"693a17da-7022-4cdd-9d4e-4e72e4ad449d","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/c6de6e40-d764-49e1-8e7c-be2f2a27de81","name":"c6de6e40-d764-49e1-8e7c-be2f2a27de81","properties":{"principalId":"3c1303ad-140b-493c-ab45-bed8ddbfa72c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/2f070682-b1a6-0ad3-acd3-7b891e5c79b0","name":"2f070682-b1a6-0ad3-acd3-7b891e5c79b0","properties":{"principalId":"bf0cee9f-b26b-4e25-b4ab-92ec7466cf33","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/0480f9fc-1294-4668-b31e-e5d8bae7d5b3","name":"0480f9fc-1294-4668-b31e-e5d8bae7d5b3","properties":{"principalId":"74677558-f369-4792-afe5-f99738b5fa7c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' + headers: + content-length: '2804' + content-type: application/json + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.17.201.78 + x-ms-keyvault-region: EASTUS + status: + code: 200 + message: OK + url: https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2-preview + response: + body: + string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' + headers: + content-length: '398' + content-type: application/json + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.17.201.78 + x-ms-keyvault-region: EASTUS + status: + code: 200 + message: OK + url: https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/4af0820d-e870-4795-878e-1869f6f0888e?api-version=7.2-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-administration/1.0.0b1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview + response: + body: + string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/e1392147-41b5-498b-847d-ca061e8808a3","name":"e1392147-41b5-498b-847d-ca061e8808a3","properties":{"principalId":"67ca7f59-968b-4cde-8582-d6a5341fa721","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/f35aa2fd-545a-4f42-a44b-f862a530d4f1","name":"f35aa2fd-545a-4f42-a44b-f862a530d4f1","properties":{"principalId":"f84ae8f9-c979-4750-a2fe-b350a00bebff","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/457acfe4-7ff8-4608-b3ac-87139804539e","name":"457acfe4-7ff8-4608-b3ac-87139804539e","properties":{"principalId":"693a17da-7022-4cdd-9d4e-4e72e4ad449d","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/c6de6e40-d764-49e1-8e7c-be2f2a27de81","name":"c6de6e40-d764-49e1-8e7c-be2f2a27de81","properties":{"principalId":"3c1303ad-140b-493c-ab45-bed8ddbfa72c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/2f070682-b1a6-0ad3-acd3-7b891e5c79b0","name":"2f070682-b1a6-0ad3-acd3-7b891e5c79b0","properties":{"principalId":"bf0cee9f-b26b-4e25-b4ab-92ec7466cf33","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/0480f9fc-1294-4668-b31e-e5d8bae7d5b3","name":"0480f9fc-1294-4668-b31e-e5d8bae7d5b3","properties":{"principalId":"74677558-f369-4792-afe5-f99738b5fa7c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' + headers: + content-length: '2405' + content-type: application/json + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.17.201.78 + x-ms-keyvault-region: EASTUS + status: + code: 200 + message: OK + url: https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview +version: 1 diff --git a/sdk/keyvault/azure-keyvault-administration/tests/test_access_control.py b/sdk/keyvault/azure-keyvault-administration/tests/test_access_control.py new file mode 100644 index 0000000000000..d2bf339766a22 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/test_access_control.py @@ -0,0 +1,95 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import functools +import os +import uuid + +from azure.keyvault.administration import KeyVaultAccessControlClient, KeyVaultRoleScope +from devtools_testutils import KeyVaultPreparer, ResourceGroupPreparer +import pytest + +from _shared.test_case import KeyVaultTestCase +from _shared.preparer import KeyVaultClientPreparer as _KeyVaultClientPreparer + +AccessControlClientPreparer = functools.partial(_KeyVaultClientPreparer, KeyVaultAccessControlClient) + + +class AccessControlTests(KeyVaultTestCase): + def __init__(self, *args, **kwargs): + super(AccessControlTests, self).__init__(*args, **kwargs) + if self.is_live: + pytest.skip("test infrastructure can't yet create a Key Vault supporting the RBAC API") + + def get_replayable_uuid(self, replay_value): + if self.is_live: + value = str(uuid.uuid4()) + self.scrubber.register_name_pair(value, replay_value) + return value + return replay_value + + def get_service_principal_id(self): + replay_value = "service-principal-id" + if self.is_live: + value = os.environ["AZURE_CLIENT_ID"] + self.scrubber.register_name_pair(value, replay_value) + return value + return replay_value + + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @AccessControlClientPreparer() + def test_list_role_definitions(self, client): + definitions = [d for d in client.list_role_definitions(KeyVaultRoleScope.global_value)] + assert len(definitions) + + for definition in definitions: + assert "/" in definition.assignable_scopes + assert definition.description is not None + assert definition.id is not None + assert definition.name is not None + assert len(definition.permissions) + assert definition.role_name is not None + assert definition.role_type is not None + assert definition.type is not None + + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @AccessControlClientPreparer() + def test_role_assignment(self, client): + scope = KeyVaultRoleScope.global_value + definitions = [d for d in client.list_role_definitions(scope)] + + # assign an arbitrary role to the service principal authenticating these requests + definition = definitions[0] + principal_id = self.get_service_principal_id() + name = self.get_replayable_uuid("some-uuid") + + created = client.create_role_assignment(scope, name, definition.id, principal_id) + assert created.name == name + assert created.principal_id == principal_id + assert created.role_definition_id == definition.id + assert created.scope == scope + + # should be able to get the new assignment + got = client.get_role_assignment(scope, name) + assert got.name == name + assert got.principal_id == principal_id + assert got.role_definition_id == definition.id + assert got.scope == scope + + # new assignment should be in the list of all assignments + matching_assignments = [ + a for a in client.list_role_assignments(scope) if a.assignment_id == created.assignment_id + ] + assert len(matching_assignments) == 1 + + # delete the assignment + deleted = client.delete_role_assignment(scope, created.name) + assert deleted.name == created.name + assert deleted.assignment_id == created.assignment_id + assert deleted.scope == scope + assert deleted.role_definition_id == created.role_definition_id + + assert not any(a for a in client.list_role_assignments(scope) if a.assignment_id == created.assignment_id) diff --git a/sdk/keyvault/azure-keyvault-administration/tests/test_access_control_async.py b/sdk/keyvault/azure-keyvault-administration/tests/test_access_control_async.py new file mode 100644 index 0000000000000..d0cd50d36534f --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/tests/test_access_control_async.py @@ -0,0 +1,102 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import functools +import os +import uuid + +from azure.keyvault.administration import KeyVaultRoleScope +from azure.keyvault.administration.aio import KeyVaultAccessControlClient +from devtools_testutils import KeyVaultPreparer, ResourceGroupPreparer +import pytest + +from _shared.test_case_async import KeyVaultTestCase +from _shared.preparer_async import KeyVaultClientPreparer as _KeyVaultClientPreparer + +AccessControlClientPreparer = functools.partial(_KeyVaultClientPreparer, KeyVaultAccessControlClient) + + +class AccessControlTests(KeyVaultTestCase): + def __init__(self, *args, **kwargs): + super(AccessControlTests, self).__init__(*args, **kwargs) + if self.is_live: + pytest.skip("test infrastructure can't yet create a Key Vault supporting the RBAC API") + + def get_replayable_uuid(self, replay_value): + if self.is_live: + value = str(uuid.uuid4()) + self.scrubber.register_name_pair(value, replay_value) + return value + return replay_value + + def get_service_principal_id(self): + replay_value = "service-principal-id" + if self.is_live: + value = os.environ["AZURE_CLIENT_ID"] + self.scrubber.register_name_pair(value, replay_value) + return value + return replay_value + + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @AccessControlClientPreparer() + async def test_list_role_definitions(self, client): + definitions = [] + async for definition in client.list_role_definitions(KeyVaultRoleScope.global_value): + definitions.append(definition) + assert len(definitions) + + for definition in definitions: + assert "/" in definition.assignable_scopes + assert definition.description is not None + assert definition.id is not None + assert definition.name is not None + assert len(definition.permissions) + assert definition.role_name is not None + assert definition.role_type is not None + assert definition.type is not None + + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @AccessControlClientPreparer() + async def test_role_assignment(self, client): + scope = KeyVaultRoleScope.global_value + definitions = [] + async for definition in client.list_role_definitions(scope): + definitions.append(definition) + + # assign an arbitrary role to the service principal authenticating these requests + definition = definitions[0] + principal_id = self.get_service_principal_id() + name = self.get_replayable_uuid("some-uuid") + + created = await client.create_role_assignment(scope, name, definition.id, principal_id) + assert created.name == name + assert created.principal_id == principal_id + assert created.role_definition_id == definition.id + assert created.scope == scope + + # should be able to get the new assignment + got = await client.get_role_assignment(scope, name) + assert got.name == name + assert got.principal_id == principal_id + assert got.role_definition_id == definition.id + assert got.scope == scope + + # new assignment should be in the list of all assignments + matching_assignments = [] + async for assignment in client.list_role_assignments(scope): + if assignment.assignment_id == created.assignment_id: + matching_assignments.append(assignment) + assert len(matching_assignments) == 1 + + # delete the assignment + deleted = await client.delete_role_assignment(scope, created.name) + assert deleted.name == created.name + assert deleted.assignment_id == created.assignment_id + assert deleted.scope == scope + assert deleted.role_definition_id == created.role_definition_id + + async for assignment in client.list_role_assignments(scope): + assert assignment.assignment_id != created.assignment_id, "the role assignment should have been deleted" diff --git a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md index aa8bab5357fc9..579f7f48fb941 100644 --- a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md @@ -1,6 +1,9 @@ # Release History ## 4.2.1 (Unreleased) +### Fixed +- Correct typing for paging methods +- Fixed incompatibility issues with API version 2016-10-01 ## 4.2.0 (2020-08-11) diff --git a/sdk/keyvault/azure-keyvault-certificates/README.md b/sdk/keyvault/azure-keyvault-certificates/README.md index a20d09f330897..a0789714242b3 100644 --- a/sdk/keyvault/azure-keyvault-certificates/README.md +++ b/sdk/keyvault/azure-keyvault-certificates/README.md @@ -413,7 +413,7 @@ additional questions or comments. [backup_operations_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/backup_restore_operations_async.py [hello_world_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/hello_world.py [hello_world_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/hello_world_async.py -[keyvault_docs]: https://docs.microsoft.com/en-us/azure/key-vault/ +[keyvault_docs]: https://docs.microsoft.com/azure/key-vault/ [list_operations_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/list_operations.py [list_operations_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/list_operations_async.py [recover_purge_operations_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/recover_purge_operations.py @@ -428,6 +428,6 @@ additional questions or comments. [reference_docs]: https://aka.ms/azsdk/python/keyvault-certificates/docs [certificates_client_src]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates [certificates_samples]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-certificates/samples -[soft_delete]: https://docs.microsoft.com/en-us/azure/key-vault/key-vault-ovw-soft-delete +[soft_delete]: https://docs.microsoft.com/azure/key-vault/key-vault-ovw-soft-delete ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%2Fkeyvault%2Fazure-keyvault-certificates%2FFREADME.png) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py index 630c4e8d2920c..0caf6b9ad1963 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py @@ -31,7 +31,8 @@ if TYPE_CHECKING: # pylint:disable=unused-import - from typing import Any, Dict, List, Optional, Iterable + from typing import Any, Dict, Iterable, List, Optional + from azure.core.paging import ItemPaged class CertificateClient(KeyVaultClientBase): @@ -530,7 +531,7 @@ def restore_certificate_backup(self, backup, **kwargs): @distributed_trace def list_deleted_certificates(self, **kwargs): - # type: (**Any) -> Iterable[DeletedCertificate] + # type: (**Any) -> ItemPaged[DeletedCertificate] """Lists the currently-recoverable deleted certificates. Possible only if vault is soft-delete enabled. Requires certificates/get/list permission. Retrieves the certificates in the current vault which @@ -554,6 +555,11 @@ def list_deleted_certificates(self, **kwargs): """ max_page_size = kwargs.pop("max_page_size", None) + if self.api_version == "2016-10-01" and kwargs.get("include_pending"): + raise NotImplementedError( + "The 'include_pending' parameter to `list_deleted_certificates` " + "is only available for API versions v7.0 and up" + ) return self._client.get_deleted_certificates( vault_base_url=self._vault_url, maxresults=max_page_size, @@ -566,7 +572,7 @@ def list_deleted_certificates(self, **kwargs): @distributed_trace def list_properties_of_certificates(self, **kwargs): - # type: (**Any) -> Iterable[CertificateProperties] + # type: (**Any) -> ItemPaged[CertificateProperties] """List identifiers and properties of all certificates in the vault. Requires certificates/list permission. @@ -588,6 +594,12 @@ def list_properties_of_certificates(self, **kwargs): """ max_page_size = kwargs.pop("max_page_size", None) + if self.api_version == "2016-10-01" and kwargs.get("include_pending"): + raise NotImplementedError( + "The 'include_pending' parameter to `list_properties_of_certificates` " + "is only available for API versions v7.0 and up" + ) + return self._client.get_certificates( vault_base_url=self._vault_url, maxresults=max_page_size, @@ -598,7 +610,7 @@ def list_properties_of_certificates(self, **kwargs): @distributed_trace def list_properties_of_certificate_versions(self, certificate_name, **kwargs): - # type: (str, **Any) -> Iterable[CertificateProperties] + # type: (str, **Any) -> ItemPaged[CertificateProperties] """List the identifiers and properties of a certificate's versions. Requires certificates/list permission. @@ -989,7 +1001,7 @@ def delete_issuer(self, issuer_name, **kwargs): @distributed_trace def list_properties_of_issuers(self, **kwargs): - # type: (**Any) -> Iterable[IssuerProperties] + # type: (**Any) -> ItemPaged[IssuerProperties] """Lists properties of the certificate issuers for the key vault. Requires the certificates/manageissuers/getissuers permission. diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_key_vault_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_key_vault_client.py index 310258a4b81e2..94ec92e7907c5 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_key_vault_client.py @@ -37,65 +37,13 @@ class KeyVaultClient(KeyVaultClientOperationsMixin, MultiApiClientMixin, _SDKCli missing in profile. :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '7.1' + DEFAULT_API_VERSION = '2016-10-01' _PROFILE_TAG = "azure.keyvault.KeyVaultClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'backup_key': '7.0', - 'backup_secret': '7.0', - 'backup_storage_account': '7.0', - 'create_key': '7.0', - 'decrypt': '7.0', - 'delete_key': '7.0', - 'delete_sas_definition': '7.0', - 'delete_secret': '7.0', - 'delete_storage_account': '7.0', - 'encrypt': '7.0', - 'get_deleted_key': '7.0', - 'get_deleted_keys': '7.0', - 'get_deleted_sas_definition': '7.0', - 'get_deleted_sas_definitions': '7.0', - 'get_deleted_secret': '7.0', - 'get_deleted_secrets': '7.0', - 'get_deleted_storage_account': '7.0', - 'get_deleted_storage_accounts': '7.0', - 'get_key': '7.0', - 'get_key_versions': '7.0', - 'get_keys': '7.0', - 'get_sas_definition': '7.0', - 'get_sas_definitions': '7.0', - 'get_secret': '7.0', - 'get_secret_versions': '7.0', - 'get_secrets': '7.0', - 'get_storage_account': '7.0', - 'get_storage_accounts': '7.0', - 'import_key': '7.0', - 'purge_deleted_key': '7.0', - 'purge_deleted_secret': '7.0', - 'purge_deleted_storage_account': '7.0', - 'recover_deleted_key': '7.0', - 'recover_deleted_sas_definition': '7.0', - 'recover_deleted_secret': '7.0', - 'recover_deleted_storage_account': '7.0', - 'regenerate_storage_account_key': '7.0', - 'restore_key': '7.0', - 'restore_secret': '7.0', - 'restore_storage_account': '7.0', - 'set_sas_definition': '7.0', - 'set_secret': '7.0', - 'set_storage_account': '7.0', - 'sign': '7.0', - 'unwrap_key': '7.0', - 'update_key': '7.0', - 'update_sas_definition': '7.0', - 'update_secret': '7.0', - 'update_storage_account': '7.0', - 'verify': '7.0', - 'wrap_key': '7.0', }}, _PROFILE_TAG + " latest" ) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_operations_mixin.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_operations_mixin.py index 33910d2df4c0f..509cc725bd72a 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_operations_mixin.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_operations_mixin.py @@ -85,7 +85,7 @@ def backup_key( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupKeyResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.BackupKeyResult + :rtype: ~azure.keyvault.v2016_10_01.models.BackupKeyResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('backup_key') @@ -119,7 +119,7 @@ def backup_secret( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupSecretResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.BackupSecretResult + :rtype: ~azure.keyvault.v2016_10_01.models.BackupSecretResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('backup_secret') @@ -185,10 +185,10 @@ def create_certificate( :param certificate_name: The name of the certificate. :type certificate_name: str :param parameters: The parameters to create a certificate. - :type parameters: ~azure.keyvault.v7_1.models.CertificateCreateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.CertificateCreateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateOperation, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateOperation + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('create_certificate') @@ -226,10 +226,10 @@ def create_key( new key. :type key_name: str :param parameters: The parameters to create a key. - :type parameters: ~azure.keyvault.v7_0.models.KeyCreateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyCreateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('create_key') @@ -270,10 +270,10 @@ def decrypt( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for the decryption operation. - :type parameters: ~azure.keyvault.v7_0.models.KeyOperationsParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyOperationsParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('decrypt') @@ -308,7 +308,7 @@ def delete_certificate( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedCertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.DeletedCertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedCertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_certificate') @@ -341,7 +341,7 @@ def delete_certificate_contacts( :type vault_base_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Contacts, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.Contacts + :rtype: ~azure.keyvault.v2016_10_01.models.Contacts :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_certificate_contacts') @@ -377,7 +377,7 @@ def delete_certificate_issuer( :type issuer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: IssuerBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.IssuerBundle + :rtype: ~azure.keyvault.v2016_10_01.models.IssuerBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_certificate_issuer') @@ -414,7 +414,7 @@ def delete_certificate_operation( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateOperation, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateOperation + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_certificate_operation') @@ -452,7 +452,7 @@ def delete_key( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedKeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedKeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedKeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_key') @@ -486,8 +486,8 @@ def delete_sas_definition( :param sas_definition_name: The name of the SAS definition. :type sas_definition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeletedSasDefinitionBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedSasDefinitionBundle + :return: SasDefinitionBundle, or the result of cls(response) + :rtype: ~azure.keyvault.v2016_10_01.models.SasDefinitionBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_sas_definition') @@ -521,7 +521,7 @@ def delete_secret( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedSecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedSecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedSecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_secret') @@ -551,8 +551,8 @@ def delete_storage_account( :param storage_account_name: The name of the storage account. :type storage_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeletedStorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedStorageBundle + :return: StorageBundle, or the result of cls(response) + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_storage_account') @@ -595,10 +595,10 @@ def encrypt( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for the encryption operation. - :type parameters: ~azure.keyvault.v7_0.models.KeyOperationsParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyOperationsParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('encrypt') @@ -631,12 +631,11 @@ def get_certificate( :type vault_base_url: str :param certificate_name: The name of the certificate in the given vault. :type certificate_name: str - :param certificate_version: The version of the certificate. This URI fragment is optional. If - not specified, the latest version of the certificate is returned. + :param certificate_version: The version of the certificate. :type certificate_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate') @@ -669,7 +668,7 @@ def get_certificate_contacts( :type vault_base_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Contacts, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.Contacts + :rtype: ~azure.keyvault.v2016_10_01.models.Contacts :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_contacts') @@ -706,7 +705,7 @@ def get_certificate_issuer( :type issuer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: IssuerBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.IssuerBundle + :rtype: ~azure.keyvault.v2016_10_01.models.IssuerBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_issuer') @@ -744,7 +743,7 @@ def get_certificate_issuers( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateIssuerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_1.models.CertificateIssuerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_issuers') @@ -780,7 +779,7 @@ def get_certificate_operation( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateOperation, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateOperation + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_operation') @@ -816,7 +815,7 @@ def get_certificate_policy( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificatePolicy, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificatePolicy + :rtype: ~azure.keyvault.v2016_10_01.models.CertificatePolicy :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_policy') @@ -856,7 +855,7 @@ def get_certificate_versions( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_1.models.CertificateListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_versions') @@ -879,7 +878,6 @@ def get_certificates( self, vault_base_url, # type: str maxresults=None, # type: Optional[int] - include_pending=None, # type: Optional[bool] **kwargs # type: Any ): """List certificates in a specified key vault. @@ -892,12 +890,9 @@ def get_certificates( :param maxresults: Maximum number of results to return in a page. If not specified the service will return up to 25 results. :type maxresults: int - :param include_pending: Specifies whether to include certificates which are not completely - provisioned. - :type include_pending: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_1.models.CertificateListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificates') @@ -914,7 +909,7 @@ def get_certificates( mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.get_certificates(vault_base_url, maxresults, include_pending, **kwargs) + return mixin_instance.get_certificates(vault_base_url, maxresults, **kwargs) def get_deleted_certificate( self, @@ -934,7 +929,7 @@ def get_deleted_certificate( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedCertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.DeletedCertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedCertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_certificate') @@ -957,7 +952,6 @@ def get_deleted_certificates( self, vault_base_url, # type: str maxresults=None, # type: Optional[int] - include_pending=None, # type: Optional[bool] **kwargs # type: Any ): """Lists the deleted certificates in the specified vault currently available for recovery. @@ -972,12 +966,9 @@ def get_deleted_certificates( :param maxresults: Maximum number of results to return in a page. If not specified the service will return up to 25 results. :type maxresults: int - :param include_pending: Specifies whether to include certificates which are not completely - provisioned. - :type include_pending: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedCertificateListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_1.models.DeletedCertificateListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_certificates') @@ -994,7 +985,7 @@ def get_deleted_certificates( mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.get_deleted_certificates(vault_base_url, maxresults, include_pending, **kwargs) + return mixin_instance.get_deleted_certificates(vault_base_url, maxresults, **kwargs) def get_deleted_key( self, @@ -1014,7 +1005,7 @@ def get_deleted_key( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedKeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedKeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedKeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_key') @@ -1052,7 +1043,7 @@ def get_deleted_keys( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedKeyListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_keys') @@ -1157,7 +1148,7 @@ def get_deleted_secret( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedSecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedSecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedSecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_secret') @@ -1192,7 +1183,7 @@ def get_deleted_secrets( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedSecretListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_secrets') @@ -1290,12 +1281,11 @@ def get_key( :type vault_base_url: str :param key_name: The name of the key to get. :type key_name: str - :param key_version: Adding the version parameter retrieves a specific version of a key. This - URI fragment is optional. If not specified, the latest version of the key is returned. + :param key_version: Adding the version parameter retrieves a specific version of a key. :type key_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_key') @@ -1333,7 +1323,7 @@ def get_key_versions( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KeyListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_key_versions') @@ -1370,7 +1360,7 @@ def get_keys( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KeyListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_keys') @@ -1405,7 +1395,7 @@ def get_sas_definition( :type sas_definition_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SasDefinitionBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SasDefinitionBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SasDefinitionBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_sas_definition') @@ -1441,7 +1431,7 @@ def get_sas_definitions( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SasDefinitionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_sas_definitions') @@ -1474,12 +1464,11 @@ def get_secret( :type vault_base_url: str :param secret_name: The name of the secret. :type secret_name: str - :param secret_version: The version of the secret. This URI fragment is optional. If not - specified, the latest version of the secret is returned. + :param secret_version: The version of the secret. :type secret_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_secret') @@ -1517,7 +1506,7 @@ def get_secret_versions( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SecretListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_secret_versions') @@ -1553,7 +1542,7 @@ def get_secrets( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SecretListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_secrets') @@ -1585,7 +1574,7 @@ def get_storage_account( :type storage_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: StorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.StorageBundle + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_storage_account') @@ -1618,7 +1607,7 @@ def get_storage_accounts( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StorageListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_storage_accounts') @@ -1654,10 +1643,10 @@ def import_certificate( :param certificate_name: The name of the certificate. :type certificate_name: str :param parameters: The parameters to import the certificate. - :type parameters: ~azure.keyvault.v7_1.models.CertificateImportParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.CertificateImportParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('import_certificate') @@ -1694,10 +1683,10 @@ def import_key( :param key_name: Name for the imported key. :type key_name: str :param parameters: The parameters to import a key. - :type parameters: ~azure.keyvault.v7_0.models.KeyImportParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyImportParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('import_key') @@ -1732,10 +1721,10 @@ def merge_certificate( :param certificate_name: The name of the certificate. :type certificate_name: str :param parameters: The parameters to merge certificate. - :type parameters: ~azure.keyvault.v7_1.models.CertificateMergeParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.CertificateMergeParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('merge_certificate') @@ -1913,7 +1902,7 @@ def recover_deleted_certificate( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('recover_deleted_certificate') @@ -1951,7 +1940,7 @@ def recover_deleted_key( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('recover_deleted_key') @@ -2021,7 +2010,7 @@ def recover_deleted_secret( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('recover_deleted_secret') @@ -2086,10 +2075,10 @@ def regenerate_storage_account_key( :param storage_account_name: The name of the storage account. :type storage_account_name: str :param parameters: The parameters to regenerate storage account key. - :type parameters: ~azure.keyvault.v7_0.models.StorageAccountRegenerteKeyParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.StorageAccountRegenerteKeyParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: StorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.StorageBundle + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('regenerate_storage_account_key') @@ -2162,10 +2151,10 @@ def restore_key( :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. :type vault_base_url: str :param parameters: The parameters to restore the key. - :type parameters: ~azure.keyvault.v7_0.models.KeyRestoreParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyRestoreParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('restore_key') @@ -2196,10 +2185,10 @@ def restore_secret( :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. :type vault_base_url: str :param parameters: The parameters to restore the secret. - :type parameters: ~azure.keyvault.v7_0.models.SecretRestoreParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SecretRestoreParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('restore_secret') @@ -2262,10 +2251,10 @@ def set_certificate_contacts( :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. :type vault_base_url: str :param contacts: The contacts for the key vault certificate. - :type contacts: ~azure.keyvault.v7_1.models.Contacts + :type contacts: ~azure.keyvault.v2016_10_01.models.Contacts :keyword callable cls: A custom type or function that will be passed the direct response :return: Contacts, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.Contacts + :rtype: ~azure.keyvault.v2016_10_01.models.Contacts :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_certificate_contacts') @@ -2301,10 +2290,10 @@ def set_certificate_issuer( :param issuer_name: The name of the issuer. :type issuer_name: str :param parameter: Certificate issuer set parameter. - :type parameter: ~azure.keyvault.v7_1.models.CertificateIssuerSetParameters + :type parameter: ~azure.keyvault.v2016_10_01.models.CertificateIssuerSetParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: IssuerBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.IssuerBundle + :rtype: ~azure.keyvault.v2016_10_01.models.IssuerBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_certificate_issuer') @@ -2341,10 +2330,10 @@ def set_sas_definition( :param sas_definition_name: The name of the SAS definition. :type sas_definition_name: str :param parameters: The parameters to create a SAS definition. - :type parameters: ~azure.keyvault.v7_0.models.SasDefinitionCreateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SasDefinitionCreateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SasDefinitionBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SasDefinitionBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SasDefinitionBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_sas_definition') @@ -2379,10 +2368,10 @@ def set_secret( :param secret_name: The name of the secret. :type secret_name: str :param parameters: The parameters for setting the secret. - :type parameters: ~azure.keyvault.v7_0.models.SecretSetParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SecretSetParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_secret') @@ -2413,10 +2402,10 @@ def set_storage_account( :param storage_account_name: The name of the storage account. :type storage_account_name: str :param parameters: The parameters to create a storage account. - :type parameters: ~azure.keyvault.v7_0.models.StorageAccountCreateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.StorageAccountCreateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: StorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.StorageBundle + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_storage_account') @@ -2454,10 +2443,10 @@ def sign( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for the signing operation. - :type parameters: ~azure.keyvault.v7_0.models.KeySignParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeySignParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('sign') @@ -2496,10 +2485,10 @@ def unwrap_key( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for the key operation. - :type parameters: ~azure.keyvault.v7_0.models.KeyOperationsParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyOperationsParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('unwrap_key') @@ -2537,10 +2526,10 @@ def update_certificate( :param certificate_version: The version of the certificate. :type certificate_version: str :param parameters: The parameters for certificate update. - :type parameters: ~azure.keyvault.v7_1.models.CertificateUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.CertificateUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_certificate') @@ -2576,10 +2565,10 @@ def update_certificate_issuer( :param issuer_name: The name of the issuer. :type issuer_name: str :param parameter: Certificate issuer update parameter. - :type parameter: ~azure.keyvault.v7_1.models.CertificateIssuerUpdateParameters + :type parameter: ~azure.keyvault.v2016_10_01.models.CertificateIssuerUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: IssuerBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.IssuerBundle + :rtype: ~azure.keyvault.v2016_10_01.models.IssuerBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_certificate_issuer') @@ -2615,10 +2604,10 @@ def update_certificate_operation( :param certificate_name: The name of the certificate. :type certificate_name: str :param certificate_operation: The certificate operation response. - :type certificate_operation: ~azure.keyvault.v7_1.models.CertificateOperationUpdateParameter + :type certificate_operation: ~azure.keyvault.v2016_10_01.models.CertificateOperationUpdateParameter :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateOperation, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateOperation + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_certificate_operation') @@ -2654,10 +2643,10 @@ def update_certificate_policy( :param certificate_name: The name of the certificate in the given vault. :type certificate_name: str :param certificate_policy: The policy for the certificate. - :type certificate_policy: ~azure.keyvault.v7_1.models.CertificatePolicy + :type certificate_policy: ~azure.keyvault.v2016_10_01.models.CertificatePolicy :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificatePolicy, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificatePolicy + :rtype: ~azure.keyvault.v2016_10_01.models.CertificatePolicy :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_certificate_policy') @@ -2697,10 +2686,10 @@ def update_key( :param key_version: The version of the key to update. :type key_version: str :param parameters: The parameters of the key to update. - :type parameters: ~azure.keyvault.v7_0.models.KeyUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_key') @@ -2735,10 +2724,10 @@ def update_sas_definition( :param sas_definition_name: The name of the SAS definition. :type sas_definition_name: str :param parameters: The parameters to update a SAS definition. - :type parameters: ~azure.keyvault.v7_0.models.SasDefinitionUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SasDefinitionUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SasDefinitionBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SasDefinitionBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SasDefinitionBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_sas_definition') @@ -2776,10 +2765,10 @@ def update_secret( :param secret_version: The version of the secret. :type secret_version: str :param parameters: The parameters for update secret operation. - :type parameters: ~azure.keyvault.v7_0.models.SecretUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SecretUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_secret') @@ -2811,10 +2800,10 @@ def update_storage_account( :param storage_account_name: The name of the storage account. :type storage_account_name: str :param parameters: The parameters to update a storage account. - :type parameters: ~azure.keyvault.v7_0.models.StorageAccountUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.StorageAccountUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: StorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.StorageBundle + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_storage_account') @@ -2854,10 +2843,10 @@ def verify( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for verify operations. - :type parameters: ~azure.keyvault.v7_0.models.KeyVerifyParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyVerifyParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyVerifyResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyVerifyResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyVerifyResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('verify') @@ -2898,10 +2887,10 @@ def wrap_key( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for wrap operation. - :type parameters: ~azure.keyvault.v7_0.models.KeyOperationsParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyOperationsParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('wrap_key') diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_key_vault_client_async.py index c6482924df96c..d8f64365ab8ce 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_key_vault_client_async.py @@ -37,65 +37,13 @@ class KeyVaultClient(KeyVaultClientOperationsMixin, MultiApiClientMixin, _SDKCli missing in profile. :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '7.1' + DEFAULT_API_VERSION = '2016-10-01' _PROFILE_TAG = "azure.keyvault.KeyVaultClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'backup_key': '7.0', - 'backup_secret': '7.0', - 'backup_storage_account': '7.0', - 'create_key': '7.0', - 'decrypt': '7.0', - 'delete_key': '7.0', - 'delete_sas_definition': '7.0', - 'delete_secret': '7.0', - 'delete_storage_account': '7.0', - 'encrypt': '7.0', - 'get_deleted_key': '7.0', - 'get_deleted_keys': '7.0', - 'get_deleted_sas_definition': '7.0', - 'get_deleted_sas_definitions': '7.0', - 'get_deleted_secret': '7.0', - 'get_deleted_secrets': '7.0', - 'get_deleted_storage_account': '7.0', - 'get_deleted_storage_accounts': '7.0', - 'get_key': '7.0', - 'get_key_versions': '7.0', - 'get_keys': '7.0', - 'get_sas_definition': '7.0', - 'get_sas_definitions': '7.0', - 'get_secret': '7.0', - 'get_secret_versions': '7.0', - 'get_secrets': '7.0', - 'get_storage_account': '7.0', - 'get_storage_accounts': '7.0', - 'import_key': '7.0', - 'purge_deleted_key': '7.0', - 'purge_deleted_secret': '7.0', - 'purge_deleted_storage_account': '7.0', - 'recover_deleted_key': '7.0', - 'recover_deleted_sas_definition': '7.0', - 'recover_deleted_secret': '7.0', - 'recover_deleted_storage_account': '7.0', - 'regenerate_storage_account_key': '7.0', - 'restore_key': '7.0', - 'restore_secret': '7.0', - 'restore_storage_account': '7.0', - 'set_sas_definition': '7.0', - 'set_secret': '7.0', - 'set_storage_account': '7.0', - 'sign': '7.0', - 'unwrap_key': '7.0', - 'update_key': '7.0', - 'update_sas_definition': '7.0', - 'update_secret': '7.0', - 'update_storage_account': '7.0', - 'verify': '7.0', - 'wrap_key': '7.0', }}, _PROFILE_TAG + " latest" ) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_operations_mixin_async.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_operations_mixin_async.py index 7d06436fdf109..c0bfb5d85a49b 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_operations_mixin_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_operations_mixin_async.py @@ -81,7 +81,7 @@ async def backup_key( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupKeyResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.BackupKeyResult + :rtype: ~azure.keyvault.v2016_10_01.models.BackupKeyResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('backup_key') @@ -115,7 +115,7 @@ async def backup_secret( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupSecretResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.BackupSecretResult + :rtype: ~azure.keyvault.v2016_10_01.models.BackupSecretResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('backup_secret') @@ -181,10 +181,10 @@ async def create_certificate( :param certificate_name: The name of the certificate. :type certificate_name: str :param parameters: The parameters to create a certificate. - :type parameters: ~azure.keyvault.v7_1.models.CertificateCreateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.CertificateCreateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateOperation, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateOperation + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('create_certificate') @@ -222,10 +222,10 @@ async def create_key( new key. :type key_name: str :param parameters: The parameters to create a key. - :type parameters: ~azure.keyvault.v7_0.models.KeyCreateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyCreateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('create_key') @@ -266,10 +266,10 @@ async def decrypt( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for the decryption operation. - :type parameters: ~azure.keyvault.v7_0.models.KeyOperationsParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyOperationsParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('decrypt') @@ -304,7 +304,7 @@ async def delete_certificate( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedCertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.DeletedCertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedCertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_certificate') @@ -337,7 +337,7 @@ async def delete_certificate_contacts( :type vault_base_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Contacts, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.Contacts + :rtype: ~azure.keyvault.v2016_10_01.models.Contacts :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_certificate_contacts') @@ -373,7 +373,7 @@ async def delete_certificate_issuer( :type issuer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: IssuerBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.IssuerBundle + :rtype: ~azure.keyvault.v2016_10_01.models.IssuerBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_certificate_issuer') @@ -410,7 +410,7 @@ async def delete_certificate_operation( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateOperation, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateOperation + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_certificate_operation') @@ -448,7 +448,7 @@ async def delete_key( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedKeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedKeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedKeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_key') @@ -471,7 +471,7 @@ async def delete_sas_definition( storage_account_name: str, sas_definition_name: str, **kwargs - ) -> "models.DeletedSasDefinitionBundle": + ) -> "models.SasDefinitionBundle": """Deletes a SAS definition from a specified storage account. This operation requires the storage/deletesas permission. @@ -482,8 +482,8 @@ async def delete_sas_definition( :param sas_definition_name: The name of the SAS definition. :type sas_definition_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeletedSasDefinitionBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedSasDefinitionBundle + :return: SasDefinitionBundle, or the result of cls(response) + :rtype: ~azure.keyvault.v2016_10_01.models.SasDefinitionBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_sas_definition') @@ -517,7 +517,7 @@ async def delete_secret( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedSecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedSecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedSecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_secret') @@ -539,7 +539,7 @@ async def delete_storage_account( vault_base_url: str, storage_account_name: str, **kwargs - ) -> "models.DeletedStorageBundle": + ) -> "models.StorageBundle": """Deletes a storage account. This operation requires the storage/delete permission. :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. @@ -547,8 +547,8 @@ async def delete_storage_account( :param storage_account_name: The name of the storage account. :type storage_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeletedStorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedStorageBundle + :return: StorageBundle, or the result of cls(response) + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('delete_storage_account') @@ -591,10 +591,10 @@ async def encrypt( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for the encryption operation. - :type parameters: ~azure.keyvault.v7_0.models.KeyOperationsParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyOperationsParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('encrypt') @@ -627,12 +627,11 @@ async def get_certificate( :type vault_base_url: str :param certificate_name: The name of the certificate in the given vault. :type certificate_name: str - :param certificate_version: The version of the certificate. This URI fragment is optional. If - not specified, the latest version of the certificate is returned. + :param certificate_version: The version of the certificate. :type certificate_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate') @@ -665,7 +664,7 @@ async def get_certificate_contacts( :type vault_base_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Contacts, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.Contacts + :rtype: ~azure.keyvault.v2016_10_01.models.Contacts :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_contacts') @@ -702,7 +701,7 @@ async def get_certificate_issuer( :type issuer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: IssuerBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.IssuerBundle + :rtype: ~azure.keyvault.v2016_10_01.models.IssuerBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_issuer') @@ -740,7 +739,7 @@ def get_certificate_issuers( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateIssuerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_1.models.CertificateIssuerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_issuers') @@ -776,7 +775,7 @@ async def get_certificate_operation( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateOperation, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateOperation + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_operation') @@ -812,7 +811,7 @@ async def get_certificate_policy( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificatePolicy, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificatePolicy + :rtype: ~azure.keyvault.v2016_10_01.models.CertificatePolicy :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_policy') @@ -852,7 +851,7 @@ def get_certificate_versions( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_1.models.CertificateListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificate_versions') @@ -875,7 +874,6 @@ def get_certificates( self, vault_base_url: str, maxresults: Optional[int] = None, - include_pending: Optional[bool] = None, **kwargs ) -> AsyncItemPaged["models.CertificateListResult"]: """List certificates in a specified key vault. @@ -888,12 +886,9 @@ def get_certificates( :param maxresults: Maximum number of results to return in a page. If not specified the service will return up to 25 results. :type maxresults: int - :param include_pending: Specifies whether to include certificates which are not completely - provisioned. - :type include_pending: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_1.models.CertificateListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_certificates') @@ -910,7 +905,7 @@ def get_certificates( mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.get_certificates(vault_base_url, maxresults, include_pending, **kwargs) + return mixin_instance.get_certificates(vault_base_url, maxresults, **kwargs) async def get_deleted_certificate( self, @@ -930,7 +925,7 @@ async def get_deleted_certificate( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedCertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.DeletedCertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedCertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_certificate') @@ -953,7 +948,6 @@ def get_deleted_certificates( self, vault_base_url: str, maxresults: Optional[int] = None, - include_pending: Optional[bool] = None, **kwargs ) -> AsyncItemPaged["models.DeletedCertificateListResult"]: """Lists the deleted certificates in the specified vault currently available for recovery. @@ -968,12 +962,9 @@ def get_deleted_certificates( :param maxresults: Maximum number of results to return in a page. If not specified the service will return up to 25 results. :type maxresults: int - :param include_pending: Specifies whether to include certificates which are not completely - provisioned. - :type include_pending: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedCertificateListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_1.models.DeletedCertificateListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_certificates') @@ -990,7 +981,7 @@ def get_deleted_certificates( mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.get_deleted_certificates(vault_base_url, maxresults, include_pending, **kwargs) + return mixin_instance.get_deleted_certificates(vault_base_url, maxresults, **kwargs) async def get_deleted_key( self, @@ -1010,7 +1001,7 @@ async def get_deleted_key( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedKeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedKeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedKeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_key') @@ -1048,7 +1039,7 @@ def get_deleted_keys( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedKeyListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_keys') @@ -1153,7 +1144,7 @@ async def get_deleted_secret( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DeletedSecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.DeletedSecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.DeletedSecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_secret') @@ -1188,7 +1179,7 @@ def get_deleted_secrets( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedSecretListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_deleted_secrets') @@ -1286,12 +1277,11 @@ async def get_key( :type vault_base_url: str :param key_name: The name of the key to get. :type key_name: str - :param key_version: Adding the version parameter retrieves a specific version of a key. This - URI fragment is optional. If not specified, the latest version of the key is returned. + :param key_version: Adding the version parameter retrieves a specific version of a key. :type key_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_key') @@ -1329,7 +1319,7 @@ def get_key_versions( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KeyListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_key_versions') @@ -1366,7 +1356,7 @@ def get_keys( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KeyListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_keys') @@ -1401,7 +1391,7 @@ async def get_sas_definition( :type sas_definition_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SasDefinitionBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SasDefinitionBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SasDefinitionBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_sas_definition') @@ -1437,7 +1427,7 @@ def get_sas_definitions( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SasDefinitionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_sas_definitions') @@ -1470,12 +1460,11 @@ async def get_secret( :type vault_base_url: str :param secret_name: The name of the secret. :type secret_name: str - :param secret_version: The version of the secret. This URI fragment is optional. If not - specified, the latest version of the secret is returned. + :param secret_version: The version of the secret. :type secret_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_secret') @@ -1513,7 +1502,7 @@ def get_secret_versions( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SecretListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_secret_versions') @@ -1549,7 +1538,7 @@ def get_secrets( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SecretListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_secrets') @@ -1581,7 +1570,7 @@ async def get_storage_account( :type storage_account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: StorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.StorageBundle + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_storage_account') @@ -1614,7 +1603,7 @@ def get_storage_accounts( :type maxresults: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StorageListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_storage_accounts') @@ -1650,10 +1639,10 @@ async def import_certificate( :param certificate_name: The name of the certificate. :type certificate_name: str :param parameters: The parameters to import the certificate. - :type parameters: ~azure.keyvault.v7_1.models.CertificateImportParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.CertificateImportParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('import_certificate') @@ -1690,10 +1679,10 @@ async def import_key( :param key_name: Name for the imported key. :type key_name: str :param parameters: The parameters to import a key. - :type parameters: ~azure.keyvault.v7_0.models.KeyImportParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyImportParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('import_key') @@ -1728,10 +1717,10 @@ async def merge_certificate( :param certificate_name: The name of the certificate. :type certificate_name: str :param parameters: The parameters to merge certificate. - :type parameters: ~azure.keyvault.v7_1.models.CertificateMergeParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.CertificateMergeParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('merge_certificate') @@ -1909,7 +1898,7 @@ async def recover_deleted_certificate( :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('recover_deleted_certificate') @@ -1947,7 +1936,7 @@ async def recover_deleted_key( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('recover_deleted_key') @@ -2017,7 +2006,7 @@ async def recover_deleted_secret( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('recover_deleted_secret') @@ -2082,10 +2071,10 @@ async def regenerate_storage_account_key( :param storage_account_name: The name of the storage account. :type storage_account_name: str :param parameters: The parameters to regenerate storage account key. - :type parameters: ~azure.keyvault.v7_0.models.StorageAccountRegenerteKeyParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.StorageAccountRegenerteKeyParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: StorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.StorageBundle + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('regenerate_storage_account_key') @@ -2158,10 +2147,10 @@ async def restore_key( :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. :type vault_base_url: str :param parameters: The parameters to restore the key. - :type parameters: ~azure.keyvault.v7_0.models.KeyRestoreParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyRestoreParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('restore_key') @@ -2192,10 +2181,10 @@ async def restore_secret( :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. :type vault_base_url: str :param parameters: The parameters to restore the secret. - :type parameters: ~azure.keyvault.v7_0.models.SecretRestoreParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SecretRestoreParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('restore_secret') @@ -2258,10 +2247,10 @@ async def set_certificate_contacts( :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. :type vault_base_url: str :param contacts: The contacts for the key vault certificate. - :type contacts: ~azure.keyvault.v7_1.models.Contacts + :type contacts: ~azure.keyvault.v2016_10_01.models.Contacts :keyword callable cls: A custom type or function that will be passed the direct response :return: Contacts, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.Contacts + :rtype: ~azure.keyvault.v2016_10_01.models.Contacts :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_certificate_contacts') @@ -2297,10 +2286,10 @@ async def set_certificate_issuer( :param issuer_name: The name of the issuer. :type issuer_name: str :param parameter: Certificate issuer set parameter. - :type parameter: ~azure.keyvault.v7_1.models.CertificateIssuerSetParameters + :type parameter: ~azure.keyvault.v2016_10_01.models.CertificateIssuerSetParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: IssuerBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.IssuerBundle + :rtype: ~azure.keyvault.v2016_10_01.models.IssuerBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_certificate_issuer') @@ -2337,10 +2326,10 @@ async def set_sas_definition( :param sas_definition_name: The name of the SAS definition. :type sas_definition_name: str :param parameters: The parameters to create a SAS definition. - :type parameters: ~azure.keyvault.v7_0.models.SasDefinitionCreateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SasDefinitionCreateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SasDefinitionBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SasDefinitionBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SasDefinitionBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_sas_definition') @@ -2375,10 +2364,10 @@ async def set_secret( :param secret_name: The name of the secret. :type secret_name: str :param parameters: The parameters for setting the secret. - :type parameters: ~azure.keyvault.v7_0.models.SecretSetParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SecretSetParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_secret') @@ -2409,10 +2398,10 @@ async def set_storage_account( :param storage_account_name: The name of the storage account. :type storage_account_name: str :param parameters: The parameters to create a storage account. - :type parameters: ~azure.keyvault.v7_0.models.StorageAccountCreateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.StorageAccountCreateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: StorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.StorageBundle + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('set_storage_account') @@ -2450,10 +2439,10 @@ async def sign( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for the signing operation. - :type parameters: ~azure.keyvault.v7_0.models.KeySignParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeySignParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('sign') @@ -2492,10 +2481,10 @@ async def unwrap_key( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for the key operation. - :type parameters: ~azure.keyvault.v7_0.models.KeyOperationsParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyOperationsParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('unwrap_key') @@ -2533,10 +2522,10 @@ async def update_certificate( :param certificate_version: The version of the certificate. :type certificate_version: str :param parameters: The parameters for certificate update. - :type parameters: ~azure.keyvault.v7_1.models.CertificateUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.CertificateUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateBundle + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_certificate') @@ -2572,10 +2561,10 @@ async def update_certificate_issuer( :param issuer_name: The name of the issuer. :type issuer_name: str :param parameter: Certificate issuer update parameter. - :type parameter: ~azure.keyvault.v7_1.models.CertificateIssuerUpdateParameters + :type parameter: ~azure.keyvault.v2016_10_01.models.CertificateIssuerUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: IssuerBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.IssuerBundle + :rtype: ~azure.keyvault.v2016_10_01.models.IssuerBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_certificate_issuer') @@ -2611,10 +2600,10 @@ async def update_certificate_operation( :param certificate_name: The name of the certificate. :type certificate_name: str :param certificate_operation: The certificate operation response. - :type certificate_operation: ~azure.keyvault.v7_1.models.CertificateOperationUpdateParameter + :type certificate_operation: ~azure.keyvault.v2016_10_01.models.CertificateOperationUpdateParameter :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificateOperation, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificateOperation + :rtype: ~azure.keyvault.v2016_10_01.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_certificate_operation') @@ -2650,10 +2639,10 @@ async def update_certificate_policy( :param certificate_name: The name of the certificate in the given vault. :type certificate_name: str :param certificate_policy: The policy for the certificate. - :type certificate_policy: ~azure.keyvault.v7_1.models.CertificatePolicy + :type certificate_policy: ~azure.keyvault.v2016_10_01.models.CertificatePolicy :keyword callable cls: A custom type or function that will be passed the direct response :return: CertificatePolicy, or the result of cls(response) - :rtype: ~azure.keyvault.v7_1.models.CertificatePolicy + :rtype: ~azure.keyvault.v2016_10_01.models.CertificatePolicy :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_certificate_policy') @@ -2693,10 +2682,10 @@ async def update_key( :param key_version: The version of the key to update. :type key_version: str :param parameters: The parameters of the key to update. - :type parameters: ~azure.keyvault.v7_0.models.KeyUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyBundle + :rtype: ~azure.keyvault.v2016_10_01.models.KeyBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_key') @@ -2731,10 +2720,10 @@ async def update_sas_definition( :param sas_definition_name: The name of the SAS definition. :type sas_definition_name: str :param parameters: The parameters to update a SAS definition. - :type parameters: ~azure.keyvault.v7_0.models.SasDefinitionUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SasDefinitionUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SasDefinitionBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SasDefinitionBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SasDefinitionBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_sas_definition') @@ -2772,10 +2761,10 @@ async def update_secret( :param secret_version: The version of the secret. :type secret_version: str :param parameters: The parameters for update secret operation. - :type parameters: ~azure.keyvault.v7_0.models.SecretUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.SecretUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.SecretBundle + :rtype: ~azure.keyvault.v2016_10_01.models.SecretBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_secret') @@ -2807,10 +2796,10 @@ async def update_storage_account( :param storage_account_name: The name of the storage account. :type storage_account_name: str :param parameters: The parameters to update a storage account. - :type parameters: ~azure.keyvault.v7_0.models.StorageAccountUpdateParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.StorageAccountUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: StorageBundle, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.StorageBundle + :rtype: ~azure.keyvault.v2016_10_01.models.StorageBundle :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_storage_account') @@ -2850,10 +2839,10 @@ async def verify( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for verify operations. - :type parameters: ~azure.keyvault.v7_0.models.KeyVerifyParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyVerifyParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyVerifyResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyVerifyResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyVerifyResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('verify') @@ -2894,10 +2883,10 @@ async def wrap_key( :param key_version: The version of the key. :type key_version: str :param parameters: The parameters for wrap operation. - :type parameters: ~azure.keyvault.v7_0.models.KeyOperationsParameters + :type parameters: ~azure.keyvault.v2016_10_01.models.KeyOperationsParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyOperationResult, or the result of cls(response) - :rtype: ~azure.keyvault.v7_0.models.KeyOperationResult + :rtype: ~azure.keyvault.v2016_10_01.models.KeyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('wrap_key') diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/models.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/models.py index d80a03e1dcdd4..78c01632767f8 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/models.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/models.py @@ -4,5 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v7_0.models import * -from .v7_1.models import * +from .v2016_10_01.models import * diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/_key_vault_client.py index d9db79ab8785b..051edbb7abedc 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/_key_vault_client.py @@ -23,7 +23,6 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. - :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/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/_metadata.json b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/_metadata.json index ec6b44c0477ed..ad1d554bd15e2 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/_metadata.json +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/_metadata.json @@ -7,7 +7,8 @@ "description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", "base_url": null, "custom_base_url": "\u0027{vaultBaseUrl}\u0027", - "azure_arm": false + "azure_arm": false, + "has_lro_operations": false }, "global_parameters": { "sync_method": { @@ -22,7 +23,8 @@ "credential": false, "credential_scopes": null, "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null }, "operation_groups": { }, diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/aio/_key_vault_client_async.py index 2d273c4e45f86..58ad4c64124ad 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -19,7 +19,6 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. - :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/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 53a7cb4a4642b..dc533ba34616b 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -50,6 +50,7 @@ async def create_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_key.metadata['url'] # type: ignore @@ -66,13 +67,12 @@ async def create_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -118,6 +118,7 @@ async def import_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_key.metadata['url'] # type: ignore @@ -134,13 +135,12 @@ async def import_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyImportParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -183,6 +183,7 @@ async def delete_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_key.metadata['url'] # type: ignore @@ -198,7 +199,7 @@ async def delete_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -249,6 +250,7 @@ async def update_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_key.metadata['url'] # type: ignore @@ -266,13 +268,12 @@ async def update_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -316,6 +317,7 @@ async def get_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_key.metadata['url'] # type: ignore @@ -332,7 +334,7 @@ async def get_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -379,11 +381,12 @@ def get_key_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -463,11 +466,12 @@ def get_keys( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -551,6 +555,7 @@ async def backup_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.backup_key.metadata['url'] # type: ignore @@ -566,7 +571,7 @@ async def backup_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -618,6 +623,7 @@ async def restore_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_key.metadata['url'] # type: ignore @@ -633,13 +639,12 @@ async def restore_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -693,6 +698,7 @@ async def encrypt( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.encrypt.metadata['url'] # type: ignore @@ -710,13 +716,12 @@ async def encrypt( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -768,6 +773,7 @@ async def decrypt( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.decrypt.metadata['url'] # type: ignore @@ -785,13 +791,12 @@ async def decrypt( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -840,6 +845,7 @@ async def sign( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.sign.metadata['url'] # type: ignore @@ -857,13 +863,12 @@ async def sign( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeySignParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -914,6 +919,7 @@ async def verify( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.verify.metadata['url'] # type: ignore @@ -931,13 +937,12 @@ async def verify( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyVerifyParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -989,6 +994,7 @@ async def wrap_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.wrap_key.metadata['url'] # type: ignore @@ -1006,13 +1012,12 @@ async def wrap_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1062,6 +1067,7 @@ async def unwrap_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.unwrap_key.metadata['url'] # type: ignore @@ -1079,13 +1085,12 @@ async def unwrap_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1130,11 +1135,12 @@ def get_deleted_keys( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1210,6 +1216,7 @@ async def get_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_deleted_key.metadata['url'] # type: ignore @@ -1225,7 +1232,7 @@ async def get_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1269,6 +1276,7 @@ async def purge_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.purge_deleted_key.metadata['url'] # type: ignore @@ -1284,6 +1292,7 @@ async def purge_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1325,6 +1334,7 @@ async def recover_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.recover_deleted_key.metadata['url'] # type: ignore @@ -1340,7 +1350,7 @@ async def recover_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1388,6 +1398,7 @@ async def set_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_secret.metadata['url'] # type: ignore @@ -1404,13 +1415,12 @@ async def set_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1451,6 +1461,7 @@ async def delete_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_secret.metadata['url'] # type: ignore @@ -1466,7 +1477,7 @@ async def delete_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1517,6 +1528,7 @@ async def update_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_secret.metadata['url'] # type: ignore @@ -1534,13 +1546,12 @@ async def update_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1584,6 +1595,7 @@ async def get_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_secret.metadata['url'] # type: ignore @@ -1600,7 +1612,7 @@ async def get_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1645,11 +1657,12 @@ def get_secrets( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1728,11 +1741,12 @@ def get_secret_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1810,11 +1824,12 @@ def get_deleted_secrets( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1889,6 +1904,7 @@ async def get_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_deleted_secret.metadata['url'] # type: ignore @@ -1904,7 +1920,7 @@ async def get_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1948,6 +1964,7 @@ async def purge_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.purge_deleted_secret.metadata['url'] # type: ignore @@ -1963,6 +1980,7 @@ async def purge_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2002,6 +2020,7 @@ async def recover_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.recover_deleted_secret.metadata['url'] # type: ignore @@ -2017,7 +2036,7 @@ async def recover_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2060,6 +2079,7 @@ async def backup_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.backup_secret.metadata['url'] # type: ignore @@ -2075,7 +2095,7 @@ async def backup_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2119,6 +2139,7 @@ async def restore_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_secret.metadata['url'] # type: ignore @@ -2134,13 +2155,12 @@ async def restore_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2182,11 +2202,12 @@ def get_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -2262,6 +2283,7 @@ async def delete_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_certificate.metadata['url'] # type: ignore @@ -2277,7 +2299,7 @@ async def delete_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2321,6 +2343,7 @@ async def set_certificate_contacts( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_contacts.metadata['url'] # type: ignore @@ -2336,13 +2359,12 @@ async def set_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(contacts, 'Contacts') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2380,6 +2402,7 @@ async def get_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate_contacts.metadata['url'] # type: ignore @@ -2394,7 +2417,7 @@ async def get_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2434,6 +2457,7 @@ async def delete_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_certificate_contacts.metadata['url'] # type: ignore @@ -2448,7 +2472,7 @@ async def delete_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2493,11 +2517,12 @@ def get_certificate_issuers( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -2576,6 +2601,7 @@ async def set_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_issuer.metadata['url'] # type: ignore @@ -2592,13 +2618,12 @@ async def set_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2643,6 +2668,7 @@ async def update_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_issuer.metadata['url'] # type: ignore @@ -2659,13 +2685,12 @@ async def update_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2707,6 +2732,7 @@ async def get_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate_issuer.metadata['url'] # type: ignore @@ -2722,7 +2748,7 @@ async def get_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2765,6 +2791,7 @@ async def delete_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_certificate_issuer.metadata['url'] # type: ignore @@ -2780,7 +2807,7 @@ async def delete_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2827,6 +2854,7 @@ async def create_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_certificate.metadata['url'] # type: ignore @@ -2843,13 +2871,12 @@ async def create_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2896,6 +2923,7 @@ async def import_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_certificate.metadata['url'] # type: ignore @@ -2912,13 +2940,12 @@ async def import_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateImportParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2963,11 +2990,12 @@ def get_certificate_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3044,6 +3072,7 @@ async def get_certificate_policy( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate_policy.metadata['url'] # type: ignore @@ -3059,7 +3088,7 @@ async def get_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3106,6 +3135,7 @@ async def update_certificate_policy( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_policy.metadata['url'] # type: ignore @@ -3122,13 +3152,12 @@ async def update_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_policy, 'CertificatePolicy') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3177,6 +3206,7 @@ async def update_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate.metadata['url'] # type: ignore @@ -3194,13 +3224,12 @@ async def update_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3244,6 +3273,7 @@ async def get_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate.metadata['url'] # type: ignore @@ -3260,7 +3290,7 @@ async def get_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3307,6 +3337,7 @@ async def update_certificate_operation( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_operation.metadata['url'] # type: ignore @@ -3323,13 +3354,12 @@ async def update_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_operation, 'CertificateOperationUpdateParameter') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3370,6 +3400,7 @@ async def get_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate_operation.metadata['url'] # type: ignore @@ -3385,7 +3416,7 @@ async def get_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3429,6 +3460,7 @@ async def delete_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_certificate_operation.metadata['url'] # type: ignore @@ -3444,7 +3476,7 @@ async def delete_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3492,6 +3524,7 @@ async def merge_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.merge_certificate.metadata['url'] # type: ignore @@ -3508,13 +3541,12 @@ async def merge_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateMergeParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3558,11 +3590,12 @@ def get_deleted_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3638,6 +3671,7 @@ async def get_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_deleted_certificate.metadata['url'] # type: ignore @@ -3653,7 +3687,7 @@ async def get_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3697,6 +3731,7 @@ async def purge_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.purge_deleted_certificate.metadata['url'] # type: ignore @@ -3712,6 +3747,7 @@ async def purge_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3753,6 +3789,7 @@ async def recover_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.recover_deleted_certificate.metadata['url'] # type: ignore @@ -3768,7 +3805,7 @@ async def recover_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3810,11 +3847,12 @@ def get_storage_accounts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3886,6 +3924,7 @@ async def delete_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_storage_account.metadata['url'] # type: ignore @@ -3901,7 +3940,7 @@ async def delete_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3942,6 +3981,7 @@ async def get_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_storage_account.metadata['url'] # type: ignore @@ -3957,7 +3997,7 @@ async def get_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4001,6 +4041,7 @@ async def set_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_storage_account.metadata['url'] # type: ignore @@ -4017,13 +4058,12 @@ async def set_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4066,6 +4106,7 @@ async def update_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_storage_account.metadata['url'] # type: ignore @@ -4082,13 +4123,12 @@ async def update_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4131,6 +4171,7 @@ async def regenerate_storage_account_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.regenerate_storage_account_key.metadata['url'] # type: ignore @@ -4147,13 +4188,12 @@ async def regenerate_storage_account_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountRegenerteKeyParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4196,11 +4236,12 @@ def get_sas_definitions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4278,6 +4319,7 @@ async def delete_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_sas_definition.metadata['url'] # type: ignore @@ -4294,7 +4336,7 @@ async def delete_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4338,6 +4380,7 @@ async def get_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_sas_definition.metadata['url'] # type: ignore @@ -4354,7 +4397,7 @@ async def get_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4402,6 +4445,7 @@ async def set_sas_definition( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_sas_definition.metadata['url'] # type: ignore @@ -4419,13 +4463,12 @@ async def set_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SasDefinitionCreateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4471,6 +4514,7 @@ async def update_sas_definition( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_sas_definition.metadata['url'] # type: ignore @@ -4488,13 +4532,12 @@ async def update_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SasDefinitionUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 3ea87e0dccb8d..927f739612a9a 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -55,6 +55,7 @@ def create_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_key.metadata['url'] # type: ignore @@ -71,13 +72,12 @@ def create_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -124,6 +124,7 @@ def import_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_key.metadata['url'] # type: ignore @@ -140,13 +141,12 @@ def import_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyImportParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -190,6 +190,7 @@ def delete_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_key.metadata['url'] # type: ignore @@ -205,7 +206,7 @@ def delete_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -257,6 +258,7 @@ def update_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_key.metadata['url'] # type: ignore @@ -274,13 +276,12 @@ def update_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -325,6 +326,7 @@ def get_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_key.metadata['url'] # type: ignore @@ -341,7 +343,7 @@ def get_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -389,11 +391,12 @@ def get_key_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -474,11 +477,12 @@ def get_keys( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -563,6 +567,7 @@ def backup_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.backup_key.metadata['url'] # type: ignore @@ -578,7 +583,7 @@ def backup_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -631,6 +636,7 @@ def restore_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_key.metadata['url'] # type: ignore @@ -646,13 +652,12 @@ def restore_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -707,6 +712,7 @@ def encrypt( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.encrypt.metadata['url'] # type: ignore @@ -724,13 +730,12 @@ def encrypt( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -783,6 +788,7 @@ def decrypt( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.decrypt.metadata['url'] # type: ignore @@ -800,13 +806,12 @@ def decrypt( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -856,6 +861,7 @@ def sign( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.sign.metadata['url'] # type: ignore @@ -873,13 +879,12 @@ def sign( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeySignParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -931,6 +936,7 @@ def verify( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.verify.metadata['url'] # type: ignore @@ -948,13 +954,12 @@ def verify( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyVerifyParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1007,6 +1012,7 @@ def wrap_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.wrap_key.metadata['url'] # type: ignore @@ -1024,13 +1030,12 @@ def wrap_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1081,6 +1086,7 @@ def unwrap_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.unwrap_key.metadata['url'] # type: ignore @@ -1098,13 +1104,12 @@ def unwrap_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1150,11 +1155,12 @@ def get_deleted_keys( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1231,6 +1237,7 @@ def get_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_deleted_key.metadata['url'] # type: ignore @@ -1246,7 +1253,7 @@ def get_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1291,6 +1298,7 @@ def purge_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.purge_deleted_key.metadata['url'] # type: ignore @@ -1306,6 +1314,7 @@ def purge_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1348,6 +1357,7 @@ def recover_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.recover_deleted_key.metadata['url'] # type: ignore @@ -1363,7 +1373,7 @@ def recover_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1412,6 +1422,7 @@ def set_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_secret.metadata['url'] # type: ignore @@ -1428,13 +1439,12 @@ def set_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1476,6 +1486,7 @@ def delete_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_secret.metadata['url'] # type: ignore @@ -1491,7 +1502,7 @@ def delete_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1543,6 +1554,7 @@ def update_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_secret.metadata['url'] # type: ignore @@ -1560,13 +1572,12 @@ def update_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1611,6 +1622,7 @@ def get_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_secret.metadata['url'] # type: ignore @@ -1627,7 +1639,7 @@ def get_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1673,11 +1685,12 @@ def get_secrets( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1757,11 +1770,12 @@ def get_secret_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1840,11 +1854,12 @@ def get_deleted_secrets( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1920,6 +1935,7 @@ def get_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_deleted_secret.metadata['url'] # type: ignore @@ -1935,7 +1951,7 @@ def get_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1980,6 +1996,7 @@ def purge_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.purge_deleted_secret.metadata['url'] # type: ignore @@ -1995,6 +2012,7 @@ def purge_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2035,6 +2053,7 @@ def recover_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.recover_deleted_secret.metadata['url'] # type: ignore @@ -2050,7 +2069,7 @@ def recover_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2094,6 +2113,7 @@ def backup_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.backup_secret.metadata['url'] # type: ignore @@ -2109,7 +2129,7 @@ def backup_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2154,6 +2174,7 @@ def restore_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_secret.metadata['url'] # type: ignore @@ -2169,13 +2190,12 @@ def restore_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2218,11 +2238,12 @@ def get_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -2299,6 +2320,7 @@ def delete_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_certificate.metadata['url'] # type: ignore @@ -2314,7 +2336,7 @@ def delete_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2359,6 +2381,7 @@ def set_certificate_contacts( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_contacts.metadata['url'] # type: ignore @@ -2374,13 +2397,12 @@ def set_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(contacts, 'Contacts') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2419,6 +2441,7 @@ def get_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate_contacts.metadata['url'] # type: ignore @@ -2433,7 +2456,7 @@ def get_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2474,6 +2497,7 @@ def delete_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_certificate_contacts.metadata['url'] # type: ignore @@ -2488,7 +2512,7 @@ def delete_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2534,11 +2558,12 @@ def get_certificate_issuers( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -2618,6 +2643,7 @@ def set_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_issuer.metadata['url'] # type: ignore @@ -2634,13 +2660,12 @@ def set_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2686,6 +2711,7 @@ def update_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_issuer.metadata['url'] # type: ignore @@ -2702,13 +2728,12 @@ def update_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2751,6 +2776,7 @@ def get_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate_issuer.metadata['url'] # type: ignore @@ -2766,7 +2792,7 @@ def get_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2810,6 +2836,7 @@ def delete_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_certificate_issuer.metadata['url'] # type: ignore @@ -2825,7 +2852,7 @@ def delete_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2873,6 +2900,7 @@ def create_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_certificate.metadata['url'] # type: ignore @@ -2889,13 +2917,12 @@ def create_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2943,6 +2970,7 @@ def import_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_certificate.metadata['url'] # type: ignore @@ -2959,13 +2987,12 @@ def import_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateImportParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3011,11 +3038,12 @@ def get_certificate_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3093,6 +3121,7 @@ def get_certificate_policy( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate_policy.metadata['url'] # type: ignore @@ -3108,7 +3137,7 @@ def get_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3156,6 +3185,7 @@ def update_certificate_policy( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_policy.metadata['url'] # type: ignore @@ -3172,13 +3202,12 @@ def update_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_policy, 'CertificatePolicy') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3228,6 +3257,7 @@ def update_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate.metadata['url'] # type: ignore @@ -3245,13 +3275,12 @@ def update_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3296,6 +3325,7 @@ def get_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate.metadata['url'] # type: ignore @@ -3312,7 +3342,7 @@ def get_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3360,6 +3390,7 @@ def update_certificate_operation( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_operation.metadata['url'] # type: ignore @@ -3376,13 +3407,12 @@ def update_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_operation, 'CertificateOperationUpdateParameter') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3424,6 +3454,7 @@ def get_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_certificate_operation.metadata['url'] # type: ignore @@ -3439,7 +3470,7 @@ def get_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3484,6 +3515,7 @@ def delete_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_certificate_operation.metadata['url'] # type: ignore @@ -3499,7 +3531,7 @@ def delete_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3548,6 +3580,7 @@ def merge_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.merge_certificate.metadata['url'] # type: ignore @@ -3564,13 +3597,12 @@ def merge_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateMergeParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3615,11 +3647,12 @@ def get_deleted_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3696,6 +3729,7 @@ def get_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_deleted_certificate.metadata['url'] # type: ignore @@ -3711,7 +3745,7 @@ def get_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3756,6 +3790,7 @@ def purge_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.purge_deleted_certificate.metadata['url'] # type: ignore @@ -3771,6 +3806,7 @@ def purge_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3813,6 +3849,7 @@ def recover_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.recover_deleted_certificate.metadata['url'] # type: ignore @@ -3828,7 +3865,7 @@ def recover_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3871,11 +3908,12 @@ def get_storage_accounts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3948,6 +3986,7 @@ def delete_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_storage_account.metadata['url'] # type: ignore @@ -3963,7 +4002,7 @@ def delete_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4005,6 +4044,7 @@ def get_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_storage_account.metadata['url'] # type: ignore @@ -4020,7 +4060,7 @@ def get_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4065,6 +4105,7 @@ def set_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_storage_account.metadata['url'] # type: ignore @@ -4081,13 +4122,12 @@ def set_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4131,6 +4171,7 @@ def update_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_storage_account.metadata['url'] # type: ignore @@ -4147,13 +4188,12 @@ def update_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4197,6 +4237,7 @@ def regenerate_storage_account_key( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.regenerate_storage_account_key.metadata['url'] # type: ignore @@ -4213,13 +4254,12 @@ def regenerate_storage_account_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountRegenerteKeyParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4263,11 +4303,12 @@ def get_sas_definitions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4346,6 +4387,7 @@ def delete_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.delete_sas_definition.metadata['url'] # type: ignore @@ -4362,7 +4404,7 @@ def delete_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4407,6 +4449,7 @@ def get_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_sas_definition.metadata['url'] # type: ignore @@ -4423,7 +4466,7 @@ def get_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4472,6 +4515,7 @@ def set_sas_definition( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_sas_definition.metadata['url'] # type: ignore @@ -4489,13 +4533,12 @@ def set_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SasDefinitionCreateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4542,6 +4585,7 @@ def update_sas_definition( error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_sas_definition.metadata['url'] # type: ignore @@ -4559,13 +4603,12 @@ def update_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SasDefinitionUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/_key_vault_client.py index d9db79ab8785b..051edbb7abedc 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/_key_vault_client.py @@ -23,7 +23,6 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. - :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/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/_metadata.json b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/_metadata.json index 32f572a8aad44..54d74c3501cef 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/_metadata.json +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/_metadata.json @@ -7,7 +7,8 @@ "description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", "base_url": null, "custom_base_url": "\u0027{vaultBaseUrl}\u0027", - "azure_arm": false + "azure_arm": false, + "has_lro_operations": false }, "global_parameters": { "sync_method": { @@ -22,7 +23,8 @@ "credential": false, "credential_scopes": null, "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null }, "operation_groups": { }, diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/aio/_key_vault_client_async.py index 2d273c4e45f86..58ad4c64124ad 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/aio/_key_vault_client_async.py @@ -19,7 +19,6 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. - :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/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 5897008f9769c..df7ed32b4a578 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -50,6 +50,7 @@ async def create_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_key.metadata['url'] # type: ignore @@ -66,13 +67,12 @@ async def create_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -118,6 +118,7 @@ async def import_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_key.metadata['url'] # type: ignore @@ -134,13 +135,12 @@ async def import_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyImportParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -183,6 +183,7 @@ async def delete_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_key.metadata['url'] # type: ignore @@ -198,7 +199,7 @@ async def delete_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -249,6 +250,7 @@ async def update_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_key.metadata['url'] # type: ignore @@ -266,13 +268,12 @@ async def update_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -317,6 +318,7 @@ async def get_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_key.metadata['url'] # type: ignore @@ -333,7 +335,7 @@ async def get_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -380,11 +382,12 @@ def get_key_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -464,11 +467,12 @@ def get_keys( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -552,6 +556,7 @@ async def backup_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.backup_key.metadata['url'] # type: ignore @@ -567,7 +572,7 @@ async def backup_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -619,6 +624,7 @@ async def restore_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_key.metadata['url'] # type: ignore @@ -634,13 +640,12 @@ async def restore_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -694,6 +699,7 @@ async def encrypt( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.encrypt.metadata['url'] # type: ignore @@ -711,13 +717,12 @@ async def encrypt( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -769,6 +774,7 @@ async def decrypt( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.decrypt.metadata['url'] # type: ignore @@ -786,13 +792,12 @@ async def decrypt( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -841,6 +846,7 @@ async def sign( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.sign.metadata['url'] # type: ignore @@ -858,13 +864,12 @@ async def sign( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeySignParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -915,6 +920,7 @@ async def verify( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.verify.metadata['url'] # type: ignore @@ -932,13 +938,12 @@ async def verify( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyVerifyParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -990,6 +995,7 @@ async def wrap_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.wrap_key.metadata['url'] # type: ignore @@ -1007,13 +1013,12 @@ async def wrap_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1063,6 +1068,7 @@ async def unwrap_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.unwrap_key.metadata['url'] # type: ignore @@ -1080,13 +1086,12 @@ async def unwrap_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1131,11 +1136,12 @@ def get_deleted_keys( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1211,6 +1217,7 @@ async def get_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_key.metadata['url'] # type: ignore @@ -1226,7 +1233,7 @@ async def get_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1270,6 +1277,7 @@ async def purge_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.purge_deleted_key.metadata['url'] # type: ignore @@ -1285,6 +1293,7 @@ async def purge_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1326,6 +1335,7 @@ async def recover_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_key.metadata['url'] # type: ignore @@ -1341,7 +1351,7 @@ async def recover_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1389,6 +1399,7 @@ async def set_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_secret.metadata['url'] # type: ignore @@ -1405,13 +1416,12 @@ async def set_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1452,6 +1462,7 @@ async def delete_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_secret.metadata['url'] # type: ignore @@ -1467,7 +1478,7 @@ async def delete_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1518,6 +1529,7 @@ async def update_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_secret.metadata['url'] # type: ignore @@ -1535,13 +1547,12 @@ async def update_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1586,6 +1597,7 @@ async def get_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_secret.metadata['url'] # type: ignore @@ -1602,7 +1614,7 @@ async def get_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1647,11 +1659,12 @@ def get_secrets( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1730,11 +1743,12 @@ def get_secret_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1812,11 +1826,12 @@ def get_deleted_secrets( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1891,6 +1906,7 @@ async def get_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_secret.metadata['url'] # type: ignore @@ -1906,7 +1922,7 @@ async def get_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1950,6 +1966,7 @@ async def purge_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.purge_deleted_secret.metadata['url'] # type: ignore @@ -1965,6 +1982,7 @@ async def purge_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2004,6 +2022,7 @@ async def recover_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_secret.metadata['url'] # type: ignore @@ -2019,7 +2038,7 @@ async def recover_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2062,6 +2081,7 @@ async def backup_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.backup_secret.metadata['url'] # type: ignore @@ -2077,7 +2097,7 @@ async def backup_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2121,6 +2141,7 @@ async def restore_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_secret.metadata['url'] # type: ignore @@ -2136,13 +2157,12 @@ async def restore_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2188,11 +2208,12 @@ def get_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -2270,6 +2291,7 @@ async def delete_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_certificate.metadata['url'] # type: ignore @@ -2285,7 +2307,7 @@ async def delete_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2329,6 +2351,7 @@ async def set_certificate_contacts( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_contacts.metadata['url'] # type: ignore @@ -2344,13 +2367,12 @@ async def set_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(contacts, 'Contacts') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2388,6 +2410,7 @@ async def get_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate_contacts.metadata['url'] # type: ignore @@ -2402,7 +2425,7 @@ async def get_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2442,6 +2465,7 @@ async def delete_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_certificate_contacts.metadata['url'] # type: ignore @@ -2456,7 +2480,7 @@ async def delete_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2501,11 +2525,12 @@ def get_certificate_issuers( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -2584,6 +2609,7 @@ async def set_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_issuer.metadata['url'] # type: ignore @@ -2600,13 +2626,12 @@ async def set_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2651,6 +2676,7 @@ async def update_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_issuer.metadata['url'] # type: ignore @@ -2667,13 +2693,12 @@ async def update_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2715,6 +2740,7 @@ async def get_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate_issuer.metadata['url'] # type: ignore @@ -2730,7 +2756,7 @@ async def get_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2773,6 +2799,7 @@ async def delete_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_certificate_issuer.metadata['url'] # type: ignore @@ -2788,7 +2815,7 @@ async def delete_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -2835,6 +2862,7 @@ async def create_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_certificate.metadata['url'] # type: ignore @@ -2851,13 +2879,12 @@ async def create_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2904,6 +2931,7 @@ async def import_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_certificate.metadata['url'] # type: ignore @@ -2920,13 +2948,12 @@ async def import_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateImportParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2971,11 +2998,12 @@ def get_certificate_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3052,6 +3080,7 @@ async def get_certificate_policy( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate_policy.metadata['url'] # type: ignore @@ -3067,7 +3096,7 @@ async def get_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3114,6 +3143,7 @@ async def update_certificate_policy( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_policy.metadata['url'] # type: ignore @@ -3130,13 +3160,12 @@ async def update_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_policy, 'CertificatePolicy') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3185,6 +3214,7 @@ async def update_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate.metadata['url'] # type: ignore @@ -3202,13 +3232,12 @@ async def update_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3253,6 +3282,7 @@ async def get_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate.metadata['url'] # type: ignore @@ -3269,7 +3299,7 @@ async def get_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3316,6 +3346,7 @@ async def update_certificate_operation( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_operation.metadata['url'] # type: ignore @@ -3332,13 +3363,12 @@ async def update_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_operation, 'CertificateOperationUpdateParameter') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3379,6 +3409,7 @@ async def get_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate_operation.metadata['url'] # type: ignore @@ -3394,7 +3425,7 @@ async def get_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3438,6 +3469,7 @@ async def delete_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_certificate_operation.metadata['url'] # type: ignore @@ -3453,7 +3485,7 @@ async def delete_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3501,6 +3533,7 @@ async def merge_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.merge_certificate.metadata['url'] # type: ignore @@ -3517,13 +3550,12 @@ async def merge_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateMergeParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3565,6 +3597,7 @@ async def backup_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.backup_certificate.metadata['url'] # type: ignore @@ -3580,7 +3613,7 @@ async def backup_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3624,6 +3657,7 @@ async def restore_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_certificate.metadata['url'] # type: ignore @@ -3639,13 +3673,12 @@ async def restore_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3693,11 +3726,12 @@ def get_deleted_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3775,6 +3809,7 @@ async def get_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_certificate.metadata['url'] # type: ignore @@ -3790,7 +3825,7 @@ async def get_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3834,6 +3869,7 @@ async def purge_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.purge_deleted_certificate.metadata['url'] # type: ignore @@ -3849,6 +3885,7 @@ async def purge_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3890,6 +3927,7 @@ async def recover_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_certificate.metadata['url'] # type: ignore @@ -3905,7 +3943,7 @@ async def recover_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -3947,11 +3985,12 @@ def get_storage_accounts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4027,11 +4066,12 @@ def get_deleted_storage_accounts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4106,6 +4146,7 @@ async def get_deleted_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_storage_account.metadata['url'] # type: ignore @@ -4121,7 +4162,7 @@ async def get_deleted_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4165,6 +4206,7 @@ async def purge_deleted_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.purge_deleted_storage_account.metadata['url'] # type: ignore @@ -4180,6 +4222,7 @@ async def purge_deleted_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4220,6 +4263,7 @@ async def recover_deleted_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_storage_account.metadata['url'] # type: ignore @@ -4235,7 +4279,7 @@ async def recover_deleted_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4278,6 +4322,7 @@ async def backup_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.backup_storage_account.metadata['url'] # type: ignore @@ -4293,7 +4338,7 @@ async def backup_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4337,6 +4382,7 @@ async def restore_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_storage_account.metadata['url'] # type: ignore @@ -4352,13 +4398,12 @@ async def restore_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4396,6 +4441,7 @@ async def delete_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_storage_account.metadata['url'] # type: ignore @@ -4411,7 +4457,7 @@ async def delete_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4452,6 +4498,7 @@ async def get_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_storage_account.metadata['url'] # type: ignore @@ -4467,7 +4514,7 @@ async def get_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4511,6 +4558,7 @@ async def set_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_storage_account.metadata['url'] # type: ignore @@ -4527,13 +4575,12 @@ async def set_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4576,6 +4623,7 @@ async def update_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_storage_account.metadata['url'] # type: ignore @@ -4592,13 +4640,12 @@ async def update_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4641,6 +4688,7 @@ async def regenerate_storage_account_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.regenerate_storage_account_key.metadata['url'] # type: ignore @@ -4657,13 +4705,12 @@ async def regenerate_storage_account_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountRegenerteKeyParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4706,11 +4753,12 @@ def get_sas_definitions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4791,11 +4839,12 @@ def get_deleted_sas_definitions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4875,6 +4924,7 @@ async def get_deleted_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_sas_definition.metadata['url'] # type: ignore @@ -4891,7 +4941,7 @@ async def get_deleted_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4938,6 +4988,7 @@ async def recover_deleted_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_sas_definition.metadata['url'] # type: ignore @@ -4954,7 +5005,7 @@ async def recover_deleted_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -4998,6 +5049,7 @@ async def delete_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_sas_definition.metadata['url'] # type: ignore @@ -5014,7 +5066,7 @@ async def delete_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -5058,6 +5110,7 @@ async def get_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_sas_definition.metadata['url'] # type: ignore @@ -5074,7 +5127,7 @@ async def get_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -5122,6 +5175,7 @@ async def set_sas_definition( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_sas_definition.metadata['url'] # type: ignore @@ -5139,13 +5193,12 @@ async def set_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SasDefinitionCreateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -5191,6 +5244,7 @@ async def update_sas_definition( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_sas_definition.metadata['url'] # type: ignore @@ -5208,13 +5262,12 @@ async def update_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SasDefinitionUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/operations/_key_vault_client_operations.py index 2c3025282c59c..d8e5863c0f6e0 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_0/operations/_key_vault_client_operations.py @@ -55,6 +55,7 @@ def create_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_key.metadata['url'] # type: ignore @@ -71,13 +72,12 @@ def create_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -124,6 +124,7 @@ def import_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_key.metadata['url'] # type: ignore @@ -140,13 +141,12 @@ def import_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyImportParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -190,6 +190,7 @@ def delete_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_key.metadata['url'] # type: ignore @@ -205,7 +206,7 @@ def delete_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -257,6 +258,7 @@ def update_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_key.metadata['url'] # type: ignore @@ -274,13 +276,12 @@ def update_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -326,6 +327,7 @@ def get_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_key.metadata['url'] # type: ignore @@ -342,7 +344,7 @@ def get_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -390,11 +392,12 @@ def get_key_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -475,11 +478,12 @@ def get_keys( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -564,6 +568,7 @@ def backup_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.backup_key.metadata['url'] # type: ignore @@ -579,7 +584,7 @@ def backup_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -632,6 +637,7 @@ def restore_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_key.metadata['url'] # type: ignore @@ -647,13 +653,12 @@ def restore_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -708,6 +713,7 @@ def encrypt( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.encrypt.metadata['url'] # type: ignore @@ -725,13 +731,12 @@ def encrypt( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -784,6 +789,7 @@ def decrypt( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.decrypt.metadata['url'] # type: ignore @@ -801,13 +807,12 @@ def decrypt( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -857,6 +862,7 @@ def sign( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.sign.metadata['url'] # type: ignore @@ -874,13 +880,12 @@ def sign( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeySignParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -932,6 +937,7 @@ def verify( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.verify.metadata['url'] # type: ignore @@ -949,13 +955,12 @@ def verify( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyVerifyParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1008,6 +1013,7 @@ def wrap_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.wrap_key.metadata['url'] # type: ignore @@ -1025,13 +1031,12 @@ def wrap_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1082,6 +1087,7 @@ def unwrap_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.unwrap_key.metadata['url'] # type: ignore @@ -1099,13 +1105,12 @@ def unwrap_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'KeyOperationsParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1151,11 +1156,12 @@ def get_deleted_keys( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1232,6 +1238,7 @@ def get_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_key.metadata['url'] # type: ignore @@ -1247,7 +1254,7 @@ def get_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1292,6 +1299,7 @@ def purge_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.purge_deleted_key.metadata['url'] # type: ignore @@ -1307,6 +1315,7 @@ def purge_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1349,6 +1358,7 @@ def recover_deleted_key( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_key.metadata['url'] # type: ignore @@ -1364,7 +1374,7 @@ def recover_deleted_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1413,6 +1423,7 @@ def set_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_secret.metadata['url'] # type: ignore @@ -1429,13 +1440,12 @@ def set_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1477,6 +1487,7 @@ def delete_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_secret.metadata['url'] # type: ignore @@ -1492,7 +1503,7 @@ def delete_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1544,6 +1555,7 @@ def update_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_secret.metadata['url'] # type: ignore @@ -1561,13 +1573,12 @@ def update_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1613,6 +1624,7 @@ def get_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_secret.metadata['url'] # type: ignore @@ -1629,7 +1641,7 @@ def get_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1675,11 +1687,12 @@ def get_secrets( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1759,11 +1772,12 @@ def get_secret_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1842,11 +1856,12 @@ def get_deleted_secrets( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1922,6 +1937,7 @@ def get_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_secret.metadata['url'] # type: ignore @@ -1937,7 +1953,7 @@ def get_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1982,6 +1998,7 @@ def purge_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.purge_deleted_secret.metadata['url'] # type: ignore @@ -1997,6 +2014,7 @@ def purge_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2037,6 +2055,7 @@ def recover_deleted_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_secret.metadata['url'] # type: ignore @@ -2052,7 +2071,7 @@ def recover_deleted_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2096,6 +2115,7 @@ def backup_secret( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.backup_secret.metadata['url'] # type: ignore @@ -2111,7 +2131,7 @@ def backup_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2156,6 +2176,7 @@ def restore_secret( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_secret.metadata['url'] # type: ignore @@ -2171,13 +2192,12 @@ def restore_secret( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SecretRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2224,11 +2244,12 @@ def get_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -2307,6 +2328,7 @@ def delete_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_certificate.metadata['url'] # type: ignore @@ -2322,7 +2344,7 @@ def delete_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2367,6 +2389,7 @@ def set_certificate_contacts( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_contacts.metadata['url'] # type: ignore @@ -2382,13 +2405,12 @@ def set_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(contacts, 'Contacts') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2427,6 +2449,7 @@ def get_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate_contacts.metadata['url'] # type: ignore @@ -2441,7 +2464,7 @@ def get_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2482,6 +2505,7 @@ def delete_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_certificate_contacts.metadata['url'] # type: ignore @@ -2496,7 +2520,7 @@ def delete_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2542,11 +2566,12 @@ def get_certificate_issuers( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -2626,6 +2651,7 @@ def set_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_issuer.metadata['url'] # type: ignore @@ -2642,13 +2668,12 @@ def set_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2694,6 +2719,7 @@ def update_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_issuer.metadata['url'] # type: ignore @@ -2710,13 +2736,12 @@ def update_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2759,6 +2784,7 @@ def get_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate_issuer.metadata['url'] # type: ignore @@ -2774,7 +2800,7 @@ def get_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2818,6 +2844,7 @@ def delete_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_certificate_issuer.metadata['url'] # type: ignore @@ -2833,7 +2860,7 @@ def delete_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -2881,6 +2908,7 @@ def create_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_certificate.metadata['url'] # type: ignore @@ -2897,13 +2925,12 @@ def create_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -2951,6 +2978,7 @@ def import_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_certificate.metadata['url'] # type: ignore @@ -2967,13 +2995,12 @@ def import_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateImportParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3019,11 +3046,12 @@ def get_certificate_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3101,6 +3129,7 @@ def get_certificate_policy( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate_policy.metadata['url'] # type: ignore @@ -3116,7 +3145,7 @@ def get_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3164,6 +3193,7 @@ def update_certificate_policy( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_policy.metadata['url'] # type: ignore @@ -3180,13 +3210,12 @@ def update_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_policy, 'CertificatePolicy') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3236,6 +3265,7 @@ def update_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate.metadata['url'] # type: ignore @@ -3253,13 +3283,12 @@ def update_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3305,6 +3334,7 @@ def get_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate.metadata['url'] # type: ignore @@ -3321,7 +3351,7 @@ def get_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3369,6 +3399,7 @@ def update_certificate_operation( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_operation.metadata['url'] # type: ignore @@ -3385,13 +3416,12 @@ def update_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_operation, 'CertificateOperationUpdateParameter') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3433,6 +3463,7 @@ def get_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_certificate_operation.metadata['url'] # type: ignore @@ -3448,7 +3479,7 @@ def get_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3493,6 +3524,7 @@ def delete_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_certificate_operation.metadata['url'] # type: ignore @@ -3508,7 +3540,7 @@ def delete_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3557,6 +3589,7 @@ def merge_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.merge_certificate.metadata['url'] # type: ignore @@ -3573,13 +3606,12 @@ def merge_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateMergeParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3622,6 +3654,7 @@ def backup_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.backup_certificate.metadata['url'] # type: ignore @@ -3637,7 +3670,7 @@ def backup_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3682,6 +3715,7 @@ def restore_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_certificate.metadata['url'] # type: ignore @@ -3697,13 +3731,12 @@ def restore_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -3752,11 +3785,12 @@ def get_deleted_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -3835,6 +3869,7 @@ def get_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_certificate.metadata['url'] # type: ignore @@ -3850,7 +3885,7 @@ def get_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3895,6 +3930,7 @@ def purge_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.purge_deleted_certificate.metadata['url'] # type: ignore @@ -3910,6 +3946,7 @@ def purge_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -3952,6 +3989,7 @@ def recover_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_certificate.metadata['url'] # type: ignore @@ -3967,7 +4005,7 @@ def recover_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4010,11 +4048,12 @@ def get_storage_accounts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4091,11 +4130,12 @@ def get_deleted_storage_accounts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4171,6 +4211,7 @@ def get_deleted_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_storage_account.metadata['url'] # type: ignore @@ -4186,7 +4227,7 @@ def get_deleted_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4231,6 +4272,7 @@ def purge_deleted_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.purge_deleted_storage_account.metadata['url'] # type: ignore @@ -4246,6 +4288,7 @@ def purge_deleted_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4287,6 +4330,7 @@ def recover_deleted_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_storage_account.metadata['url'] # type: ignore @@ -4302,7 +4346,7 @@ def recover_deleted_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4346,6 +4390,7 @@ def backup_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.backup_storage_account.metadata['url'] # type: ignore @@ -4361,7 +4406,7 @@ def backup_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4406,6 +4451,7 @@ def restore_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_storage_account.metadata['url'] # type: ignore @@ -4421,13 +4467,12 @@ def restore_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4466,6 +4511,7 @@ def delete_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_storage_account.metadata['url'] # type: ignore @@ -4481,7 +4527,7 @@ def delete_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4523,6 +4569,7 @@ def get_storage_account( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_storage_account.metadata['url'] # type: ignore @@ -4538,7 +4585,7 @@ def get_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -4583,6 +4630,7 @@ def set_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_storage_account.metadata['url'] # type: ignore @@ -4599,13 +4647,12 @@ def set_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4649,6 +4696,7 @@ def update_storage_account( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_storage_account.metadata['url'] # type: ignore @@ -4665,13 +4713,12 @@ def update_storage_account( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4715,6 +4762,7 @@ def regenerate_storage_account_key( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.regenerate_storage_account_key.metadata['url'] # type: ignore @@ -4731,13 +4779,12 @@ def regenerate_storage_account_key( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'StorageAccountRegenerteKeyParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -4781,11 +4828,12 @@ def get_sas_definitions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4867,11 +4915,12 @@ def get_deleted_sas_definitions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -4952,6 +5001,7 @@ def get_deleted_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_deleted_sas_definition.metadata['url'] # type: ignore @@ -4968,7 +5018,7 @@ def get_deleted_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -5016,6 +5066,7 @@ def recover_deleted_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.recover_deleted_sas_definition.metadata['url'] # type: ignore @@ -5032,7 +5083,7 @@ def recover_deleted_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -5077,6 +5128,7 @@ def delete_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.delete_sas_definition.metadata['url'] # type: ignore @@ -5093,7 +5145,7 @@ def delete_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -5138,6 +5190,7 @@ def get_sas_definition( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" + accept = "application/json" # Construct URL url = self.get_sas_definition.metadata['url'] # type: ignore @@ -5154,7 +5207,7 @@ def get_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -5203,6 +5256,7 @@ def set_sas_definition( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_sas_definition.metadata['url'] # type: ignore @@ -5220,13 +5274,12 @@ def set_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SasDefinitionCreateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -5273,6 +5326,7 @@ def update_sas_definition( error_map.update(kwargs.pop('error_map', {})) api_version = "7.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_sas_definition.metadata['url'] # type: ignore @@ -5290,13 +5344,12 @@ def update_sas_definition( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'SasDefinitionUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/_key_vault_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/_key_vault_client.py index d9db79ab8785b..051edbb7abedc 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/_key_vault_client.py @@ -23,7 +23,6 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. - :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/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/_metadata.json b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/_metadata.json index de42c75075ca6..864eaf7699f9d 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/_metadata.json +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/_metadata.json @@ -7,7 +7,8 @@ "description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", "base_url": null, "custom_base_url": "\u0027{vaultBaseUrl}\u0027", - "azure_arm": false + "azure_arm": false, + "has_lro_operations": false }, "global_parameters": { "sync_method": { @@ -22,7 +23,8 @@ "credential": false, "credential_scopes": null, "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null }, "operation_groups": { }, diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/aio/_key_vault_client_async.py index 2d273c4e45f86..58ad4c64124ad 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/aio/_key_vault_client_async.py @@ -19,7 +19,6 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. - :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/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/aio/operations_async/_key_vault_client_operations_async.py index b3fb92dd9cf43..55d0ac62dd190 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/aio/operations_async/_key_vault_client_operations_async.py @@ -49,11 +49,12 @@ def get_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -131,6 +132,7 @@ async def delete_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.delete_certificate.metadata['url'] # type: ignore @@ -146,7 +148,7 @@ async def delete_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -190,6 +192,7 @@ async def set_certificate_contacts( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_contacts.metadata['url'] # type: ignore @@ -205,13 +208,12 @@ async def set_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(contacts, 'Contacts') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -249,6 +251,7 @@ async def get_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate_contacts.metadata['url'] # type: ignore @@ -263,7 +266,7 @@ async def get_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -303,6 +306,7 @@ async def delete_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.delete_certificate_contacts.metadata['url'] # type: ignore @@ -317,7 +321,7 @@ async def delete_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -362,11 +366,12 @@ def get_certificate_issuers( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -445,6 +450,7 @@ async def set_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_issuer.metadata['url'] # type: ignore @@ -461,13 +467,12 @@ async def set_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -512,6 +517,7 @@ async def update_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_issuer.metadata['url'] # type: ignore @@ -528,13 +534,12 @@ async def update_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -576,6 +581,7 @@ async def get_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate_issuer.metadata['url'] # type: ignore @@ -591,7 +597,7 @@ async def get_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -634,6 +640,7 @@ async def delete_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.delete_certificate_issuer.metadata['url'] # type: ignore @@ -649,7 +656,7 @@ async def delete_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -696,6 +703,7 @@ async def create_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_certificate.metadata['url'] # type: ignore @@ -712,13 +720,12 @@ async def create_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -765,6 +772,7 @@ async def import_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_certificate.metadata['url'] # type: ignore @@ -781,13 +789,12 @@ async def import_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateImportParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -832,11 +839,12 @@ def get_certificate_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -913,6 +921,7 @@ async def get_certificate_policy( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate_policy.metadata['url'] # type: ignore @@ -928,7 +937,7 @@ async def get_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -975,6 +984,7 @@ async def update_certificate_policy( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_policy.metadata['url'] # type: ignore @@ -991,13 +1001,12 @@ async def update_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_policy, 'CertificatePolicy') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1046,6 +1055,7 @@ async def update_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate.metadata['url'] # type: ignore @@ -1063,13 +1073,12 @@ async def update_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1114,6 +1123,7 @@ async def get_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate.metadata['url'] # type: ignore @@ -1130,7 +1140,7 @@ async def get_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1177,6 +1187,7 @@ async def update_certificate_operation( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_operation.metadata['url'] # type: ignore @@ -1193,13 +1204,12 @@ async def update_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_operation, 'CertificateOperationUpdateParameter') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1240,6 +1250,7 @@ async def get_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate_operation.metadata['url'] # type: ignore @@ -1255,7 +1266,7 @@ async def get_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1299,6 +1310,7 @@ async def delete_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.delete_certificate_operation.metadata['url'] # type: ignore @@ -1314,7 +1326,7 @@ async def delete_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1362,6 +1374,7 @@ async def merge_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.merge_certificate.metadata['url'] # type: ignore @@ -1378,13 +1391,12 @@ async def merge_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateMergeParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1426,6 +1438,7 @@ async def backup_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.backup_certificate.metadata['url'] # type: ignore @@ -1441,7 +1454,7 @@ async def backup_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1485,6 +1498,7 @@ async def restore_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_certificate.metadata['url'] # type: ignore @@ -1500,13 +1514,12 @@ async def restore_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1554,11 +1567,12 @@ def get_deleted_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1636,6 +1650,7 @@ async def get_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_deleted_certificate.metadata['url'] # type: ignore @@ -1651,7 +1666,7 @@ async def get_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1695,6 +1710,7 @@ async def purge_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.purge_deleted_certificate.metadata['url'] # type: ignore @@ -1710,6 +1726,7 @@ async def purge_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1751,6 +1768,7 @@ async def recover_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.recover_deleted_certificate.metadata['url'] # type: ignore @@ -1766,7 +1784,7 @@ async def recover_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/operations/_key_vault_client_operations.py index e6aef045f2a43..401862212bb45 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_1/operations/_key_vault_client_operations.py @@ -54,11 +54,12 @@ def get_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -137,6 +138,7 @@ def delete_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.delete_certificate.metadata['url'] # type: ignore @@ -152,7 +154,7 @@ def delete_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -197,6 +199,7 @@ def set_certificate_contacts( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_contacts.metadata['url'] # type: ignore @@ -212,13 +215,12 @@ def set_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(contacts, 'Contacts') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -257,6 +259,7 @@ def get_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate_contacts.metadata['url'] # type: ignore @@ -271,7 +274,7 @@ def get_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -312,6 +315,7 @@ def delete_certificate_contacts( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.delete_certificate_contacts.metadata['url'] # type: ignore @@ -326,7 +330,7 @@ def delete_certificate_contacts( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -372,11 +376,12 @@ def get_certificate_issuers( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -456,6 +461,7 @@ def set_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.set_certificate_issuer.metadata['url'] # type: ignore @@ -472,13 +478,12 @@ def set_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerSetParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -524,6 +529,7 @@ def update_certificate_issuer( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_issuer.metadata['url'] # type: ignore @@ -540,13 +546,12 @@ def update_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameter, 'CertificateIssuerUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -589,6 +594,7 @@ def get_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate_issuer.metadata['url'] # type: ignore @@ -604,7 +610,7 @@ def get_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -648,6 +654,7 @@ def delete_certificate_issuer( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.delete_certificate_issuer.metadata['url'] # type: ignore @@ -663,7 +670,7 @@ def delete_certificate_issuer( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -711,6 +718,7 @@ def create_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_certificate.metadata['url'] # type: ignore @@ -727,13 +735,12 @@ def create_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateCreateParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -781,6 +788,7 @@ def import_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.import_certificate.metadata['url'] # type: ignore @@ -797,13 +805,12 @@ def import_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateImportParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -849,11 +856,12 @@ def get_certificate_versions( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -931,6 +939,7 @@ def get_certificate_policy( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate_policy.metadata['url'] # type: ignore @@ -946,7 +955,7 @@ def get_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -994,6 +1003,7 @@ def update_certificate_policy( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_policy.metadata['url'] # type: ignore @@ -1010,13 +1020,12 @@ def update_certificate_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_policy, 'CertificatePolicy') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1066,6 +1075,7 @@ def update_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate.metadata['url'] # type: ignore @@ -1083,13 +1093,12 @@ def update_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1135,6 +1144,7 @@ def get_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate.metadata['url'] # type: ignore @@ -1151,7 +1161,7 @@ def get_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1199,6 +1209,7 @@ def update_certificate_operation( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_certificate_operation.metadata['url'] # type: ignore @@ -1215,13 +1226,12 @@ def update_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(certificate_operation, 'CertificateOperationUpdateParameter') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1263,6 +1273,7 @@ def get_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_certificate_operation.metadata['url'] # type: ignore @@ -1278,7 +1289,7 @@ def get_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1323,6 +1334,7 @@ def delete_certificate_operation( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.delete_certificate_operation.metadata['url'] # type: ignore @@ -1338,7 +1350,7 @@ def delete_certificate_operation( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1387,6 +1399,7 @@ def merge_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.merge_certificate.metadata['url'] # type: ignore @@ -1403,13 +1416,12 @@ def merge_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateMergeParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1452,6 +1464,7 @@ def backup_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.backup_certificate.metadata['url'] # type: ignore @@ -1467,7 +1480,7 @@ def backup_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1512,6 +1525,7 @@ def restore_certificate( error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.restore_certificate.metadata['url'] # type: ignore @@ -1527,13 +1541,12 @@ def restore_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'CertificateRestoreParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1582,11 +1595,12 @@ def get_deleted_certificates( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -1665,6 +1679,7 @@ def get_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.get_deleted_certificate.metadata['url'] # type: ignore @@ -1680,7 +1695,7 @@ def get_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1725,6 +1740,7 @@ def purge_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.purge_deleted_certificate.metadata['url'] # type: ignore @@ -1740,6 +1756,7 @@ def purge_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1782,6 +1799,7 @@ def recover_deleted_certificate( error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) api_version = "7.1" + accept = "application/json" # Construct URL url = self.recover_deleted_certificate.metadata['url'] # type: ignore @@ -1797,7 +1815,7 @@ def recover_deleted_certificate( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py index 5cbf94f9a79fd..a73c8e359ef4a 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py @@ -450,21 +450,18 @@ def __repr__(self): def _from_certificate_operation_bundle(cls, certificate_operation_bundle): # type: (models.CertificateOperation) -> CertificateOperation """Construct a CertificateOperation from an autorest-generated CertificateOperation""" + + issuer_parameters = certificate_operation_bundle.issuer_parameters return cls( cert_operation_id=certificate_operation_bundle.id, - issuer_name=(certificate_operation_bundle.issuer_parameters.name - if certificate_operation_bundle.issuer_parameters - else None), + issuer_name=issuer_parameters.name, certificate_type=( certificate_operation_bundle.issuer_parameters.certificate_type if certificate_operation_bundle.issuer_parameters else None ), - certificate_transparency=( - certificate_operation_bundle.issuer_parameters.certificate_transparency - if certificate_operation_bundle.issuer_parameters - else None - ), + # 2016-10-01 IssuerParameters doesn't have certificate_transparency + certificate_transparency=getattr(issuer_parameters, "certificate_transparency", None), csr=certificate_operation_bundle.csr, cancellation_requested=certificate_operation_bundle.cancellation_requested, status=certificate_operation_bundle.status, @@ -667,7 +664,7 @@ def _to_certificate_policy_bundle(self): issuer_parameters = models.IssuerParameters( name=self.issuer_name, certificate_type=self.certificate_type, - certificate_transparency=self.certificate_transparency, + certificate_transparency=self.certificate_transparency, # 2016-10-01 model will ignore this ) else: issuer_parameters = None @@ -775,27 +772,23 @@ def _from_certificate_policy_bundle(cls, certificate_policy_bundle): else: key_usage = None key_properties = certificate_policy_bundle.key_properties + curve_name = getattr(key_properties, "curve", None) # missing from 2016-10-01 KeyProperties + if curve_name: + curve_name = KeyCurveName(curve_name) + + issuer_parameters = certificate_policy_bundle.issuer_parameters return cls( - issuer_name=(certificate_policy_bundle.issuer_parameters.name - if certificate_policy_bundle.issuer_parameters else None - ), + issuer_name=issuer_parameters.name, subject=(x509_certificate_properties.subject if x509_certificate_properties else None), - certificate_type=( - certificate_policy_bundle.issuer_parameters.certificate_type - if certificate_policy_bundle.issuer_parameters - else None - ), - certificate_transparency=( - certificate_policy_bundle.issuer_parameters.certificate_transparency - if certificate_policy_bundle.issuer_parameters - else None - ), + certificate_type=issuer_parameters.certificate_type, + # 2016-10-01 IssuerParameters doesn't have certificate_transparency + certificate_transparency=getattr(issuer_parameters, "certificate_transparency", None), lifetime_actions=lifetime_actions, exportable=key_properties.exportable if key_properties else None, key_type=KeyType(key_properties.key_type) if key_properties and key_properties.key_type else None, key_size=key_properties.key_size if key_properties else None, reuse_key=key_properties.reuse_key if key_properties else None, - key_curve_name=KeyCurveName(key_properties.curve) if key_properties and key_properties.curve else None, + key_curve_name=curve_name, enhanced_key_usage=x509_certificate_properties.ekus if x509_certificate_properties else None, key_usage=key_usage, content_type=( diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_client_base.py index 2c7939e577efa..c7a32bc79c3b0 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_client_base.py @@ -39,7 +39,7 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: self._client = client return - api_version = kwargs.pop("api_version", DEFAULT_VERSION) + self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) pipeline = kwargs.pop("pipeline", None) transport = kwargs.pop("transport", None) @@ -58,7 +58,7 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: try: self._client = _KeyVaultClient( - api_version=api_version, + api_version=self.api_version, pipeline=pipeline, transport=transport, authentication_policy=AsyncChallengeAuthPolicy(credential), @@ -66,10 +66,10 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: http_logging_policy=http_logging_policy, **kwargs ) - self._models = _KeyVaultClient.models(api_version=api_version) + self._models = _KeyVaultClient.models(api_version=self.api_version) except NotImplementedError: raise NotImplementedError( - "This package doesn't support API version '{}'. ".format(api_version) + "This package doesn't support API version '{}'. ".format(self.api_version) + "Supported versions: {}".format(", ".join(v.value for v in ApiVersion)) ) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/client_base.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/client_base.py index 15cb68d524e31..65e4ef087d4bb 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/client_base.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/client_base.py @@ -48,7 +48,7 @@ def __init__(self, vault_url, credential, **kwargs): self._client = client return - api_version = kwargs.pop("api_version", DEFAULT_VERSION) + self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) pipeline = kwargs.pop("pipeline", None) transport = kwargs.pop("transport", RequestsTransport(**kwargs)) @@ -62,7 +62,7 @@ def __init__(self, vault_url, credential, **kwargs): ) try: self._client = _KeyVaultClient( - api_version=api_version, + api_version=self.api_version, pipeline=pipeline, transport=transport, authentication_policy=ChallengeAuthPolicy(credential), @@ -70,10 +70,10 @@ def __init__(self, vault_url, credential, **kwargs): http_logging_policy=http_logging_policy, **kwargs ) - self._models = _KeyVaultClient.models(api_version=api_version) + self._models = _KeyVaultClient.models(api_version=self.api_version) except NotImplementedError: raise NotImplementedError( - "This package doesn't support API version '{}'. ".format(api_version) + "This package doesn't support API version '{}'. ".format(self.api_version) + "Supported versions: {}".format(", ".join(v.value for v in ApiVersion)) ) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py index 62c1534810ed3..68a768add0727 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py @@ -4,12 +4,13 @@ # ------------------------------------ # pylint:disable=too-many-lines,too-many-public-methods import base64 -from typing import Any, AsyncIterable, Optional, Iterable, List, Dict, Union +from typing import Any, Optional, Iterable, List, Dict, Union from functools import partial from azure.core.polling import async_poller from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.async_paging import AsyncItemPaged from .. import ( KeyVaultCertificate, @@ -504,7 +505,7 @@ async def restore_certificate_backup(self, backup: bytes, **kwargs: "Any") -> Ke return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @distributed_trace - def list_deleted_certificates(self, **kwargs: "Any") -> AsyncIterable[DeletedCertificate]: + def list_deleted_certificates(self, **kwargs: "Any") -> AsyncItemPaged[DeletedCertificate]: """Lists the currently-recoverable deleted certificates. Possible only if vault is soft-delete enabled. Requires certificates/get/list permission. Retrieves the certificates in the current vault which @@ -512,7 +513,7 @@ def list_deleted_certificates(self, **kwargs: "Any") -> AsyncIterable[DeletedCer deletion-specific information. :keyword bool include_pending: Specifies whether to include certificates which are - not completely deleted. + not completely deleted. Only available for API versions v7.0 and up :return: An iterator like instance of DeletedCertificate :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.DeletedCertificate] @@ -528,6 +529,11 @@ def list_deleted_certificates(self, **kwargs: "Any") -> AsyncIterable[DeletedCer """ max_page_size = kwargs.pop("max_page_size", None) + if self.api_version == "2016-10-01" and kwargs.get("include_pending"): + raise NotImplementedError( + "The 'include_pending' parameter to `list_deleted_certificates` " + "is only available for API versions v7.0 and up" + ) return self._client.get_deleted_certificates( vault_base_url=self._vault_url, maxresults=max_page_size, @@ -536,13 +542,13 @@ def list_deleted_certificates(self, **kwargs: "Any") -> AsyncIterable[DeletedCer ) @distributed_trace - def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncIterable[CertificateProperties]: + def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncItemPaged[CertificateProperties]: """List identifiers and properties of all certificates in the vault. Requires certificates/list permission. :keyword bool include_pending: Specifies whether to include certificates which are not - completely provisioned. + completely provisioned. Only available for API versions v7.0 and up :returns: An iterator like instance of CertificateProperties :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.CertificateProperties] @@ -558,6 +564,11 @@ def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncIterable[Cert """ max_page_size = kwargs.pop("max_page_size", None) + if self.api_version == "2016-10-01" and kwargs.get("include_pending"): + raise NotImplementedError( + "The 'include_pending' parameter to `list_properties_of_certificates` " + "is only available for API versions v7.0 and up" + ) return self._client.get_certificates( vault_base_url=self._vault_url, maxresults=max_page_size, @@ -568,7 +579,7 @@ def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncIterable[Cert @distributed_trace def list_properties_of_certificate_versions( self, certificate_name: str, **kwargs: "Any" - ) -> AsyncIterable[CertificateProperties]: + ) -> AsyncItemPaged[CertificateProperties]: """List the identifiers and properties of a certificate's versions. Requires certificates/list permission. @@ -965,7 +976,7 @@ async def delete_issuer(self, issuer_name: str, **kwargs: "Any") -> CertificateI return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle) @distributed_trace - def list_properties_of_issuers(self, **kwargs: "Any") -> AsyncIterable[IssuerProperties]: + def list_properties_of_issuers(self, **kwargs: "Any") -> AsyncItemPaged[IssuerProperties]: """Lists properties of the certificate issuers for the key vault. Requires the certificates/manageissuers/getissuers permission. diff --git a/sdk/keyvault/azure-keyvault-certificates/samples/README.md b/sdk/keyvault/azure-keyvault-certificates/samples/README.md index b9176098e14be..3b984246177d4 100644 --- a/sdk/keyvault/azure-keyvault-certificates/samples/README.md +++ b/sdk/keyvault/azure-keyvault-certificates/samples/README.md @@ -24,7 +24,7 @@ recover certificates [backup_operations_async_sample]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-certificates/samples/backup_restore_operations_async.py [hello_world_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/hello_world.py [hello_world_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/hello_world_async.py -[keyvault_docs]: https://docs.microsoft.com/en-us/azure/key-vault/ +[keyvault_docs]: https://docs.microsoft.com/azure/key-vault/ [list_operations_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/list_operations.py [list_operations_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/list_operations_async.py [recover_purge_operations_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-certificates/samples/recover_purge_operations.py diff --git a/sdk/keyvault/azure-keyvault-certificates/samples/list_operations_async.py b/sdk/keyvault/azure-keyvault-certificates/samples/list_operations_async.py index 75932b9c96050..645af92821ee8 100644 --- a/sdk/keyvault/azure-keyvault-certificates/samples/list_operations_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/samples/list_operations_async.py @@ -68,10 +68,9 @@ async def run_sample(): tags = {"a": "b"} - updated_bank_certificate_poller = await client.create_certificate( + bank_certificate = await client.create_certificate( certificate_name=bank_cert_name, policy=CertificatePolicy.get_default(), tags=tags ) - bank_certificate = await updated_bank_certificate_poller print( "Certificate with name '{0}' was created again with tags '{1}'".format( bank_certificate.name, bank_certificate.properties.tags diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_2016_10_01_models.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_2016_10_01_models.yaml new file mode 100644 index 0000000000000..5ea7cfe0fc5c2 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_2016_10_01_models.yaml @@ -0,0 +1,395 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://vaultname.vault.azure.net/certificates/certb81a116d/create?api-version=2016-10-01 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 14 Aug 2020 21:57:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: '{"policy": {"x509_props": {"subject": "CN=DefaultPolicy", "sans": {}}, + "issuer": {"name": "Self"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://vaultname.vault.azure.net/certificates/certb81a116d/create?api-version=2016-10-01 + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALc5ApOeeyu064QOivTm9mgpsMkTqEjegjgKj6Bav+6rmgr0GS976w+Or+4EpHhTxNSax9C3Pyw8PKrJU45OBdTQn+5h5Y7N2MumREvBsMFnycKOU0vMe2uxPOcXlXTJj+t6j3it54hk/ExdlQG7oYPlxw2RmSW+ZVO5ZCphgThVBozNINcE8bQV8KciuUQKUyCQx/wdkikPaq1qnEuQ883HdofoBQJ9rvPoNcKEE/x+WTB1NA52d5WOwAOgpf92ro82XZWajGzjY9pkiPrb+u89fX1g6fczvjqXRp3FPSsrzTR1oZ8zc1NR2ZQbKkCISF2uWrpx3jjoc2KjxhhAcGECAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAXY6j0agUrOsfsfWcsEsp6Quu27klwfgEhELa2HUvSMPtay5QARrSSsTwmx09Hw9ayyERi4E6eVhEufxdLLamvjbOqRJUlY7m0pbusKr1xgCmoggXPJDl/5L7rU49dCjP+YXXxzEaTkkD27sePXqptNWB4rODrHZ/5Akup6YadX0ntOd2nIxO0qhM8tt0TXHArCMjBsjzOXwOq5PR6cU2lYEylHzQkSaL9qLi6s4u1pDTug3xaaJLPdZBKBZ0z2X+wzgAHBXigx+k2In7lsZKAXbbiH1TRusxUf5qrYsq0P7HI1RyIzuLKkG07AQ4ORlhPyEsStVh/LBBlC3McuBae","cancellation_requested":false,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"36abd634c44a425db54e971c3cc52011"}' + headers: + cache-control: + - no-cache + content-length: + - '1302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 14 Aug 2020 21:57:38 GMT + expires: + - '-1' + location: + - https://vaultname.vault.azure.net/certificates/certb81a116d/pending?api-version=2016-10-01&request_id=36abd634c44a425db54e971c3cc52011 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/certb81a116d/pending?api-version=2016-10-01 + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALc5ApOeeyu064QOivTm9mgpsMkTqEjegjgKj6Bav+6rmgr0GS976w+Or+4EpHhTxNSax9C3Pyw8PKrJU45OBdTQn+5h5Y7N2MumREvBsMFnycKOU0vMe2uxPOcXlXTJj+t6j3it54hk/ExdlQG7oYPlxw2RmSW+ZVO5ZCphgThVBozNINcE8bQV8KciuUQKUyCQx/wdkikPaq1qnEuQ883HdofoBQJ9rvPoNcKEE/x+WTB1NA52d5WOwAOgpf92ro82XZWajGzjY9pkiPrb+u89fX1g6fczvjqXRp3FPSsrzTR1oZ8zc1NR2ZQbKkCISF2uWrpx3jjoc2KjxhhAcGECAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAXY6j0agUrOsfsfWcsEsp6Quu27klwfgEhELa2HUvSMPtay5QARrSSsTwmx09Hw9ayyERi4E6eVhEufxdLLamvjbOqRJUlY7m0pbusKr1xgCmoggXPJDl/5L7rU49dCjP+YXXxzEaTkkD27sePXqptNWB4rODrHZ/5Akup6YadX0ntOd2nIxO0qhM8tt0TXHArCMjBsjzOXwOq5PR6cU2lYEylHzQkSaL9qLi6s4u1pDTug3xaaJLPdZBKBZ0z2X+wzgAHBXigx+k2In7lsZKAXbbiH1TRusxUf5qrYsq0P7HI1RyIzuLKkG07AQ4ORlhPyEsStVh/LBBlC3McuBae","cancellation_requested":false,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"36abd634c44a425db54e971c3cc52011"}' + headers: + cache-control: + - no-cache + content-length: + - '1302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 14 Aug 2020 21:57:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + 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: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/certb81a116d/pending?api-version=2016-10-01 + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALc5ApOeeyu064QOivTm9mgpsMkTqEjegjgKj6Bav+6rmgr0GS976w+Or+4EpHhTxNSax9C3Pyw8PKrJU45OBdTQn+5h5Y7N2MumREvBsMFnycKOU0vMe2uxPOcXlXTJj+t6j3it54hk/ExdlQG7oYPlxw2RmSW+ZVO5ZCphgThVBozNINcE8bQV8KciuUQKUyCQx/wdkikPaq1qnEuQ883HdofoBQJ9rvPoNcKEE/x+WTB1NA52d5WOwAOgpf92ro82XZWajGzjY9pkiPrb+u89fX1g6fczvjqXRp3FPSsrzTR1oZ8zc1NR2ZQbKkCISF2uWrpx3jjoc2KjxhhAcGECAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAXY6j0agUrOsfsfWcsEsp6Quu27klwfgEhELa2HUvSMPtay5QARrSSsTwmx09Hw9ayyERi4E6eVhEufxdLLamvjbOqRJUlY7m0pbusKr1xgCmoggXPJDl/5L7rU49dCjP+YXXxzEaTkkD27sePXqptNWB4rODrHZ/5Akup6YadX0ntOd2nIxO0qhM8tt0TXHArCMjBsjzOXwOq5PR6cU2lYEylHzQkSaL9qLi6s4u1pDTug3xaaJLPdZBKBZ0z2X+wzgAHBXigx+k2In7lsZKAXbbiH1TRusxUf5qrYsq0P7HI1RyIzuLKkG07AQ4ORlhPyEsStVh/LBBlC3McuBae","cancellation_requested":false,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"36abd634c44a425db54e971c3cc52011"}' + headers: + cache-control: + - no-cache + content-length: + - '1302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 14 Aug 2020 21:57:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + 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: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/certb81a116d/pending?api-version=2016-10-01 + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALc5ApOeeyu064QOivTm9mgpsMkTqEjegjgKj6Bav+6rmgr0GS976w+Or+4EpHhTxNSax9C3Pyw8PKrJU45OBdTQn+5h5Y7N2MumREvBsMFnycKOU0vMe2uxPOcXlXTJj+t6j3it54hk/ExdlQG7oYPlxw2RmSW+ZVO5ZCphgThVBozNINcE8bQV8KciuUQKUyCQx/wdkikPaq1qnEuQ883HdofoBQJ9rvPoNcKEE/x+WTB1NA52d5WOwAOgpf92ro82XZWajGzjY9pkiPrb+u89fX1g6fczvjqXRp3FPSsrzTR1oZ8zc1NR2ZQbKkCISF2uWrpx3jjoc2KjxhhAcGECAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAXY6j0agUrOsfsfWcsEsp6Quu27klwfgEhELa2HUvSMPtay5QARrSSsTwmx09Hw9ayyERi4E6eVhEufxdLLamvjbOqRJUlY7m0pbusKr1xgCmoggXPJDl/5L7rU49dCjP+YXXxzEaTkkD27sePXqptNWB4rODrHZ/5Akup6YadX0ntOd2nIxO0qhM8tt0TXHArCMjBsjzOXwOq5PR6cU2lYEylHzQkSaL9qLi6s4u1pDTug3xaaJLPdZBKBZ0z2X+wzgAHBXigx+k2In7lsZKAXbbiH1TRusxUf5qrYsq0P7HI1RyIzuLKkG07AQ4ORlhPyEsStVh/LBBlC3McuBae","cancellation_requested":false,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"36abd634c44a425db54e971c3cc52011"}' + headers: + cache-control: + - no-cache + content-length: + - '1302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 14 Aug 2020 21:57:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + 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: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/certb81a116d/pending?api-version=2016-10-01 + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALc5ApOeeyu064QOivTm9mgpsMkTqEjegjgKj6Bav+6rmgr0GS976w+Or+4EpHhTxNSax9C3Pyw8PKrJU45OBdTQn+5h5Y7N2MumREvBsMFnycKOU0vMe2uxPOcXlXTJj+t6j3it54hk/ExdlQG7oYPlxw2RmSW+ZVO5ZCphgThVBozNINcE8bQV8KciuUQKUyCQx/wdkikPaq1qnEuQ883HdofoBQJ9rvPoNcKEE/x+WTB1NA52d5WOwAOgpf92ro82XZWajGzjY9pkiPrb+u89fX1g6fczvjqXRp3FPSsrzTR1oZ8zc1NR2ZQbKkCISF2uWrpx3jjoc2KjxhhAcGECAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAXY6j0agUrOsfsfWcsEsp6Quu27klwfgEhELa2HUvSMPtay5QARrSSsTwmx09Hw9ayyERi4E6eVhEufxdLLamvjbOqRJUlY7m0pbusKr1xgCmoggXPJDl/5L7rU49dCjP+YXXxzEaTkkD27sePXqptNWB4rODrHZ/5Akup6YadX0ntOd2nIxO0qhM8tt0TXHArCMjBsjzOXwOq5PR6cU2lYEylHzQkSaL9qLi6s4u1pDTug3xaaJLPdZBKBZ0z2X+wzgAHBXigx+k2In7lsZKAXbbiH1TRusxUf5qrYsq0P7HI1RyIzuLKkG07AQ4ORlhPyEsStVh/LBBlC3McuBae","cancellation_requested":false,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"36abd634c44a425db54e971c3cc52011"}' + headers: + cache-control: + - no-cache + content-length: + - '1302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 14 Aug 2020 21:57:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + 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: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/certb81a116d/pending?api-version=2016-10-01 + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALc5ApOeeyu064QOivTm9mgpsMkTqEjegjgKj6Bav+6rmgr0GS976w+Or+4EpHhTxNSax9C3Pyw8PKrJU45OBdTQn+5h5Y7N2MumREvBsMFnycKOU0vMe2uxPOcXlXTJj+t6j3it54hk/ExdlQG7oYPlxw2RmSW+ZVO5ZCphgThVBozNINcE8bQV8KciuUQKUyCQx/wdkikPaq1qnEuQ883HdofoBQJ9rvPoNcKEE/x+WTB1NA52d5WOwAOgpf92ro82XZWajGzjY9pkiPrb+u89fX1g6fczvjqXRp3FPSsrzTR1oZ8zc1NR2ZQbKkCISF2uWrpx3jjoc2KjxhhAcGECAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAXY6j0agUrOsfsfWcsEsp6Quu27klwfgEhELa2HUvSMPtay5QARrSSsTwmx09Hw9ayyERi4E6eVhEufxdLLamvjbOqRJUlY7m0pbusKr1xgCmoggXPJDl/5L7rU49dCjP+YXXxzEaTkkD27sePXqptNWB4rODrHZ/5Akup6YadX0ntOd2nIxO0qhM8tt0TXHArCMjBsjzOXwOq5PR6cU2lYEylHzQkSaL9qLi6s4u1pDTug3xaaJLPdZBKBZ0z2X+wzgAHBXigx+k2In7lsZKAXbbiH1TRusxUf5qrYsq0P7HI1RyIzuLKkG07AQ4ORlhPyEsStVh/LBBlC3McuBae","cancellation_requested":false,"status":"completed","target":"https://vaultname.vault.azure.net/certificates/certb81a116d","request_id":"36abd634c44a425db54e971c3cc52011"}' + headers: + cache-control: + - no-cache + content-length: + - '1223' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 14 Aug 2020 21:57:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + 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: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.5.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/certb81a116d/?api-version=2016-10-01 + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/c90ec48f3d15432682bcdda7b91e24d2","kid":"https://vaultname.vault.azure.net/keys/certb81a116d/c90ec48f3d15432682bcdda7b91e24d2","sid":"https://vaultname.vault.azure.net/secrets/certb81a116d/c90ec48f3d15432682bcdda7b91e24d2","x5t":"YB8hpzNuUUnBts670ui4x8obRTw","cer":"MIIDNjCCAh6gAwIBAgIQHHHqA9RgRC6fan+r1SdguDANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDEw1EZWZhdWx0UG9saWN5MB4XDTIwMDgxNDIxNDc1NloXDTIxMDgxNDIxNTc1NlowGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALc5ApOeeyu064QOivTm9mgpsMkTqEjegjgKj6Bav+6rmgr0GS976w+Or+4EpHhTxNSax9C3Pyw8PKrJU45OBdTQn+5h5Y7N2MumREvBsMFnycKOU0vMe2uxPOcXlXTJj+t6j3it54hk/ExdlQG7oYPlxw2RmSW+ZVO5ZCphgThVBozNINcE8bQV8KciuUQKUyCQx/wdkikPaq1qnEuQ883HdofoBQJ9rvPoNcKEE/x+WTB1NA52d5WOwAOgpf92ro82XZWajGzjY9pkiPrb+u89fX1g6fczvjqXRp3FPSsrzTR1oZ8zc1NR2ZQbKkCISF2uWrpx3jjoc2KjxhhAcGECAwEAAaN8MHowDgYDVR0PAQH/BAQDAgWgMAkGA1UdEwQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB8GA1UdIwQYMBaAFEZdbqwP8jT7Ty3ub84SE7TljkYyMB0GA1UdDgQWBBRGXW6sD/I0+08t7m/OEhO05Y5GMjANBgkqhkiG9w0BAQsFAAOCAQEAmKxQTPGTVuoizDx/tPKShFGZPOiZ8ieDfm2UNEkpBs79Hw/Svf+/CXLLJVbm1y0OJ/LBPgXWgdKYyaZhva++zS8ebHCnb2+apM5sDe1D6woUkOfo0i7LZ2u24zFeGNSSjSi5yJRoK52aZqxZYHWNnkrZVAlLVIuPMvQpcHUn/AWpjtkmzwhDS6D5EmyQiRn9q1OsbiKT0Pr7bRYDuR6wcZF5KXQI04B6qqgc4GtgfNAA/We91y+C+1hQYK7PhPKXUKDOKkj0tBG/EgSWQbzfg99owkHq0YnsOJ73/wGKoI6CsxkVLjFmlM0E42xrRvZN9gBr/UQiCLVZaHUhqv2UOw==","attributes":{"enabled":true,"nbf":1597441676,"exp":1628978276,"created":1597442276,"updated":1597442276,"recoveryLevel":"Recoverable+Purgeable"},"policy":{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=DefaultPolicy","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1597442258,"updated":1597442258}},"pending":{"id":"https://vaultname.vault.azure.net/certificates/certb81a116d/pending"}}' + headers: + cache-control: + - no-cache + content-length: + - '2366' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 14 Aug 2020 21:57:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_list_deleted_certificates_2016_10_01.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_list_deleted_certificates_2016_10_01.yaml new file mode 100644 index 0000000000000..1668754e827ab --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_list_deleted_certificates_2016_10_01.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates?api-version=2016-10-01 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:36:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates?api-version=2016-10-01 + response: + body: + string: '{"value":[],"nextLink":null}' + headers: + cache-control: + - no-cache + content-length: + - '28' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:36:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_list_properties_of_certificates_2016_10_01.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_list_properties_of_certificates_2016_10_01.yaml new file mode 100644 index 0000000000000..4765033a4867b --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_list_properties_of_certificates_2016_10_01.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://vaultname.vault.azure.net/certificates?api-version=2016-10-01 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:37:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://vaultname.vault.azure.net/certificates?api-version=2016-10-01 + response: + body: + string: '{"value":[],"nextLink":null}' + headers: + cache-control: + - no-cache + content-length: + - '28' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2020 19:37:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.31.4 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_list_deleted_certificates_2016_10_01.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_list_deleted_certificates_2016_10_01.yaml new file mode 100644 index 0000000000000..5d1e9a7b095ad --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_list_deleted_certificates_2016_10_01.yaml @@ -0,0 +1,67 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates?api-version=2016-10-01 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: no-cache + content-length: '87' + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 19:37:55 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.31.4 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://gtyp2gvo4xhgqxdbkjjn2mg3.vault.azure.net/deletedcertificates?api-version=2016-10-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates?api-version=2016-10-01 + response: + body: + string: '{"value":[],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 19:37:55 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.31.4 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://gtyp2gvo4xhgqxdbkjjn2mg3.vault.azure.net/deletedcertificates?api-version=2016-10-01 +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_list_properties_of_certificates_2016_10_01.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_list_properties_of_certificates_2016_10_01.yaml new file mode 100644 index 0000000000000..455f1c496a3c2 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_list_properties_of_certificates_2016_10_01.yaml @@ -0,0 +1,67 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://vaultname.vault.azure.net/certificates?api-version=2016-10-01 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: no-cache + content-length: '87' + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 19:38:37 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.31.4 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://gyyvzoaguftghkx4oqftoyev.vault.azure.net/certificates?api-version=2016-10-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-certificates/4.2.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://vaultname.vault.azure.net/certificates?api-version=2016-10-01 + response: + body: + string: '{"value":[],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Mon, 17 Aug 2020 19:38:38 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.31.4 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://gyyvzoaguftghkx4oqftoyev.vault.azure.net/certificates?api-version=2016-10-01 +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py index 92cfe6c8763d9..a2ab84c7b4efe 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py @@ -6,11 +6,13 @@ import json import logging import time +import pytest from azure_devtools.scenario_tests import RecordingProcessor, RequestUrlNormalizer from azure.keyvault.certificates import ( AdministratorContact, + ApiVersion, CertificateClient, CertificateContact, CertificatePolicyAction, @@ -22,6 +24,7 @@ LifetimeAction, CertificateIssuer, IssuerProperties, + ApiVersion, ) from azure.keyvault.certificates._shared import parse_vault_id from devtools_testutils import ResourceGroupPreparer, KeyVaultPreparer @@ -622,6 +625,19 @@ def test_logging_disabled(self, client, **kwargs): # this means the message is not JSON or has no kty property pass + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @KeyVaultClientPreparer(client_kwargs={"api_version": ApiVersion.V2016_10_01}) + def test_2016_10_01_models(self, client, **kwargs): + """The client should correctly deserialize version 2016-10-01 models""" + + cert_name = self.get_resource_name("cert") + cert = client.begin_create_certificate(cert_name, CertificatePolicy.get_default()).result() + + # these properties don't exist in version 2016-10-01 + assert cert.policy.key_curve_name is None + assert cert.policy.certificate_transparency is None + @ResourceGroupPreparer(random_name_enabled=True) @KeyVaultPreparer() @KeyVaultClientPreparer() @@ -661,6 +677,29 @@ def test_get_certificate_version(self, client, **kwargs): assert version_properties.version == cert.properties.version assert version_properties.x509_thumbprint == cert.properties.x509_thumbprint + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @KeyVaultClientPreparer(client_kwargs={"api_version": ApiVersion.V2016_10_01}) + def test_list_properties_of_certificates_2016_10_01(self, client, **kwargs): + [_ for _ in client.list_properties_of_certificates()] + + with pytest.raises(NotImplementedError) as excinfo: + [_ for _ in client.list_properties_of_certificates(include_pending=True)] + + assert "The 'include_pending' parameter to `list_properties_of_certificates` is only available for API versions v7.0 and up" in str(excinfo.value) + + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @KeyVaultClientPreparer(client_kwargs={"api_version": ApiVersion.V2016_10_01}) + def test_list_deleted_certificates_2016_10_01(self, client, **kwargs): + + [_ for _ in client.list_deleted_certificates()] + + with pytest.raises(NotImplementedError) as excinfo: + [_ for _ in client.list_deleted_certificates(include_pending=True)] + + assert "The 'include_pending' parameter to `list_deleted_certificates` is only available for API versions v7.0 and up" in str(excinfo.value) + class _CustomHookPolicy(object): pass diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py index cddc9eaf3ea35..8620833ee750e 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py @@ -20,6 +20,7 @@ LifetimeAction, CertificateIssuer, IssuerProperties, + ApiVersion, ) from azure.keyvault.certificates.aio import CertificateClient from azure.keyvault.certificates._shared import parse_vault_id @@ -655,7 +656,8 @@ async def test_allowed_headers_passed_to_http_logging_policy(self, client, **kwa async def test_get_certificate_version(self, client, **kwargs): cert_name = self.get_resource_name("cert") policy = CertificatePolicy.get_default() - await asyncio.gather(*[client.create_certificate(cert_name, policy) for _ in range(self.list_test_size)]) + for _ in range(self.list_test_size): + await client.create_certificate(cert_name, policy) async for version_properties in client.list_properties_of_certificate_versions(cert_name): cert = await client.get_certificate_version(version_properties.name, version_properties.version) @@ -675,6 +677,36 @@ async def test_get_certificate_version(self, client, **kwargs): assert version_properties.version == cert.properties.version assert version_properties.x509_thumbprint == cert.properties.x509_thumbprint + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @KeyVaultClientPreparer(client_kwargs={"api_version": ApiVersion.V2016_10_01}) + async def test_list_properties_of_certificates_2016_10_01(self, client, **kwargs): + certs = client.list_properties_of_certificates() + async for cert in certs: + pass + + with pytest.raises(NotImplementedError) as excinfo: + certs = client.list_properties_of_certificates(include_pending=True) + async for cert in certs: + pass + + assert "The 'include_pending' parameter to `list_properties_of_certificates` is only available for API versions v7.0 and up" in str(excinfo.value) + + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @KeyVaultClientPreparer(client_kwargs={"api_version": ApiVersion.V2016_10_01}) + async def test_list_deleted_certificates_2016_10_01(self, client, **kwargs): + certs = client.list_deleted_certificates() + async for cert in certs: + pass + + with pytest.raises(NotImplementedError) as excinfo: + certs = client.list_deleted_certificates(include_pending=True) + async for cert in certs: + pass + + assert "The 'include_pending' parameter to `list_deleted_certificates` is only available for API versions v7.0 and up" in str(excinfo.value) + class _CustomHookPolicy(object): pass diff --git a/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md b/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md index 7f2ecd50a5549..64279ca98878c 100644 --- a/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History ## 4.2.1 (Unreleased) +### Fixed +- Correct typing for async paging methods ## 4.2.0 (2020-08-11) diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 5fa94dc08f9ab..15f0a218147de 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -138,7 +138,7 @@ Azure Key Vault can create and store RSA and elliptic curve keys. Both can optionally be protected by hardware security modules (HSMs). Azure Key Vault can also perform cryptographic operations with them. For more information about keys and supported operations and algorithms, see the -[Key Vault documentation](https://docs.microsoft.com/en-us/azure/key-vault/about-keys-secrets-and-certificates#key-vault-keys). +[Key Vault documentation](https://docs.microsoft.com/azure/key-vault/about-keys-secrets-and-certificates#key-vault-keys). [KeyClient][key_client_docs] can create keys in the vault, get existing keys from the vault, update key metadata, and delete keys, as shown in the @@ -439,7 +439,7 @@ additional questions or comments. [list_operations_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-keys/samples/list_operations_async.py [recover_purge_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations.py [recover_purge_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations_async.py -[keyvault_docs]: https://docs.microsoft.com/en-us/azure/key-vault/ +[keyvault_docs]: https://docs.microsoft.com/azure/key-vault/ [pip]: https://pypi.org/project/pip/ [pypi_package_keys]: https://pypi.org/project/azure-keyvault-keys/ [reference_docs]: https://aka.ms/azsdk/python/keyvault-keys/docs @@ -447,6 +447,6 @@ additional questions or comments. [crypto_client_docs]: https://aka.ms/azsdk/python/keyvault-keys/crypto/docs [key_client_src]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys [key_samples]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-keys/samples -[soft_delete]: https://docs.microsoft.com/en-us/azure/key-vault/key-vault-ovw-soft-delete +[soft_delete]: https://docs.microsoft.com/azure/key-vault/key-vault-ovw-soft-delete ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%2Fkeyvault%2Fazure-keyvault-keys%2FFREADME.png) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 2c7939e577efa..c7a32bc79c3b0 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -39,7 +39,7 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: self._client = client return - api_version = kwargs.pop("api_version", DEFAULT_VERSION) + self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) pipeline = kwargs.pop("pipeline", None) transport = kwargs.pop("transport", None) @@ -58,7 +58,7 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: try: self._client = _KeyVaultClient( - api_version=api_version, + api_version=self.api_version, pipeline=pipeline, transport=transport, authentication_policy=AsyncChallengeAuthPolicy(credential), @@ -66,10 +66,10 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: http_logging_policy=http_logging_policy, **kwargs ) - self._models = _KeyVaultClient.models(api_version=api_version) + self._models = _KeyVaultClient.models(api_version=self.api_version) except NotImplementedError: raise NotImplementedError( - "This package doesn't support API version '{}'. ".format(api_version) + "This package doesn't support API version '{}'. ".format(self.api_version) + "Supported versions: {}".format(", ".join(v.value for v in ApiVersion)) ) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/client_base.py index 15cb68d524e31..65e4ef087d4bb 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/client_base.py @@ -48,7 +48,7 @@ def __init__(self, vault_url, credential, **kwargs): self._client = client return - api_version = kwargs.pop("api_version", DEFAULT_VERSION) + self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) pipeline = kwargs.pop("pipeline", None) transport = kwargs.pop("transport", RequestsTransport(**kwargs)) @@ -62,7 +62,7 @@ def __init__(self, vault_url, credential, **kwargs): ) try: self._client = _KeyVaultClient( - api_version=api_version, + api_version=self.api_version, pipeline=pipeline, transport=transport, authentication_policy=ChallengeAuthPolicy(credential), @@ -70,10 +70,10 @@ def __init__(self, vault_url, credential, **kwargs): http_logging_policy=http_logging_policy, **kwargs ) - self._models = _KeyVaultClient.models(api_version=api_version) + self._models = _KeyVaultClient.models(api_version=self.api_version) except NotImplementedError: raise NotImplementedError( - "This package doesn't support API version '{}'. ".format(api_version) + "This package doesn't support API version '{}'. ".format(self.api_version) + "Supported versions: {}".format(", ".join(v.value for v in ApiVersion)) ) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py index f939e7afe87c6..3b7b1cf070f6b 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py @@ -16,7 +16,8 @@ if TYPE_CHECKING: # pylint:disable=ungrouped-imports from datetime import datetime - from typing import Any, AsyncIterable, Optional, List, Union + from azure.core.async_paging import AsyncItemPaged + from typing import Any, Optional, List, Union from .. import KeyType @@ -256,7 +257,7 @@ async def get_deleted_key(self, name: str, **kwargs: "Any") -> DeletedKey: return DeletedKey._from_deleted_key_bundle(bundle) @distributed_trace - def list_deleted_keys(self, **kwargs: "Any") -> "AsyncIterable[DeletedKey]": + def list_deleted_keys(self, **kwargs: "Any") -> "AsyncItemPaged[DeletedKey]": """List all deleted keys, including the public part of each. Possible only in a vault with soft-delete enabled. Requires keys/list permission. @@ -281,7 +282,7 @@ def list_deleted_keys(self, **kwargs: "Any") -> "AsyncIterable[DeletedKey]": ) @distributed_trace - def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncIterable[KeyProperties]": + def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncItemPaged[KeyProperties]": """List identifiers and properties of all keys in the vault. Requires keys/list permission. :returns: An iterator of keys without their cryptographic material or version information @@ -304,7 +305,7 @@ def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncIterable[KeyProperti ) @distributed_trace - def list_properties_of_key_versions(self, name: str, **kwargs: "Any") -> "AsyncIterable[KeyProperties]": + def list_properties_of_key_versions(self, name: str, **kwargs: "Any") -> "AsyncItemPaged[KeyProperties]": """List the identifiers and properties of a key's versions. Requires keys/list permission. :param str name: The name of the key diff --git a/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md b/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md index 3498b39e68cb5..7d60250d6f863 100644 --- a/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History ## 4.2.1 (Unreleased) - +### Fixed +- Correct typing for async paging methods ## 4.2.0 (2020-08-11) ### Fixed diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index 906cdea98179e..7aebb1ad9b234 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -139,7 +139,7 @@ A secret consists of a secret value and its associated metadata and management information. This library handles secret values as strings, but Azure Key Vault doesn't store them as such. For more information about secrets and how Key Vault stores and manages them, see the -[Key Vault documentation](https://docs.microsoft.com/en-us/azure/key-vault/about-keys-secrets-and-certificates#key-vault-secrets). +[Key Vault documentation](https://docs.microsoft.com/azure/key-vault/about-keys-secrets-and-certificates#key-vault-secrets). [SecretClient][secret_client_docs] can set secret values in the vault, update secret metadata, and delete secrets, as shown in the @@ -417,13 +417,13 @@ additional questions or comments. [list_operations_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-secrets/samples/list_operations_async.py [recover_purge_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-secrets/samples/recover_purge_operations.py [recover_purge_async_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/azure-keyvault-secrets/samples/recover_purge_operations_async.py -[keyvault_docs]: https://docs.microsoft.com/en-us/azure/key-vault/ +[keyvault_docs]: https://docs.microsoft.com/azure/key-vault/ [pip]: https://pypi.org/project/pip/ [pypi_package_secrets]: https://pypi.org/project/azure-keyvault-secrets/ [reference_docs]: https://aka.ms/azsdk/python/keyvault-secrets/docs [secret_client_src]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets [secret_client_docs]: https://aka.ms/azsdk/python/keyvault-secrets/docs#azure.keyvault.secrets.SecretClient [secret_samples]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-secrets/samples -[soft_delete]: https://docs.microsoft.com/en-us/azure/key-vault/key-vault-ovw-soft-delete +[soft_delete]: https://docs.microsoft.com/azure/key-vault/key-vault-ovw-soft-delete ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%2Fkeyvault%2Fazure-keyvault-secrets%2FFREADME.png) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 2c7939e577efa..c7a32bc79c3b0 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -39,7 +39,7 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: self._client = client return - api_version = kwargs.pop("api_version", DEFAULT_VERSION) + self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) pipeline = kwargs.pop("pipeline", None) transport = kwargs.pop("transport", None) @@ -58,7 +58,7 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: try: self._client = _KeyVaultClient( - api_version=api_version, + api_version=self.api_version, pipeline=pipeline, transport=transport, authentication_policy=AsyncChallengeAuthPolicy(credential), @@ -66,10 +66,10 @@ def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: http_logging_policy=http_logging_policy, **kwargs ) - self._models = _KeyVaultClient.models(api_version=api_version) + self._models = _KeyVaultClient.models(api_version=self.api_version) except NotImplementedError: raise NotImplementedError( - "This package doesn't support API version '{}'. ".format(api_version) + "This package doesn't support API version '{}'. ".format(self.api_version) + "Supported versions: {}".format(", ".join(v.value for v in ApiVersion)) ) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py index 15cb68d524e31..65e4ef087d4bb 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py @@ -48,7 +48,7 @@ def __init__(self, vault_url, credential, **kwargs): self._client = client return - api_version = kwargs.pop("api_version", DEFAULT_VERSION) + self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) pipeline = kwargs.pop("pipeline", None) transport = kwargs.pop("transport", RequestsTransport(**kwargs)) @@ -62,7 +62,7 @@ def __init__(self, vault_url, credential, **kwargs): ) try: self._client = _KeyVaultClient( - api_version=api_version, + api_version=self.api_version, pipeline=pipeline, transport=transport, authentication_policy=ChallengeAuthPolicy(credential), @@ -70,10 +70,10 @@ def __init__(self, vault_url, credential, **kwargs): http_logging_policy=http_logging_policy, **kwargs ) - self._models = _KeyVaultClient.models(api_version=api_version) + self._models = _KeyVaultClient.models(api_version=self.api_version) except NotImplementedError: raise NotImplementedError( - "This package doesn't support API version '{}'. ".format(api_version) + "This package doesn't support API version '{}'. ".format(self.api_version) + "Supported versions: {}".format(", ".join(v.value for v in ApiVersion)) ) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index 0ae4b19f52ea8..7f71232c2f982 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -2,11 +2,12 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, AsyncIterable, Optional, Dict +from typing import Any, Optional, Dict from functools import partial from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.async_paging import AsyncItemPaged from .._models import KeyVaultSecret, DeletedSecret, SecretProperties from .._shared import AsyncKeyVaultClientBase @@ -165,7 +166,7 @@ async def update_secret_properties( return SecretProperties._from_secret_bundle(bundle) # pylint: disable=protected-access @distributed_trace - def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncIterable[SecretProperties]: + def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncItemPaged[SecretProperties]: """List identifiers and attributes of all secrets in the vault. Requires secrets/list permission. List items don't include secret values. Use :func:`get_secret` to get a secret's value. @@ -189,7 +190,7 @@ def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncIterable[SecretPro ) @distributed_trace - def list_properties_of_secret_versions(self, name: str, **kwargs: "Any") -> AsyncIterable[SecretProperties]: + def list_properties_of_secret_versions(self, name: str, **kwargs: "Any") -> AsyncItemPaged[SecretProperties]: """List properties of all versions of a secret, excluding their values. Requires secrets/list permission. List items don't include secret values. Use :func:`get_secret` to get a secret's value. @@ -321,7 +322,7 @@ async def get_deleted_secret(self, name: str, **kwargs: "Any") -> DeletedSecret: return DeletedSecret._from_deleted_secret_bundle(bundle) @distributed_trace - def list_deleted_secrets(self, **kwargs: "Any") -> AsyncIterable[DeletedSecret]: + def list_deleted_secrets(self, **kwargs: "Any") -> AsyncItemPaged[DeletedSecret]: """Lists all deleted secrets. Possible only in vaults with soft-delete enabled. Requires secrets/list permission. diff --git a/sdk/keyvault/ci.yml b/sdk/keyvault/ci.yml index 395b8c414d2e9..d7221d1f1503a 100644 --- a/sdk/keyvault/ci.yml +++ b/sdk/keyvault/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -44,4 +43,4 @@ extends: - name: azure_mgmt_keyvault safeName: azuremgmtkeyvault - name: azure_keyvault - safeName: azurekeyvault \ No newline at end of file + safeName: azurekeyvault diff --git a/sdk/kubernetesconfiguration/ci.yml b/sdk/kubernetesconfiguration/ci.yml index 790a2cac9ca33..7a8aa6f9f48a0 100644 --- a/sdk/kubernetesconfiguration/ci.yml +++ b/sdk/kubernetesconfiguration/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: kubernetesconfiguration Artifacts: - name: azure_mgmt_kubernetesconfiguration - safeName: azuremgmtkubernetesconfiguration \ No newline at end of file + safeName: azuremgmtkubernetesconfiguration diff --git a/sdk/kusto/ci.yml b/sdk/kusto/ci.yml index ed6c04fb92a2a..90d1a2983c61f 100644 --- a/sdk/kusto/ci.yml +++ b/sdk/kusto/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: kusto Artifacts: - name: azure_mgmt_kusto - safeName: azuremgmtkusto \ No newline at end of file + safeName: azuremgmtkusto diff --git a/sdk/labservices/ci.yml b/sdk/labservices/ci.yml index 566a1443acf1d..142daa2e659df 100644 --- a/sdk/labservices/ci.yml +++ b/sdk/labservices/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: labservices Artifacts: - name: azure_mgmt_labservices - safeName: azuremgmtlabservices \ No newline at end of file + safeName: azuremgmtlabservices diff --git a/sdk/loganalytics/ci.yml b/sdk/loganalytics/ci.yml index cea2a17237f27..7555967f7d521 100644 --- a/sdk/loganalytics/ci.yml +++ b/sdk/loganalytics/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -32,4 +31,4 @@ extends: - name: azure_loganalytics safeName: azureloganalytics - name: azure_mgmt_loganalytics - safeName: azuremgmtloganalytics \ No newline at end of file + safeName: azuremgmtloganalytics diff --git a/sdk/logic/ci.yml b/sdk/logic/ci.yml index 675caf9b6a9c0..d516fbc1f2b94 100644 --- a/sdk/logic/ci.yml +++ b/sdk/logic/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: logic Artifacts: - name: azure_mgmt_logic - safeName: azuremgmtlogic \ No newline at end of file + safeName: azuremgmtlogic diff --git a/sdk/machinelearning/ci.yml b/sdk/machinelearning/ci.yml index 261da6258d67b..72dc185fd1e1e 100644 --- a/sdk/machinelearning/ci.yml +++ b/sdk/machinelearning/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -32,4 +31,4 @@ extends: - name: azure_mgmt_machinelearningcompute safeName: azuremgmtmachinelearningcompute - name: azure_mgmt_machinelearningservices - safeName: azuremgmtmachinelearningservices \ No newline at end of file + safeName: azuremgmtmachinelearningservices diff --git a/sdk/maintenance/ci.yml b/sdk/maintenance/ci.yml index 2964325cd1fbc..276441a757d0a 100644 --- a/sdk/maintenance/ci.yml +++ b/sdk/maintenance/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: maintenance Artifacts: - name: azure_mgmt_maintenance - safeName: azuremgmtmaintenance \ No newline at end of file + safeName: azuremgmtmaintenance diff --git a/sdk/managedservices/ci.yml b/sdk/managedservices/ci.yml index 61cf334ddb704..ecf42501c5dc2 100644 --- a/sdk/managedservices/ci.yml +++ b/sdk/managedservices/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: managedservices Artifacts: - name: azure_mgmt_managedservices - safeName: azuremgmtmanagedservices \ No newline at end of file + safeName: azuremgmtmanagedservices diff --git a/sdk/managementgroups/ci.yml b/sdk/managementgroups/ci.yml index 80db2bfdd34d7..1bd118d62f424 100644 --- a/sdk/managementgroups/ci.yml +++ b/sdk/managementgroups/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: managementgroups Artifacts: - name: azure_mgmt_managementgroups - safeName: azuremgmtmanagementgroups \ No newline at end of file + safeName: azuremgmtmanagementgroups diff --git a/sdk/managementpartner/ci.yml b/sdk/managementpartner/ci.yml index 7db968619ef11..99aeee9eb9a4c 100644 --- a/sdk/managementpartner/ci.yml +++ b/sdk/managementpartner/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: managementpartner Artifacts: - name: azure_mgmt_managementpartner - safeName: azuremgmtmanagementpartner \ No newline at end of file + safeName: azuremgmtmanagementpartner diff --git a/sdk/maps/ci.yml b/sdk/maps/ci.yml index a21a23435479f..4f82483bee0b7 100644 --- a/sdk/maps/ci.yml +++ b/sdk/maps/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/marketplaceordering/ci.yml b/sdk/marketplaceordering/ci.yml index 453c01d454c23..25b5699ae2720 100644 --- a/sdk/marketplaceordering/ci.yml +++ b/sdk/marketplaceordering/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: marketplaceordering Artifacts: - name: azure_mgmt_marketplaceordering - safeName: azuremgmtmarketplaceordering \ No newline at end of file + safeName: azuremgmtmarketplaceordering diff --git a/sdk/media/ci.yml b/sdk/media/ci.yml index 0c6bd6fb9658c..58a0d62928008 100644 --- a/sdk/media/ci.yml +++ b/sdk/media/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: media Artifacts: - name: azure_mgmt_media - safeName: azuremgmtmedia \ No newline at end of file + safeName: azuremgmtmedia diff --git a/sdk/mixedreality/ci.yml b/sdk/mixedreality/ci.yml index 417465bcec346..991d84a936a77 100644 --- a/sdk/mixedreality/ci.yml +++ b/sdk/mixedreality/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/monitor/ci.yml b/sdk/monitor/ci.yml index 75d96ca76af18..68ab210d971a0 100644 --- a/sdk/monitor/ci.yml +++ b/sdk/monitor/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/netapp/ci.yml b/sdk/netapp/ci.yml index 1c9b7da7cfa7d..059569196cc24 100644 --- a/sdk/netapp/ci.yml +++ b/sdk/netapp/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: netapp Artifacts: - name: azure_mgmt_netapp - safeName: azuremgmtnetapp \ No newline at end of file + safeName: azuremgmtnetapp diff --git a/sdk/network/ci.yml b/sdk/network/ci.yml index d649a4cb2d38c..310670fc81514 100644 --- a/sdk/network/ci.yml +++ b/sdk/network/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/notificationhubs/ci.yml b/sdk/notificationhubs/ci.yml index e4a8fb90db524..4dc9202e89e20 100644 --- a/sdk/notificationhubs/ci.yml +++ b/sdk/notificationhubs/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/operationsmanagement/ci.yml b/sdk/operationsmanagement/ci.yml index 31fde542ea6d8..78574d66b1120 100644 --- a/sdk/operationsmanagement/ci.yml +++ b/sdk/operationsmanagement/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: operationsmanagement Artifacts: - name: azure_mgmt_operationsmanagement - safeName: azuremgmtoperationsmanagement \ No newline at end of file + safeName: azuremgmtoperationsmanagement diff --git a/sdk/peering/ci.yml b/sdk/peering/ci.yml index 1df047a85539d..3405caa53f559 100644 --- a/sdk/peering/ci.yml +++ b/sdk/peering/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: peering Artifacts: - name: azure_mgmt_peering - safeName: azuremgmtpeering \ No newline at end of file + safeName: azuremgmtpeering diff --git a/sdk/policyinsights/ci.yml b/sdk/policyinsights/ci.yml index ba02dd04f8fd4..dcc1114697236 100644 --- a/sdk/policyinsights/ci.yml +++ b/sdk/policyinsights/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: policyinsights Artifacts: - name: azure_mgmt_policyinsights - safeName: azuremgmtpolicyinsights \ No newline at end of file + safeName: azuremgmtpolicyinsights diff --git a/sdk/powerbidedicated/ci.yml b/sdk/powerbidedicated/ci.yml index 04370ff5c9bbc..9ac744822c5a7 100644 --- a/sdk/powerbidedicated/ci.yml +++ b/sdk/powerbidedicated/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: powerbidedicated Artifacts: - name: azure_mgmt_powerbidedicated - safeName: azuremgmtpowerbidedicated \ No newline at end of file + safeName: azuremgmtpowerbidedicated diff --git a/sdk/powerbiembedded/ci.yml b/sdk/powerbiembedded/ci.yml index e75b2366164b0..e2067042cb8ff 100644 --- a/sdk/powerbiembedded/ci.yml +++ b/sdk/powerbiembedded/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: powerbiembedded Artifacts: - name: azure_mgmt_powerbiembedded - safeName: azuremgmtpowerbiembedded \ No newline at end of file + safeName: azuremgmtpowerbiembedded diff --git a/sdk/rdbms/ci.yml b/sdk/rdbms/ci.yml index 9f1006c1f2624..837352c9c9f8b 100644 --- a/sdk/rdbms/ci.yml +++ b/sdk/rdbms/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: rdbms Artifacts: - name: azure_mgmt_rdbms - safeName: azuremgmtrdbms \ No newline at end of file + safeName: azuremgmtrdbms diff --git a/sdk/recoveryservices/ci.yml b/sdk/recoveryservices/ci.yml index c18ed6e5139f0..7adcceccaea74 100644 --- a/sdk/recoveryservices/ci.yml +++ b/sdk/recoveryservices/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/redhatopenshift/ci.yml b/sdk/redhatopenshift/ci.yml index e06fee95e0d55..4815effaf1e73 100644 --- a/sdk/redhatopenshift/ci.yml +++ b/sdk/redhatopenshift/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/redis/ci.yml b/sdk/redis/ci.yml index ade6de8da74fa..c60b71c27694a 100644 --- a/sdk/redis/ci.yml +++ b/sdk/redis/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: redis Artifacts: - name: azure_mgmt_redis - safeName: azuremgmtredis \ No newline at end of file + safeName: azuremgmtredis diff --git a/sdk/regionmove/azure-mgmt-regionmove/CHANGELOG.md b/sdk/regionmove/azure-mgmt-regionmove/CHANGELOG.md new file mode 100644 index 0000000000000..e8415b077b206 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (2020-08-27) + +* Initial Release diff --git a/sdk/regionmove/azure-mgmt-regionmove/MANIFEST.in b/sdk/regionmove/azure-mgmt-regionmove/MANIFEST.in new file mode 100644 index 0000000000000..a3cb07df87658 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include tests *.py *.yaml +include *.md +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/regionmove/azure-mgmt-regionmove/README.md b/sdk/regionmove/azure-mgmt-regionmove/README.md new file mode 100644 index 0000000000000..c2f00b775c861 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/README.md @@ -0,0 +1,21 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure MyService 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 [azure sdk python release](https://aka.ms/azsdk/python/all). + + +# Usage + +For code examples, see [MyService 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) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-regionmove%2FREADME.png) diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/__init__.py b/sdk/regionmove/azure-mgmt-regionmove/azure/__init__.py new file mode 100644 index 0000000000000..0260537a02bb9 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/__init__.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/__init__.py new file mode 100644 index 0000000000000..0260537a02bb9 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/__init__.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/__init__.py new file mode 100644 index 0000000000000..933564bc49b86 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/__init__.py @@ -0,0 +1,19 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._region_move_service_api import RegionMoveServiceAPI +from ._version import VERSION + +__version__ = VERSION +__all__ = ['RegionMoveServiceAPI'] + +try: + from ._patch import patch_sdk + patch_sdk() +except ImportError: + pass diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_configuration.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_configuration.py new file mode 100644 index 0000000000000..b338a1eca7acd --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_configuration.py @@ -0,0 +1,70 @@ +# 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. +# -------------------------------------------------------------------------- + +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 RegionMoveServiceAPIConfiguration(Configuration): + """Configuration for RegionMoveServiceAPI. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription ID. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(RegionMoveServiceAPIConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-10-01-preview" + self.credential_scopes = ['https://management.azure.com/.default'] + self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + kwargs.setdefault('sdk_moniker', 'mgmt-regionmove/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_metadata.json b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_metadata.json new file mode 100644 index 0000000000000..06be7399849c3 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_metadata.json @@ -0,0 +1,56 @@ +{ + "chosen_version": "2019-10-01-preview", + "total_api_version_list": ["2019-10-01-preview"], + "client": { + "name": "RegionMoveServiceAPI", + "filename": "_region_move_service_api", + "description": "A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region." + }, + "global_parameters": { + "sync_method": { + "credential": { + "method_signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "method_signature": "subscription_id, # type: str", + "description": "The Subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "async_method": { + "credential": { + "method_signature": "credential, # type: \"AsyncTokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "method_signature": "subscription_id, # type: str", + "description": "The Subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id" + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"] + }, + "operation_groups": { + "move_collections": "MoveCollectionsOperations", + "move_resources": "MoveResourcesOperations", + "unresolved_dependencies": "UnresolvedDependenciesOperations", + "operations_discovery": "OperationsDiscoveryOperations" + }, + "operation_mixins": { + }, + "sync_imports": "None", + "async_imports": "None" +} \ No newline at end of file diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_region_move_service_api.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_region_move_service_api.py new file mode 100644 index 0000000000000..587c15f79521f --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_region_move_service_api.py @@ -0,0 +1,84 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +from ._configuration import RegionMoveServiceAPIConfiguration +from .operations import MoveCollectionsOperations +from .operations import MoveResourcesOperations +from .operations import UnresolvedDependenciesOperations +from .operations import OperationsDiscoveryOperations +from . import models + + +class RegionMoveServiceAPI(object): + """A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. + + :ivar move_collections: MoveCollectionsOperations operations + :vartype move_collections: region_move_service_api.operations.MoveCollectionsOperations + :ivar move_resources: MoveResourcesOperations operations + :vartype move_resources: region_move_service_api.operations.MoveResourcesOperations + :ivar unresolved_dependencies: UnresolvedDependenciesOperations operations + :vartype unresolved_dependencies: region_move_service_api.operations.UnresolvedDependenciesOperations + :ivar operations_discovery: OperationsDiscoveryOperations operations + :vartype operations_discovery: region_move_service_api.operations.OperationsDiscoveryOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription ID. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = RegionMoveServiceAPIConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.move_collections = MoveCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.move_resources = MoveResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.unresolved_dependencies = UnresolvedDependenciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations_discovery = OperationsDiscoveryOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> RegionMoveServiceAPI + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_version.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_version.py new file mode 100644 index 0000000000000..e5754a47ce68f --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/__init__.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/__init__.py new file mode 100644 index 0000000000000..e95552dbb37bc --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/__init__.py @@ -0,0 +1,10 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._region_move_service_api_async import RegionMoveServiceAPI +__all__ = ['RegionMoveServiceAPI'] diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/_configuration_async.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/_configuration_async.py new file mode 100644 index 0000000000000..a9f594e3796cb --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/_configuration_async.py @@ -0,0 +1,66 @@ +# 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. +# -------------------------------------------------------------------------- + +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_async import AsyncTokenCredential + + +class RegionMoveServiceAPIConfiguration(Configuration): + """Configuration for RegionMoveServiceAPI. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription ID. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(RegionMoveServiceAPIConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-10-01-preview" + self.credential_scopes = ['https://management.azure.com/.default'] + self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + kwargs.setdefault('sdk_moniker', 'mgmt-regionmove/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/_region_move_service_api_async.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/_region_move_service_api_async.py new file mode 100644 index 0000000000000..486a100e0a667 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/_region_move_service_api_async.py @@ -0,0 +1,78 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration_async import RegionMoveServiceAPIConfiguration +from .operations_async import MoveCollectionsOperations +from .operations_async import MoveResourcesOperations +from .operations_async import UnresolvedDependenciesOperations +from .operations_async import OperationsDiscoveryOperations +from .. import models + + +class RegionMoveServiceAPI(object): + """A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. + + :ivar move_collections: MoveCollectionsOperations operations + :vartype move_collections: region_move_service_api.aio.operations_async.MoveCollectionsOperations + :ivar move_resources: MoveResourcesOperations operations + :vartype move_resources: region_move_service_api.aio.operations_async.MoveResourcesOperations + :ivar unresolved_dependencies: UnresolvedDependenciesOperations operations + :vartype unresolved_dependencies: region_move_service_api.aio.operations_async.UnresolvedDependenciesOperations + :ivar operations_discovery: OperationsDiscoveryOperations operations + :vartype operations_discovery: region_move_service_api.aio.operations_async.OperationsDiscoveryOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription ID. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = RegionMoveServiceAPIConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.move_collections = MoveCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.move_resources = MoveResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.unresolved_dependencies = UnresolvedDependenciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations_discovery = OperationsDiscoveryOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "RegionMoveServiceAPI": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/__init__.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/__init__.py new file mode 100644 index 0000000000000..2d5f1a4233916 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/__init__.py @@ -0,0 +1,19 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._move_collections_operations_async import MoveCollectionsOperations +from ._move_resources_operations_async import MoveResourcesOperations +from ._unresolved_dependencies_operations_async import UnresolvedDependenciesOperations +from ._operations_discovery_operations_async import OperationsDiscoveryOperations + +__all__ = [ + 'MoveCollectionsOperations', + 'MoveResourcesOperations', + 'UnresolvedDependenciesOperations', + 'OperationsDiscoveryOperations', +] diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_move_collections_operations_async.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_move_collections_operations_async.py new file mode 100644 index 0000000000000..34a2957d6c4a5 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_move_collections_operations_async.py @@ -0,0 +1,1085 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MoveCollectionsOperations: + """MoveCollectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~region_move_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.MoveCollection"] = None, + **kwargs + ) -> "models.MoveCollection": + """Creates or updates a move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.MoveCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MoveCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.MoveCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'MoveCollection') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('MoveCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('MoveCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.UpdateMoveCollectionRequest"] = None, + **kwargs + ) -> "models.MoveCollection": + """Updates a move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.UpdateMoveCollectionRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MoveCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.MoveCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.update.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'UpdateMoveCollectionRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MoveCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + move_collection_name: str, + **kwargs + ) -> Optional["models.OperationStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + move_collection_name: str, + **kwargs + ) -> AsyncLROPoller["models.OperationStatus"]: + """Deletes a move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + move_collection_name: str, + **kwargs + ) -> "models.MoveCollection": + """Gets the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MoveCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.MoveCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MoveCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + async def _prepare_initial( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.PrepareRequest"] = None, + **kwargs + ) -> Optional["models.OperationStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._prepare_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'PrepareRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _prepare_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/prepare'} # type: ignore + + async def begin_prepare( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.PrepareRequest"] = None, + **kwargs + ) -> AsyncLROPoller["models.OperationStatus"]: + """Initiates prepare for the set of resources included in the request body. The prepare operation + is on the moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a + successful completion the moveResource moveState do a transition to MovePending. To aid the + user to prerequisite the operation the client can call operation with validateOnly property set + to true. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.PrepareRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._prepare_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_prepare.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/prepare'} # type: ignore + + async def _initiate_move_initial( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.ResourceMoveRequest"] = None, + **kwargs + ) -> Optional["models.OperationStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._initiate_move_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceMoveRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _initiate_move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/initiateMove'} # type: ignore + + async def begin_initiate_move( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.ResourceMoveRequest"] = None, + **kwargs + ) -> AsyncLROPoller["models.OperationStatus"]: + """Moves the set of resources included in the request body. The move operation is triggered after + the moveResources are in the moveState 'MovePending' or 'MoveFailed', on a successful + completion the moveResource moveState do a transition to CommitPending. To aid the user to + prerequisite the operation the client can call operation with validateOnly property set to + true. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.ResourceMoveRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._initiate_move_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_initiate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/initiateMove'} # type: ignore + + async def _commit_initial( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.CommitRequest"] = None, + **kwargs + ) -> Optional["models.OperationStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._commit_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'CommitRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _commit_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/commit'} # type: ignore + + async def begin_commit( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.CommitRequest"] = None, + **kwargs + ) -> AsyncLROPoller["models.OperationStatus"]: + """Commits the set of resources included in the request body. The commit operation is triggered on + the moveResources in the moveState 'CommitPending' or 'CommitFailed', on a successful + completion the moveResource moveState do a transition to Committed. To aid the user to + prerequisite the operation the client can call operation with validateOnly property set to + true. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.CommitRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._commit_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_commit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/commit'} # type: ignore + + async def _discard_initial( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.DiscardRequest"] = None, + **kwargs + ) -> Optional["models.OperationStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._discard_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DiscardRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _discard_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/discard'} # type: ignore + + async def begin_discard( + self, + resource_group_name: str, + move_collection_name: str, + body: Optional["models.DiscardRequest"] = None, + **kwargs + ) -> AsyncLROPoller["models.OperationStatus"]: + """Discards the set of resources included in the request body. The discard operation is triggered + on the moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful + completion the moveResource moveState do a transition to MovePending. To aid the user to + prerequisite the operation the client can call operation with validateOnly property set to + true. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.DiscardRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._discard_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_discard.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/discard'} # type: ignore + + async def _resolve_dependencies_initial( + self, + resource_group_name: str, + move_collection_name: str, + **kwargs + ) -> Optional["models.OperationStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self._resolve_dependencies_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _resolve_dependencies_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/resolveDependencies'} # type: ignore + + async def begin_resolve_dependencies( + self, + resource_group_name: str, + move_collection_name: str, + **kwargs + ) -> AsyncLROPoller["models.OperationStatus"]: + """Computes, resolves and validate the dependencies of the moveResources in the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._resolve_dependencies_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_resolve_dependencies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/resolveDependencies'} # type: ignore + + def list_move_collections_by_subscription( + self, + **kwargs + ) -> AsyncIterable["models.MoveCollectionResultList"]: + """Get all Move Collections. + + Get all the Move Collections in the subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MoveCollectionResultList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~region_move_service_api.models.MoveCollectionResultList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollectionResultList"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_move_collections_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MoveCollectionResultList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_move_collections_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Migrate/moveCollections'} # type: ignore + + def list_move_collections_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.MoveCollectionResultList"]: + """Get all Move Collections. + + Get all the Move Collections in the resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MoveCollectionResultList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~region_move_service_api.models.MoveCollectionResultList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollectionResultList"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_move_collections_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MoveCollectionResultList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_move_collections_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections'} # type: ignore diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_move_resources_operations_async.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_move_resources_operations_async.py new file mode 100644 index 0000000000000..669925e716867 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_move_resources_operations_async.py @@ -0,0 +1,420 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MoveResourcesOperations: + """MoveResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~region_move_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + move_collection_name: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.MoveResourceCollection"]: + """Lists the Move Resources in the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param filter: The filter to apply on the operation. For example, you can use + $filter=Properties/ProvisioningState eq 'Succeeded'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MoveResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~region_move_service_api.models.MoveResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveResourceCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MoveResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + move_collection_name: str, + move_resource_name: str, + body: Optional["models.MoveResource"] = None, + **kwargs + ) -> Optional["models.MoveResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.MoveResource"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + 'moveResourceName': self._serialize.url("move_resource_name", move_resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'MoveResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MoveResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + move_collection_name: str, + move_resource_name: str, + body: Optional["models.MoveResource"] = None, + **kwargs + ) -> AsyncLROPoller["models.MoveResource"]: + """Creates or updates a Move Resource in the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param move_resource_name: The Move Resource Name. + :type move_resource_name: str + :param body: + :type body: ~region_move_service_api.models.MoveResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MoveResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~region_move_service_api.models.MoveResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + move_resource_name=move_resource_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MoveResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + move_collection_name: str, + move_resource_name: str, + **kwargs + ) -> Optional["models.OperationStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + 'moveResourceName': self._serialize.url("move_resource_name", move_resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + move_collection_name: str, + move_resource_name: str, + **kwargs + ) -> AsyncLROPoller["models.OperationStatus"]: + """Deletes a Move Resource from the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param move_resource_name: The Move Resource Name. + :type move_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + move_resource_name=move_resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + move_collection_name: str, + move_resource_name: str, + **kwargs + ) -> "models.MoveResource": + """Gets the Move Resource. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param move_resource_name: The Move Resource Name. + :type move_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MoveResource, or the result of cls(response) + :rtype: ~region_move_service_api.models.MoveResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveResource"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + 'moveResourceName': self._serialize.url("move_resource_name", move_resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MoveResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_operations_discovery_operations_async.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_operations_discovery_operations_async.py new file mode 100644 index 0000000000000..8932127905f90 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_operations_discovery_operations_async.py @@ -0,0 +1,84 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationsDiscoveryOperations: + """OperationsDiscoveryOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~region_move_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + **kwargs + ) -> "models.OperationsDiscoveryCollection": + """get. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationsDiscoveryCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.OperationsDiscoveryCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationsDiscoveryCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationsDiscoveryCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Migrate/operations'} # type: ignore diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_unresolved_dependencies_operations_async.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_unresolved_dependencies_operations_async.py new file mode 100644 index 0000000000000..d0c00227bed66 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/_unresolved_dependencies_operations_async.py @@ -0,0 +1,96 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UnresolvedDependenciesOperations: + """UnresolvedDependenciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~region_move_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + move_collection_name: str, + **kwargs + ) -> "models.UnresolvedDependencyCollection": + """Gets a list of unresolved dependencies. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UnresolvedDependencyCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.UnresolvedDependencyCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.UnresolvedDependencyCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UnresolvedDependencyCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/unresolvedDependencies'} # type: ignore diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/__init__.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/__init__.py new file mode 100644 index 0000000000000..399942e798064 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/__init__.py @@ -0,0 +1,206 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AffectedMoveResource + from ._models_py3 import AutomaticResolutionProperties + from ._models_py3 import AvailabilitySetResourceSettings + from ._models_py3 import AzureResourceReference + from ._models_py3 import CloudErrorBody + from ._models_py3 import CommitRequest + from ._models_py3 import DiscardRequest + from ._models_py3 import Display + from ._models_py3 import Identity + from ._models_py3 import JobStatus + from ._models_py3 import LBBackendAddressPoolResourceSettings + from ._models_py3 import LBFrontendIPConfigurationResourceSettings + from ._models_py3 import LoadBalancerBackendAddressPoolReference + from ._models_py3 import LoadBalancerNatRuleReference + from ._models_py3 import LoadBalancerResourceSettings + from ._models_py3 import ManualResolutionProperties + from ._models_py3 import MoveCollection + from ._models_py3 import MoveCollectionProperties + from ._models_py3 import MoveCollectionResultList + from ._models_py3 import MoveErrorInfo + from ._models_py3 import MoveResource + from ._models_py3 import MoveResourceCollection + from ._models_py3 import MoveResourceDependency + from ._models_py3 import MoveResourceDependencyOverride + from ._models_py3 import MoveResourceError + from ._models_py3 import MoveResourceErrorBody + from ._models_py3 import MoveResourceFilter + from ._models_py3 import MoveResourceFilterProperties + from ._models_py3 import MoveResourceProperties + from ._models_py3 import MoveResourcePropertiesErrors + from ._models_py3 import MoveResourcePropertiesMoveStatus + from ._models_py3 import MoveResourcePropertiesSourceResourceSettings + from ._models_py3 import MoveResourceStatus + from ._models_py3 import NetworkInterfaceResourceSettings + from ._models_py3 import NetworkSecurityGroupResourceSettings + from ._models_py3 import NicIpConfigurationResourceSettings + from ._models_py3 import NsgSecurityRule + from ._models_py3 import OperationErrorAdditionalInfo + from ._models_py3 import OperationStatus + from ._models_py3 import OperationStatusError + from ._models_py3 import OperationsDiscovery + from ._models_py3 import OperationsDiscoveryCollection + from ._models_py3 import PrepareRequest + from ._models_py3 import ProxyResourceReference + from ._models_py3 import PublicIPAddressResourceSettings + from ._models_py3 import ResourceGroupResourceSettings + from ._models_py3 import ResourceMoveRequest + from ._models_py3 import ResourceSettings + from ._models_py3 import SqlDatabaseResourceSettings + from ._models_py3 import SqlElasticPoolResourceSettings + from ._models_py3 import SqlServerResourceSettings + from ._models_py3 import SubnetReference + from ._models_py3 import SubnetResourceSettings + from ._models_py3 import UnresolvedDependency + from ._models_py3 import UnresolvedDependencyCollection + from ._models_py3 import UpdateMoveCollectionRequest + from ._models_py3 import VirtualMachineResourceSettings + from ._models_py3 import VirtualNetworkResourceSettings +except (SyntaxError, ImportError): + from ._models import AffectedMoveResource # type: ignore + from ._models import AutomaticResolutionProperties # type: ignore + from ._models import AvailabilitySetResourceSettings # type: ignore + from ._models import AzureResourceReference # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import CommitRequest # type: ignore + from ._models import DiscardRequest # type: ignore + from ._models import Display # type: ignore + from ._models import Identity # type: ignore + from ._models import JobStatus # type: ignore + from ._models import LBBackendAddressPoolResourceSettings # type: ignore + from ._models import LBFrontendIPConfigurationResourceSettings # type: ignore + from ._models import LoadBalancerBackendAddressPoolReference # type: ignore + from ._models import LoadBalancerNatRuleReference # type: ignore + from ._models import LoadBalancerResourceSettings # type: ignore + from ._models import ManualResolutionProperties # type: ignore + from ._models import MoveCollection # type: ignore + from ._models import MoveCollectionProperties # type: ignore + from ._models import MoveCollectionResultList # type: ignore + from ._models import MoveErrorInfo # type: ignore + from ._models import MoveResource # type: ignore + from ._models import MoveResourceCollection # type: ignore + from ._models import MoveResourceDependency # type: ignore + from ._models import MoveResourceDependencyOverride # type: ignore + from ._models import MoveResourceError # type: ignore + from ._models import MoveResourceErrorBody # type: ignore + from ._models import MoveResourceFilter # type: ignore + from ._models import MoveResourceFilterProperties # type: ignore + from ._models import MoveResourceProperties # type: ignore + from ._models import MoveResourcePropertiesErrors # type: ignore + from ._models import MoveResourcePropertiesMoveStatus # type: ignore + from ._models import MoveResourcePropertiesSourceResourceSettings # type: ignore + from ._models import MoveResourceStatus # type: ignore + from ._models import NetworkInterfaceResourceSettings # type: ignore + from ._models import NetworkSecurityGroupResourceSettings # type: ignore + from ._models import NicIpConfigurationResourceSettings # type: ignore + from ._models import NsgSecurityRule # type: ignore + from ._models import OperationErrorAdditionalInfo # type: ignore + from ._models import OperationStatus # type: ignore + from ._models import OperationStatusError # type: ignore + from ._models import OperationsDiscovery # type: ignore + from ._models import OperationsDiscoveryCollection # type: ignore + from ._models import PrepareRequest # type: ignore + from ._models import ProxyResourceReference # type: ignore + from ._models import PublicIPAddressResourceSettings # type: ignore + from ._models import ResourceGroupResourceSettings # type: ignore + from ._models import ResourceMoveRequest # type: ignore + from ._models import ResourceSettings # type: ignore + from ._models import SqlDatabaseResourceSettings # type: ignore + from ._models import SqlElasticPoolResourceSettings # type: ignore + from ._models import SqlServerResourceSettings # type: ignore + from ._models import SubnetReference # type: ignore + from ._models import SubnetResourceSettings # type: ignore + from ._models import UnresolvedDependency # type: ignore + from ._models import UnresolvedDependencyCollection # type: ignore + from ._models import UpdateMoveCollectionRequest # type: ignore + from ._models import VirtualMachineResourceSettings # type: ignore + from ._models import VirtualNetworkResourceSettings # type: ignore + +from ._region_move_service_api_enums import ( + DependencyType, + MoveResourceInputType, + MoveState, + ProvisioningState, + ResolutionType, + ResourceIdentityType, + TargetAvailabilityZone, + ZoneRedundant, +) + +__all__ = [ + 'AffectedMoveResource', + 'AutomaticResolutionProperties', + 'AvailabilitySetResourceSettings', + 'AzureResourceReference', + 'CloudErrorBody', + 'CommitRequest', + 'DiscardRequest', + 'Display', + 'Identity', + 'JobStatus', + 'LBBackendAddressPoolResourceSettings', + 'LBFrontendIPConfigurationResourceSettings', + 'LoadBalancerBackendAddressPoolReference', + 'LoadBalancerNatRuleReference', + 'LoadBalancerResourceSettings', + 'ManualResolutionProperties', + 'MoveCollection', + 'MoveCollectionProperties', + 'MoveCollectionResultList', + 'MoveErrorInfo', + 'MoveResource', + 'MoveResourceCollection', + 'MoveResourceDependency', + 'MoveResourceDependencyOverride', + 'MoveResourceError', + 'MoveResourceErrorBody', + 'MoveResourceFilter', + 'MoveResourceFilterProperties', + 'MoveResourceProperties', + 'MoveResourcePropertiesErrors', + 'MoveResourcePropertiesMoveStatus', + 'MoveResourcePropertiesSourceResourceSettings', + 'MoveResourceStatus', + 'NetworkInterfaceResourceSettings', + 'NetworkSecurityGroupResourceSettings', + 'NicIpConfigurationResourceSettings', + 'NsgSecurityRule', + 'OperationErrorAdditionalInfo', + 'OperationStatus', + 'OperationStatusError', + 'OperationsDiscovery', + 'OperationsDiscoveryCollection', + 'PrepareRequest', + 'ProxyResourceReference', + 'PublicIPAddressResourceSettings', + 'ResourceGroupResourceSettings', + 'ResourceMoveRequest', + 'ResourceSettings', + 'SqlDatabaseResourceSettings', + 'SqlElasticPoolResourceSettings', + 'SqlServerResourceSettings', + 'SubnetReference', + 'SubnetResourceSettings', + 'UnresolvedDependency', + 'UnresolvedDependencyCollection', + 'UpdateMoveCollectionRequest', + 'VirtualMachineResourceSettings', + 'VirtualNetworkResourceSettings', + 'DependencyType', + 'MoveResourceInputType', + 'MoveState', + 'ProvisioningState', + 'ResolutionType', + 'ResourceIdentityType', + 'TargetAvailabilityZone', + 'ZoneRedundant', +] diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_models.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_models.py new file mode 100644 index 0000000000000..6166b5c010524 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_models.py @@ -0,0 +1,2009 @@ +# 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 msrest.serialization + + +class AffectedMoveResource(msrest.serialization.Model): + """The RP custom operation error info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The affected move resource id. + :vartype id: str + :ivar source_id: The affected move resource source id. + :vartype source_id: str + :ivar move_resources: The affected move resources. + :vartype move_resources: list[~region_move_service_api.models.AffectedMoveResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'source_id': {'readonly': True}, + 'move_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'move_resources': {'key': 'moveResources', 'type': '[AffectedMoveResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(AffectedMoveResource, self).__init__(**kwargs) + self.id = None + self.source_id = None + self.move_resources = None + + +class AutomaticResolutionProperties(msrest.serialization.Model): + """Defines the properties for automatic resolution. + + :param move_resource_id: Gets the MoveResource ARM ID of + the dependent resource if the resolution type is Automatic. + :type move_resource_id: str + """ + + _attribute_map = { + 'move_resource_id': {'key': 'moveResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutomaticResolutionProperties, self).__init__(**kwargs) + self.move_resource_id = kwargs.get('move_resource_id', None) + + +class ResourceSettings(msrest.serialization.Model): + """Gets or sets the resource settings. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AvailabilitySetResourceSettings, VirtualMachineResourceSettings, LoadBalancerResourceSettings, NetworkInterfaceResourceSettings, NetworkSecurityGroupResourceSettings, PublicIPAddressResourceSettings, VirtualNetworkResourceSettings, SqlServerResourceSettings, SqlDatabaseResourceSettings, SqlElasticPoolResourceSettings, MoveResourcePropertiesSourceResourceSettings, ResourceGroupResourceSettings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + } + + _subtype_map = { + 'resource_type': {'Microsoft.Compute/availabilitySets': 'AvailabilitySetResourceSettings', 'Microsoft.Compute/virtualMachines': 'VirtualMachineResourceSettings', 'Microsoft.Network/loadBalancers': 'LoadBalancerResourceSettings', 'Microsoft.Network/networkInterfaces': 'NetworkInterfaceResourceSettings', 'Microsoft.Network/networkSecurityGroups': 'NetworkSecurityGroupResourceSettings', 'Microsoft.Network/publicIPAddresses': 'PublicIPAddressResourceSettings', 'Microsoft.Network/virtualNetworks': 'VirtualNetworkResourceSettings', 'Microsoft.Sql/servers': 'SqlServerResourceSettings', 'Microsoft.Sql/servers/databases': 'SqlDatabaseResourceSettings', 'Microsoft.Sql/servers/elasticPools': 'SqlElasticPoolResourceSettings', 'MoveResourceProperties-sourceResourceSettings': 'MoveResourcePropertiesSourceResourceSettings', 'resourceGroups': 'ResourceGroupResourceSettings'} + } + + def __init__( + self, + **kwargs + ): + super(ResourceSettings, self).__init__(**kwargs) + self.resource_type = None + self.target_resource_name = kwargs['target_resource_name'] + + +class AvailabilitySetResourceSettings(ResourceSettings): + """Gets or sets the availability set resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param fault_domain: Gets or sets the target fault domain. + :type fault_domain: int + :param update_domain: Gets or sets the target update domain. + :type update_domain: int + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + 'fault_domain': {'minimum': 1}, + 'update_domain': {'maximum': 20, 'minimum': 1}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'fault_domain': {'key': 'faultDomain', 'type': 'int'}, + 'update_domain': {'key': 'updateDomain', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailabilitySetResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Compute/availabilitySets' + self.fault_domain = kwargs.get('fault_domain', None) + self.update_domain = kwargs.get('update_domain', None) + + +class AzureResourceReference(msrest.serialization.Model): + """Defines reference to an Azure resource. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureResourceReference, self).__init__(**kwargs) + self.source_arm_resource_id = kwargs['source_arm_resource_id'] + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~region_move_service_api.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class CommitRequest(msrest.serialization.Model): + """Defines the request body for commit operation. + + All required parameters must be populated in order to send to Azure. + + :param validate_only: Gets or sets a value indicating whether the operation needs to only run + pre-requisite. + :type validate_only: bool + :param move_resources: Required. Gets or sets the list of resource Id's, by default it accepts + move resource id's unless the input type is switched via moveResourceInputType property. + :type move_resources: list[str] + :param move_resource_input_type: Defines the move resource input type. Possible values include: + "MoveResourceId", "MoveResourceSourceId". + :type move_resource_input_type: str or ~region_move_service_api.models.MoveResourceInputType + """ + + _validation = { + 'move_resources': {'required': True}, + } + + _attribute_map = { + 'validate_only': {'key': 'validateOnly', 'type': 'bool'}, + 'move_resources': {'key': 'moveResources', 'type': '[str]'}, + 'move_resource_input_type': {'key': 'moveResourceInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitRequest, self).__init__(**kwargs) + self.validate_only = kwargs.get('validate_only', None) + self.move_resources = kwargs['move_resources'] + self.move_resource_input_type = kwargs.get('move_resource_input_type', None) + + +class DiscardRequest(msrest.serialization.Model): + """Defines the request body for discard operation. + + All required parameters must be populated in order to send to Azure. + + :param validate_only: Gets or sets a value indicating whether the operation needs to only run + pre-requisite. + :type validate_only: bool + :param move_resources: Required. Gets or sets the list of resource Id's, by default it accepts + move resource id's unless the input type is switched via moveResourceInputType property. + :type move_resources: list[str] + :param move_resource_input_type: Defines the move resource input type. Possible values include: + "MoveResourceId", "MoveResourceSourceId". + :type move_resource_input_type: str or ~region_move_service_api.models.MoveResourceInputType + """ + + _validation = { + 'move_resources': {'required': True}, + } + + _attribute_map = { + 'validate_only': {'key': 'validateOnly', 'type': 'bool'}, + 'move_resources': {'key': 'moveResources', 'type': '[str]'}, + 'move_resource_input_type': {'key': 'moveResourceInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiscardRequest, self).__init__(**kwargs) + self.validate_only = kwargs.get('validate_only', None) + self.move_resources = kwargs['move_resources'] + self.move_resource_input_type = kwargs.get('move_resource_input_type', None) + + +class Display(msrest.serialization.Model): + """Contains the localized display information for this particular operation / action. These +value will be used by several clients for +(1) custom role definitions for RBAC; +(2) complex query filters for the event service; and +(3) audit history / records for management operations. + + :param provider: Gets or sets the provider. + The localized friendly form of the resource provider name – it is expected to also + include the publisher/company responsible. + It should use Title Casing and begin with "Microsoft" for 1st party services. + e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.". + :type provider: str + :param resource: Gets or sets the resource. + The localized friendly form of the resource related to this action/operation – it + should match the public documentation for the resource provider. + It should use Title Casing. + This value should be unique for a particular URL type (e.g. nested types should *not* + reuse their parent’s display.resource field) + e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM Sizes" + or "Scheduler Jobs". + :type resource: str + :param operation: Gets or sets the operation. + The localized friendly name for the operation, as it should be shown to the user. + It should be concise (to fit in drop downs) but clear (i.e. self-documenting). + It should use Title Casing. + Prescriptive guidance: Read Create or Update Delete 'ActionName'. + :type operation: str + :param description: Gets or sets the description. + The localized friendly description for the operation, as it should be shown to the + user. + It should be thorough, yet concise – it will be used in tool tips and detailed views. + Prescriptive guidance for namespace: + Read any 'display.provider' resource + Create or Update any 'display.provider' resource + Delete any 'display.provider' resource + Perform any other action on any 'display.provider' resource + Prescriptive guidance for namespace: + Read any 'display.resource' Create or Update any 'display.resource' Delete any + 'display.resource' 'ActionName' any 'display.resources'. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Display, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class Identity(msrest.serialization.Model): + """Defines the MSI properties of the Move Collection. + + :param type: The type of identity used for the region move service. Possible values include: + "None", "SystemAssigned", "UserAssigned". + :type type: str or ~region_move_service_api.models.ResourceIdentityType + :param principal_id: Gets or sets the principal id. + :type principal_id: str + :param tenant_id: Gets or sets the tenant id. + :type tenant_id: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class JobStatus(msrest.serialization.Model): + """Defines the job status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar job_name: Defines the job name. Default value: "InitialSync". + :vartype job_name: str + :param job_progress: Gets or sets the monitoring job percentage. + :type job_progress: str + """ + + _validation = { + 'job_name': {'constant': True}, + } + + _attribute_map = { + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'job_progress': {'key': 'jobProgress', 'type': 'str'}, + } + + job_name = "InitialSync" + + def __init__( + self, + **kwargs + ): + super(JobStatus, self).__init__(**kwargs) + self.job_progress = kwargs.get('job_progress', None) + + +class LBBackendAddressPoolResourceSettings(msrest.serialization.Model): + """Defines load balancer backend address pool properties. + + :param name: Gets or sets the backend address pool name. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LBBackendAddressPoolResourceSettings, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class LBFrontendIPConfigurationResourceSettings(msrest.serialization.Model): + """Defines load balancer frontend IP configuration properties. + + :param name: Gets or sets the frontend IP configuration name. + :type name: str + :param private_ip_address: Gets or sets the IP address of the Load Balancer.This is only + specified if a specific + private IP address shall be allocated from the subnet specified in subnetRef. + :type private_ip_address: str + :param private_ip_allocation_method: Gets or sets PrivateIP allocation method (Static/Dynamic). + :type private_ip_allocation_method: str + :param subnet: Defines reference to a proxy resource. + :type subnet: ~region_move_service_api.models.ProxyResourceReference + :param zones: Gets or sets the csv list of zones. + :type zones: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'privateIpAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ProxyResourceReference'}, + 'zones': {'key': 'zones', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LBFrontendIPConfigurationResourceSettings, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.subnet = kwargs.get('subnet', None) + self.zones = kwargs.get('zones', None) + + +class ProxyResourceReference(AzureResourceReference): + """Defines reference to a proxy resource. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + :param name: Gets the name of the proxy resource on the target side. + :type name: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResourceReference, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class LoadBalancerBackendAddressPoolReference(ProxyResourceReference): + """Defines reference to load balancer backend address pools. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + :param name: Gets the name of the proxy resource on the target side. + :type name: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerBackendAddressPoolReference, self).__init__(**kwargs) + + +class LoadBalancerNatRuleReference(ProxyResourceReference): + """Defines reference to load balancer NAT rules. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + :param name: Gets the name of the proxy resource on the target side. + :type name: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerNatRuleReference, self).__init__(**kwargs) + + +class LoadBalancerResourceSettings(ResourceSettings): + """Defines the load balancer resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param sku: Gets or sets load balancer sku (Basic/Standard). + :type sku: str + :param frontend_ip_configurations: Gets or sets the frontend IP configurations of the load + balancer. + :type frontend_ip_configurations: + list[~region_move_service_api.models.LBFrontendIPConfigurationResourceSettings] + :param backend_address_pools: Gets or sets the backend address pools of the load balancer. + :type backend_address_pools: + list[~region_move_service_api.models.LBBackendAddressPoolResourceSettings] + :param zones: Gets or sets the csv list of zones common for all frontend IP configurations. + Note this is given + precedence only if frontend IP configurations settings are not present. + :type zones: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'frontend_ip_configurations': {'key': 'frontendIPConfigurations', 'type': '[LBFrontendIPConfigurationResourceSettings]'}, + 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[LBBackendAddressPoolResourceSettings]'}, + 'zones': {'key': 'zones', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Network/loadBalancers' + self.sku = kwargs.get('sku', None) + self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) + self.backend_address_pools = kwargs.get('backend_address_pools', None) + self.zones = kwargs.get('zones', None) + + +class ManualResolutionProperties(msrest.serialization.Model): + """Defines the properties for manual resolution. + + :param target_id: Gets or sets the target resource ARM ID of the dependent resource if the + resource type is Manual. + :type target_id: str + """ + + _attribute_map = { + 'target_id': {'key': 'targetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManualResolutionProperties, self).__init__(**kwargs) + self.target_id = kwargs.get('target_id', None) + + +class MoveCollection(msrest.serialization.Model): + """Define the move collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: The geo-location where the resource lives. + :type location: str + :param identity: Defines the MSI properties of the Move Collection. + :type identity: ~region_move_service_api.models.Identity + :param properties: Defines the move collection properties. + :type properties: ~region_move_service_api.models.MoveCollectionProperties + """ + + _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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'properties': {'key': 'properties', 'type': 'MoveCollectionProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveCollection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) + self.properties = kwargs.get('properties', None) + + +class MoveCollectionProperties(msrest.serialization.Model): + """Defines the move collection properties. + + 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 source_region: Required. Gets or sets the source region. + :type source_region: str + :param target_region: Required. Gets or sets the target region. + :type target_region: str + :ivar provisioning_state: Defines the provisioning states. Possible values include: + "Succeeded", "Updating", "Creating", "Failed". + :vartype provisioning_state: str or ~region_move_service_api.models.ProvisioningState + """ + + _validation = { + 'source_region': {'required': True}, + 'target_region': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'source_region': {'key': 'sourceRegion', 'type': 'str'}, + 'target_region': {'key': 'targetRegion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveCollectionProperties, self).__init__(**kwargs) + self.source_region = kwargs['source_region'] + self.target_region = kwargs['target_region'] + self.provisioning_state = None + + +class MoveCollectionResultList(msrest.serialization.Model): + """Defines the collection of move collections. + + :param value: Gets the list of move collections. + :type value: list[~region_move_service_api.models.MoveCollection] + :param next_link: Gets the value of next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MoveCollection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveCollectionResultList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class MoveErrorInfo(msrest.serialization.Model): + """The move custom error info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar move_resources: The affected move resources. + :vartype move_resources: list[~region_move_service_api.models.AffectedMoveResource] + """ + + _validation = { + 'move_resources': {'readonly': True}, + } + + _attribute_map = { + 'move_resources': {'key': 'moveResources', 'type': '[AffectedMoveResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveErrorInfo, self).__init__(**kwargs) + self.move_resources = None + + +class MoveResource(msrest.serialization.Model): + """Defines the move resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Defines the move resource properties. + :type properties: ~region_move_service_api.models.MoveResourceProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'MoveResourceProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class MoveResourceCollection(msrest.serialization.Model): + """Defines the collection of move resources. + + :param value: Gets the list of move resources. + :type value: list[~region_move_service_api.models.MoveResource] + :param next_link: Gets the value of next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MoveResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class MoveResourceDependency(msrest.serialization.Model): + """Defines the dependency of the move resource. + + :param id: Gets the source ARM ID of the dependent resource. + :type id: str + :param resolution_status: Gets the dependency resolution status. + :type resolution_status: str + :param resolution_type: Defines the resolution type. Possible values include: "Manual", + "Automatic". + :type resolution_type: str or ~region_move_service_api.models.ResolutionType + :param dependency_type: Defines the dependency type. Possible values include: + "RequiredForPrepare", "RequiredForMove". + :type dependency_type: str or ~region_move_service_api.models.DependencyType + :param manual_resolution: Defines the properties for manual resolution. + :type manual_resolution: ~region_move_service_api.models.ManualResolutionProperties + :param automatic_resolution: Defines the properties for automatic resolution. + :type automatic_resolution: ~region_move_service_api.models.AutomaticResolutionProperties + :param is_optional: Gets or sets a value indicating whether the dependency is optional. + :type is_optional: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'resolution_status': {'key': 'resolutionStatus', 'type': 'str'}, + 'resolution_type': {'key': 'resolutionType', 'type': 'str'}, + 'dependency_type': {'key': 'dependencyType', 'type': 'str'}, + 'manual_resolution': {'key': 'manualResolution', 'type': 'ManualResolutionProperties'}, + 'automatic_resolution': {'key': 'automaticResolution', 'type': 'AutomaticResolutionProperties'}, + 'is_optional': {'key': 'isOptional', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceDependency, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.resolution_status = kwargs.get('resolution_status', None) + self.resolution_type = kwargs.get('resolution_type', None) + self.dependency_type = kwargs.get('dependency_type', None) + self.manual_resolution = kwargs.get('manual_resolution', None) + self.automatic_resolution = kwargs.get('automatic_resolution', None) + self.is_optional = kwargs.get('is_optional', None) + + +class MoveResourceDependencyOverride(msrest.serialization.Model): + """Defines the dependency override of the move resource. + + :param id: Gets or sets the ARM ID of the dependent resource. + :type id: str + :param target_id: Gets or sets the resource ARM id of either the MoveResource or the resource + ARM ID of + the dependent resource. + :type target_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceDependencyOverride, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.target_id = kwargs.get('target_id', None) + + +class MoveResourceError(msrest.serialization.Model): + """An error response from the azure region move service. + + :param properties: The move resource error body. + :type properties: ~region_move_service_api.models.MoveResourceErrorBody + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'MoveResourceErrorBody'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceError, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class MoveResourceErrorBody(msrest.serialization.Model): + """An error response from the Azure Migrate service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~region_move_service_api.models.MoveResourceErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[MoveResourceErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class MoveResourceFilter(msrest.serialization.Model): + """Move resource filter. + + :param properties: + :type properties: ~region_move_service_api.models.MoveResourceFilterProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'MoveResourceFilterProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceFilter, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class MoveResourceFilterProperties(msrest.serialization.Model): + """MoveResourceFilterProperties. + + :param provisioning_state: The provisioning state. + :type provisioning_state: str + """ + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceFilterProperties, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class MoveResourceProperties(msrest.serialization.Model): + """Defines the move resource properties. + + 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. + + :ivar provisioning_state: Defines the provisioning states. Possible values include: + "Succeeded", "Updating", "Creating", "Failed". + :vartype provisioning_state: str or ~region_move_service_api.models.ProvisioningState + :param source_id: Required. Gets or sets the Source ARM Id of the resource. + :type source_id: str + :ivar target_id: Gets or sets the Target ARM Id of the resource. + :vartype target_id: str + :param existing_target_id: Gets or sets the existing target ARM Id of the resource. + :type existing_target_id: str + :param resource_settings: Gets or sets the resource settings. + :type resource_settings: ~region_move_service_api.models.ResourceSettings + :ivar source_resource_settings: Gets or sets the source resource settings. + :vartype source_resource_settings: ~region_move_service_api.models.ResourceSettings + :ivar move_status: Defines the move resource status. + :vartype move_status: ~region_move_service_api.models.MoveResourceStatus + :ivar depends_on: Gets or sets the move resource dependencies. + :vartype depends_on: list[~region_move_service_api.models.MoveResourceDependency] + :param depends_on_overrides: Gets or sets the move resource dependencies overrides. + :type depends_on_overrides: + list[~region_move_service_api.models.MoveResourceDependencyOverride] + :ivar errors: Defines the move resource errors. + :vartype errors: ~region_move_service_api.models.MoveResourceError + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'source_id': {'required': True}, + 'target_id': {'readonly': True}, + 'source_resource_settings': {'readonly': True}, + 'move_status': {'readonly': True}, + 'depends_on': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + 'existing_target_id': {'key': 'existingTargetId', 'type': 'str'}, + 'resource_settings': {'key': 'resourceSettings', 'type': 'ResourceSettings'}, + 'source_resource_settings': {'key': 'sourceResourceSettings', 'type': 'ResourceSettings'}, + 'move_status': {'key': 'moveStatus', 'type': 'MoveResourceStatus'}, + 'depends_on': {'key': 'dependsOn', 'type': '[MoveResourceDependency]'}, + 'depends_on_overrides': {'key': 'dependsOnOverrides', 'type': '[MoveResourceDependencyOverride]'}, + 'errors': {'key': 'errors', 'type': 'MoveResourceError'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.source_id = kwargs['source_id'] + self.target_id = None + self.existing_target_id = kwargs.get('existing_target_id', None) + self.resource_settings = kwargs.get('resource_settings', None) + self.source_resource_settings = None + self.move_status = None + self.depends_on = None + self.depends_on_overrides = kwargs.get('depends_on_overrides', None) + self.errors = None + + +class MoveResourcePropertiesErrors(MoveResourceError): + """Defines the move resource errors. + + :param properties: The move resource error body. + :type properties: ~region_move_service_api.models.MoveResourceErrorBody + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'MoveResourceErrorBody'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourcePropertiesErrors, self).__init__(**kwargs) + + +class MoveResourceStatus(msrest.serialization.Model): + """Defines the move resource status. + + :param move_state: Defines the MoveResource states. Possible values include: + "AssignmentPending", "PreparePending", "PrepareInProgress", "PrepareFailed", "MovePending", + "MoveInProgress", "MoveFailed", "DiscardInProgress", "DiscardFailed", "CommitPending", + "CommitInProgress", "CommitFailed", "Committed". + :type move_state: str or ~region_move_service_api.models.MoveState + :param job_status: Defines the job status. + :type job_status: ~region_move_service_api.models.JobStatus + :param errors: An error response from the azure region move service. + :type errors: ~region_move_service_api.models.MoveResourceError + :param target_id: Gets the Target ARM Id of the resource. + :type target_id: str + """ + + _attribute_map = { + 'move_state': {'key': 'moveState', 'type': 'str'}, + 'job_status': {'key': 'jobStatus', 'type': 'JobStatus'}, + 'errors': {'key': 'errors', 'type': 'MoveResourceError'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourceStatus, self).__init__(**kwargs) + self.move_state = kwargs.get('move_state', None) + self.job_status = kwargs.get('job_status', None) + self.errors = kwargs.get('errors', None) + self.target_id = kwargs.get('target_id', None) + + +class MoveResourcePropertiesMoveStatus(MoveResourceStatus): + """Defines the move resource status. + + :param move_state: Defines the MoveResource states. Possible values include: + "AssignmentPending", "PreparePending", "PrepareInProgress", "PrepareFailed", "MovePending", + "MoveInProgress", "MoveFailed", "DiscardInProgress", "DiscardFailed", "CommitPending", + "CommitInProgress", "CommitFailed", "Committed". + :type move_state: str or ~region_move_service_api.models.MoveState + :param job_status: Defines the job status. + :type job_status: ~region_move_service_api.models.JobStatus + :param errors: An error response from the azure region move service. + :type errors: ~region_move_service_api.models.MoveResourceError + :param target_id: Gets the Target ARM Id of the resource. + :type target_id: str + """ + + _attribute_map = { + 'move_state': {'key': 'moveState', 'type': 'str'}, + 'job_status': {'key': 'jobStatus', 'type': 'JobStatus'}, + 'errors': {'key': 'errors', 'type': 'MoveResourceError'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourcePropertiesMoveStatus, self).__init__(**kwargs) + + +class MoveResourcePropertiesSourceResourceSettings(ResourceSettings): + """Gets or sets the source resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveResourcePropertiesSourceResourceSettings, self).__init__(**kwargs) + self.resource_type = 'MoveResourceProperties-sourceResourceSettings' + + +class NetworkInterfaceResourceSettings(ResourceSettings): + """Defines the network interface resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param ip_configurations: Gets or sets the IP configurations of the NIC. + :type ip_configurations: + list[~region_move_service_api.models.NicIpConfigurationResourceSettings] + :param enable_accelerated_networking: Gets or sets a value indicating whether accelerated + networking is enabled. + :type enable_accelerated_networking: bool + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'ip_configurations': {'key': 'ipConfigurations', 'type': '[NicIpConfigurationResourceSettings]'}, + 'enable_accelerated_networking': {'key': 'enableAcceleratedNetworking', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Network/networkInterfaces' + self.ip_configurations = kwargs.get('ip_configurations', None) + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + + +class NetworkSecurityGroupResourceSettings(ResourceSettings): + """Defines the NSG resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param security_rules: Gets or sets Security rules of network security group. + :type security_rules: list[~region_move_service_api.models.NsgSecurityRule] + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'security_rules': {'key': 'securityRules', 'type': '[NsgSecurityRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityGroupResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Network/networkSecurityGroups' + self.security_rules = kwargs.get('security_rules', None) + + +class NicIpConfigurationResourceSettings(msrest.serialization.Model): + """Defines NIC IP configuration properties. + + :param name: Gets or sets the IP configuration name. + :type name: str + :param private_ip_address: Gets or sets the private IP address of the network interface IP + Configuration. + :type private_ip_address: str + :param private_ip_allocation_method: Gets or sets the private IP address allocation method. + :type private_ip_allocation_method: str + :param subnet: Defines reference to a proxy resource. + :type subnet: ~region_move_service_api.models.ProxyResourceReference + :param primary: Gets or sets a value indicating whether this IP configuration is the primary. + :type primary: bool + :param load_balancer_backend_address_pools: Gets or sets the references of the load balancer + backend address pools. + :type load_balancer_backend_address_pools: + list[~region_move_service_api.models.ProxyResourceReference] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'privateIpAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ProxyResourceReference'}, + 'primary': {'key': 'primary', 'type': 'bool'}, + 'load_balancer_backend_address_pools': {'key': 'loadBalancerBackendAddressPools', 'type': '[ProxyResourceReference]'}, + } + + def __init__( + self, + **kwargs + ): + super(NicIpConfigurationResourceSettings, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + + +class NsgSecurityRule(msrest.serialization.Model): + """Security Rule data model for Network Security Groups. + + :param name: Gets or sets the Security rule name. + :type name: str + :param access: Gets or sets whether network traffic is allowed or denied. + Possible values are “Allow” and “Deny”. + :type access: str + :param description: Gets or sets a description for this rule. Restricted to 140 chars. + :type description: str + :param destination_address_prefix: Gets or sets destination address prefix. CIDR or source IP + range. + A “*” can also be used to match all source IPs. Default tags such + as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. + :type destination_address_prefix: str + :param destination_port_range: Gets or sets Destination Port or Range. Integer or range between + 0 and 65535. A “*” can also be used to match all ports. + :type destination_port_range: str + :param direction: Gets or sets the direction of the rule.InBound or Outbound. The + direction specifies if rule will be evaluated on incoming or outgoing traffic. + :type direction: str + :param priority: Gets or sets the priority of the rule. The value can be between + 100 and 4096. The priority number must be unique for each rule in the collection. + The lower the priority number, the higher the priority of the rule. + :type priority: int + :param protocol: Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). + :type protocol: str + :param source_address_prefix: Gets or sets source address prefix. CIDR or source IP range. A + “*” can also be used to match all source IPs. Default tags such as ‘VirtualNetwork’, + ‘AzureLoadBalancer’ and ‘Internet’ can also be used. If this is an ingress + rule, specifies where network traffic originates from. + :type source_address_prefix: str + :param source_port_range: Gets or sets Source Port or Range. Integer or range between 0 and + + + #. A “*” can also be used to match all ports. + :type source_port_range: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'access': {'key': 'access', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, + 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, + 'direction': {'key': 'direction', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NsgSecurityRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.access = kwargs.get('access', None) + self.description = kwargs.get('description', None) + self.destination_address_prefix = kwargs.get('destination_address_prefix', None) + self.destination_port_range = kwargs.get('destination_port_range', None) + self.direction = kwargs.get('direction', None) + self.priority = kwargs.get('priority', None) + self.protocol = kwargs.get('protocol', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) + self.source_port_range = kwargs.get('source_port_range', None) + + +class OperationErrorAdditionalInfo(msrest.serialization.Model): + """The operation error info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The error type. + :vartype type: str + :ivar info: The operation error info. + :vartype info: ~region_move_service_api.models.MoveErrorInfo + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'MoveErrorInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class OperationsDiscovery(msrest.serialization.Model): + """Operations discovery class. + + :param name: Gets or sets Name of the API. + The name of the operation being performed on this particular object. It should + match the action name that appears in RBAC / the event service. + Examples of operations include: + + + * Microsoft.Compute/virtualMachine/capture/action + * Microsoft.Compute/virtualMachine/restart/action + * Microsoft.Compute/virtualMachine/write + * Microsoft.Compute/virtualMachine/read + * Microsoft.Compute/virtualMachine/delete + Each action should include, in order: + (1) Resource Provider Namespace + (2) Type hierarchy for which the action applies (e.g. server/databases for a SQL + Azure database) + (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH + on a collection or named value, Write should be used. + If it is a GET, Read should be used. If it is a DELETE, Delete should be used. If it + is a POST, Action should be used. + As a note: all resource providers would need to include the "{Resource Provider + Namespace}/register/action" operation in their response. + This API is used to register for their service, and should include details about the + operation (e.g. a localized name for the resource provider + any special + considerations like PII release). + :type name: str + :param display: Contains the localized display information for this particular operation / + action. These + value will be used by several clients for + (1) custom role definitions for RBAC; + (2) complex query filters for the event service; and + (3) audit history / records for management operations. + :type display: ~region_move_service_api.models.Display + :param origin: Gets or sets Origin. + The intended executor of the operation; governs the display of the operation in the + RBAC UX and the audit logs UX. + Default value is "user,system". + :type origin: str + :param properties: Any object. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'Display'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationsDiscovery, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationsDiscoveryCollection(msrest.serialization.Model): + """Collection of ClientDiscovery details. + + :param value: Gets or sets the ClientDiscovery details. + :type value: list[~region_move_service_api.models.OperationsDiscovery] + :param next_link: Gets or sets the value of next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationsDiscovery]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationsDiscoveryCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class OperationStatus(msrest.serialization.Model): + """Operation status REST resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Operation name. + :vartype name: str + :ivar status: Status of the operation. ARM expects the terminal status to be one of Succeeded/ + Failed/ Canceled. All other values imply that the operation is still running. + :vartype status: str + :ivar start_time: Start time. + :vartype start_time: str + :ivar end_time: End time. + :vartype end_time: str + :ivar error: Error stating all error details for the operation. + :vartype error: ~region_move_service_api.models.OperationStatusError + :ivar properties: Custom data. + :vartype properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationStatusError'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationStatus, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + self.properties = None + + +class OperationStatusError(msrest.serialization.Model): + """Class for operation status errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: list[~region_move_service_api.models.OperationStatusError] + :ivar additional_info: The additional info. + :vartype additional_info: list[~region_move_service_api.models.OperationErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[OperationStatusError]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[OperationErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationStatusError, self).__init__(**kwargs) + self.code = None + self.message = None + self.details = None + self.additional_info = None + + +class PrepareRequest(msrest.serialization.Model): + """Defines the request body for initiate prepare operation. + + All required parameters must be populated in order to send to Azure. + + :param validate_only: Gets or sets a value indicating whether the operation needs to only run + pre-requisite. + :type validate_only: bool + :param move_resources: Required. Gets or sets the list of resource Id's, by default it accepts + move resource id's unless the input type is switched via moveResourceInputType property. + :type move_resources: list[str] + :param move_resource_input_type: Defines the move resource input type. Possible values include: + "MoveResourceId", "MoveResourceSourceId". + :type move_resource_input_type: str or ~region_move_service_api.models.MoveResourceInputType + """ + + _validation = { + 'move_resources': {'required': True}, + } + + _attribute_map = { + 'validate_only': {'key': 'validateOnly', 'type': 'bool'}, + 'move_resources': {'key': 'moveResources', 'type': '[str]'}, + 'move_resource_input_type': {'key': 'moveResourceInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrepareRequest, self).__init__(**kwargs) + self.validate_only = kwargs.get('validate_only', None) + self.move_resources = kwargs['move_resources'] + self.move_resource_input_type = kwargs.get('move_resource_input_type', None) + + +class PublicIPAddressResourceSettings(ResourceSettings): + """Defines the public IP address resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param domain_name_label: Gets or sets the domain name label. + :type domain_name_label: str + :param f_qdn: Gets or sets the fully qualified domain name. + :type f_qdn: str + :param public_ip_allocation_method: Gets or sets public IP allocation method. + :type public_ip_allocation_method: str + :param sku: Gets or sets public IP sku. + :type sku: str + :param zones: Gets or sets public IP zones. + :type zones: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + 'f_qdn': {'key': 'fQDN', 'type': 'str'}, + 'public_ip_allocation_method': {'key': 'publicIpAllocationMethod', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicIPAddressResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Network/publicIPAddresses' + self.domain_name_label = kwargs.get('domain_name_label', None) + self.f_qdn = kwargs.get('f_qdn', None) + self.public_ip_allocation_method = kwargs.get('public_ip_allocation_method', None) + self.sku = kwargs.get('sku', None) + self.zones = kwargs.get('zones', None) + + +class ResourceGroupResourceSettings(ResourceSettings): + """Defines the resource group resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGroupResourceSettings, self).__init__(**kwargs) + self.resource_type = 'resourceGroups' + + +class ResourceMoveRequest(msrest.serialization.Model): + """Defines the request body for resource move operation. + + All required parameters must be populated in order to send to Azure. + + :param validate_only: Gets or sets a value indicating whether the operation needs to only run + pre-requisite. + :type validate_only: bool + :param move_resources: Required. Gets or sets the list of resource Id's, by default it accepts + move resource id's unless the input type is switched via moveResourceInputType property. + :type move_resources: list[str] + :param move_resource_input_type: Defines the move resource input type. Possible values include: + "MoveResourceId", "MoveResourceSourceId". + :type move_resource_input_type: str or ~region_move_service_api.models.MoveResourceInputType + """ + + _validation = { + 'move_resources': {'required': True}, + } + + _attribute_map = { + 'validate_only': {'key': 'validateOnly', 'type': 'bool'}, + 'move_resources': {'key': 'moveResources', 'type': '[str]'}, + 'move_resource_input_type': {'key': 'moveResourceInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceMoveRequest, self).__init__(**kwargs) + self.validate_only = kwargs.get('validate_only', None) + self.move_resources = kwargs['move_resources'] + self.move_resource_input_type = kwargs.get('move_resource_input_type', None) + + +class SqlDatabaseResourceSettings(ResourceSettings): + """Defines the Sql Database resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param zone_redundant: Defines the zone redundant resource setting. Possible values include: + "Enable", "Disable". + :type zone_redundant: str or ~region_move_service_api.models.ZoneRedundant + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlDatabaseResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Sql/servers/databases' + self.zone_redundant = kwargs.get('zone_redundant', None) + + +class SqlElasticPoolResourceSettings(ResourceSettings): + """Defines the Sql ElasticPool resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param zone_redundant: Defines the zone redundant resource setting. Possible values include: + "Enable", "Disable". + :type zone_redundant: str or ~region_move_service_api.models.ZoneRedundant + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlElasticPoolResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Sql/servers/elasticPools' + self.zone_redundant = kwargs.get('zone_redundant', None) + + +class SqlServerResourceSettings(ResourceSettings): + """Defines the SQL Server resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlServerResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Sql/servers' + + +class SubnetReference(ProxyResourceReference): + """Defines reference to subnet. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + :param name: Gets the name of the proxy resource on the target side. + :type name: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubnetReference, self).__init__(**kwargs) + + +class SubnetResourceSettings(msrest.serialization.Model): + """Defines the virtual network subnets resource settings. + + :param name: Gets or sets the Subnet name. + :type name: str + :param address_prefix: Gets or sets address prefix for the subnet. + :type address_prefix: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubnetResourceSettings, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.address_prefix = kwargs.get('address_prefix', None) + + +class UnresolvedDependency(msrest.serialization.Model): + """Unresolved dependency. + + :param count: Gets or sets the count. + :type count: int + :param id: Gets or sets the arm id of the dependency. + :type id: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnresolvedDependency, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.id = kwargs.get('id', None) + + +class UnresolvedDependencyCollection(msrest.serialization.Model): + """Unresolved dependency collection. + + :param value: Gets or sets the list of unresolved dependencies. + :type value: list[~region_move_service_api.models.UnresolvedDependency] + :param next_link: Gets or sets the value of next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnresolvedDependency]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnresolvedDependencyCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class UpdateMoveCollectionRequest(msrest.serialization.Model): + """Defines the request body for updating move collection. + + :param tags: A set of tags. Gets or sets the Resource tags. + :type tags: dict[str, str] + :param identity: Defines the MSI properties of the Move Collection. + :type identity: ~region_move_service_api.models.Identity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__( + self, + **kwargs + ): + super(UpdateMoveCollectionRequest, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + + +class VirtualMachineResourceSettings(ResourceSettings): + """Gets or sets the virtual machine resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param target_availability_zone: Gets or sets the target availability zone. Possible values + include: "1", "2", "3", "NA". + :type target_availability_zone: str or ~region_move_service_api.models.TargetAvailabilityZone + :param target_vm_size: Gets or sets the target virtual machine size. + :type target_vm_size: str + :param target_availability_set_id: Gets or sets the target availability set id for virtual + machines not in an availability set at source. + :type target_availability_set_id: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_availability_zone': {'key': 'targetAvailabilityZone', 'type': 'str'}, + 'target_vm_size': {'key': 'targetVmSize', 'type': 'str'}, + 'target_availability_set_id': {'key': 'targetAvailabilitySetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualMachineResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Compute/virtualMachines' + self.target_availability_zone = kwargs.get('target_availability_zone', None) + self.target_vm_size = kwargs.get('target_vm_size', None) + self.target_availability_set_id = kwargs.get('target_availability_set_id', None) + + +class VirtualNetworkResourceSettings(ResourceSettings): + """Defines the virtual network resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param enable_ddos_protection: Gets or sets a value indicating whether gets or sets whether the + DDOS protection should be switched on. + :type enable_ddos_protection: bool + :param address_space: Gets or sets the address prefixes for the virtual network. + :type address_space: list[str] + :param dns_servers: Gets or sets DHCPOptions that contains an array of DNS servers available to + VMs + deployed in the virtual network. + :type dns_servers: list[str] + :param subnets: Gets or sets List of subnets in a VirtualNetwork. + :type subnets: list[~region_move_service_api.models.SubnetResourceSettings] + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'enable_ddos_protection': {'key': 'enableDdosProtection', 'type': 'bool'}, + 'address_space': {'key': 'addressSpace', 'type': '[str]'}, + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + 'subnets': {'key': 'subnets', 'type': '[SubnetResourceSettings]'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkResourceSettings, self).__init__(**kwargs) + self.resource_type = 'Microsoft.Network/virtualNetworks' + self.enable_ddos_protection = kwargs.get('enable_ddos_protection', None) + self.address_space = kwargs.get('address_space', None) + self.dns_servers = kwargs.get('dns_servers', None) + self.subnets = kwargs.get('subnets', None) diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_models_py3.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_models_py3.py new file mode 100644 index 0000000000000..af2ef2af91afd --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_models_py3.py @@ -0,0 +1,2213 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._region_move_service_api_enums import * + + +class AffectedMoveResource(msrest.serialization.Model): + """The RP custom operation error info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The affected move resource id. + :vartype id: str + :ivar source_id: The affected move resource source id. + :vartype source_id: str + :ivar move_resources: The affected move resources. + :vartype move_resources: list[~region_move_service_api.models.AffectedMoveResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'source_id': {'readonly': True}, + 'move_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'move_resources': {'key': 'moveResources', 'type': '[AffectedMoveResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(AffectedMoveResource, self).__init__(**kwargs) + self.id = None + self.source_id = None + self.move_resources = None + + +class AutomaticResolutionProperties(msrest.serialization.Model): + """Defines the properties for automatic resolution. + + :param move_resource_id: Gets the MoveResource ARM ID of + the dependent resource if the resolution type is Automatic. + :type move_resource_id: str + """ + + _attribute_map = { + 'move_resource_id': {'key': 'moveResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + move_resource_id: Optional[str] = None, + **kwargs + ): + super(AutomaticResolutionProperties, self).__init__(**kwargs) + self.move_resource_id = move_resource_id + + +class ResourceSettings(msrest.serialization.Model): + """Gets or sets the resource settings. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AvailabilitySetResourceSettings, VirtualMachineResourceSettings, LoadBalancerResourceSettings, NetworkInterfaceResourceSettings, NetworkSecurityGroupResourceSettings, PublicIPAddressResourceSettings, VirtualNetworkResourceSettings, SqlServerResourceSettings, SqlDatabaseResourceSettings, SqlElasticPoolResourceSettings, MoveResourcePropertiesSourceResourceSettings, ResourceGroupResourceSettings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + } + + _subtype_map = { + 'resource_type': {'Microsoft.Compute/availabilitySets': 'AvailabilitySetResourceSettings', 'Microsoft.Compute/virtualMachines': 'VirtualMachineResourceSettings', 'Microsoft.Network/loadBalancers': 'LoadBalancerResourceSettings', 'Microsoft.Network/networkInterfaces': 'NetworkInterfaceResourceSettings', 'Microsoft.Network/networkSecurityGroups': 'NetworkSecurityGroupResourceSettings', 'Microsoft.Network/publicIPAddresses': 'PublicIPAddressResourceSettings', 'Microsoft.Network/virtualNetworks': 'VirtualNetworkResourceSettings', 'Microsoft.Sql/servers': 'SqlServerResourceSettings', 'Microsoft.Sql/servers/databases': 'SqlDatabaseResourceSettings', 'Microsoft.Sql/servers/elasticPools': 'SqlElasticPoolResourceSettings', 'MoveResourceProperties-sourceResourceSettings': 'MoveResourcePropertiesSourceResourceSettings', 'resourceGroups': 'ResourceGroupResourceSettings'} + } + + def __init__( + self, + *, + target_resource_name: str, + **kwargs + ): + super(ResourceSettings, self).__init__(**kwargs) + self.resource_type: Optional[str] = None + self.target_resource_name = target_resource_name + + +class AvailabilitySetResourceSettings(ResourceSettings): + """Gets or sets the availability set resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param fault_domain: Gets or sets the target fault domain. + :type fault_domain: int + :param update_domain: Gets or sets the target update domain. + :type update_domain: int + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + 'fault_domain': {'minimum': 1}, + 'update_domain': {'maximum': 20, 'minimum': 1}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'fault_domain': {'key': 'faultDomain', 'type': 'int'}, + 'update_domain': {'key': 'updateDomain', 'type': 'int'}, + } + + def __init__( + self, + *, + target_resource_name: str, + fault_domain: Optional[int] = None, + update_domain: Optional[int] = None, + **kwargs + ): + super(AvailabilitySetResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Compute/availabilitySets' + self.fault_domain = fault_domain + self.update_domain = update_domain + + +class AzureResourceReference(msrest.serialization.Model): + """Defines reference to an Azure resource. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + source_arm_resource_id: str, + **kwargs + ): + super(AzureResourceReference, self).__init__(**kwargs) + self.source_arm_resource_id = source_arm_resource_id + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~region_move_service_api.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class CommitRequest(msrest.serialization.Model): + """Defines the request body for commit operation. + + All required parameters must be populated in order to send to Azure. + + :param validate_only: Gets or sets a value indicating whether the operation needs to only run + pre-requisite. + :type validate_only: bool + :param move_resources: Required. Gets or sets the list of resource Id's, by default it accepts + move resource id's unless the input type is switched via moveResourceInputType property. + :type move_resources: list[str] + :param move_resource_input_type: Defines the move resource input type. Possible values include: + "MoveResourceId", "MoveResourceSourceId". + :type move_resource_input_type: str or ~region_move_service_api.models.MoveResourceInputType + """ + + _validation = { + 'move_resources': {'required': True}, + } + + _attribute_map = { + 'validate_only': {'key': 'validateOnly', 'type': 'bool'}, + 'move_resources': {'key': 'moveResources', 'type': '[str]'}, + 'move_resource_input_type': {'key': 'moveResourceInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + move_resources: List[str], + validate_only: Optional[bool] = None, + move_resource_input_type: Optional[Union[str, "MoveResourceInputType"]] = None, + **kwargs + ): + super(CommitRequest, self).__init__(**kwargs) + self.validate_only = validate_only + self.move_resources = move_resources + self.move_resource_input_type = move_resource_input_type + + +class DiscardRequest(msrest.serialization.Model): + """Defines the request body for discard operation. + + All required parameters must be populated in order to send to Azure. + + :param validate_only: Gets or sets a value indicating whether the operation needs to only run + pre-requisite. + :type validate_only: bool + :param move_resources: Required. Gets or sets the list of resource Id's, by default it accepts + move resource id's unless the input type is switched via moveResourceInputType property. + :type move_resources: list[str] + :param move_resource_input_type: Defines the move resource input type. Possible values include: + "MoveResourceId", "MoveResourceSourceId". + :type move_resource_input_type: str or ~region_move_service_api.models.MoveResourceInputType + """ + + _validation = { + 'move_resources': {'required': True}, + } + + _attribute_map = { + 'validate_only': {'key': 'validateOnly', 'type': 'bool'}, + 'move_resources': {'key': 'moveResources', 'type': '[str]'}, + 'move_resource_input_type': {'key': 'moveResourceInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + move_resources: List[str], + validate_only: Optional[bool] = None, + move_resource_input_type: Optional[Union[str, "MoveResourceInputType"]] = None, + **kwargs + ): + super(DiscardRequest, self).__init__(**kwargs) + self.validate_only = validate_only + self.move_resources = move_resources + self.move_resource_input_type = move_resource_input_type + + +class Display(msrest.serialization.Model): + """Contains the localized display information for this particular operation / action. These +value will be used by several clients for +(1) custom role definitions for RBAC; +(2) complex query filters for the event service; and +(3) audit history / records for management operations. + + :param provider: Gets or sets the provider. + The localized friendly form of the resource provider name – it is expected to also + include the publisher/company responsible. + It should use Title Casing and begin with "Microsoft" for 1st party services. + e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.". + :type provider: str + :param resource: Gets or sets the resource. + The localized friendly form of the resource related to this action/operation – it + should match the public documentation for the resource provider. + It should use Title Casing. + This value should be unique for a particular URL type (e.g. nested types should *not* + reuse their parent’s display.resource field) + e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM Sizes" + or "Scheduler Jobs". + :type resource: str + :param operation: Gets or sets the operation. + The localized friendly name for the operation, as it should be shown to the user. + It should be concise (to fit in drop downs) but clear (i.e. self-documenting). + It should use Title Casing. + Prescriptive guidance: Read Create or Update Delete 'ActionName'. + :type operation: str + :param description: Gets or sets the description. + The localized friendly description for the operation, as it should be shown to the + user. + It should be thorough, yet concise – it will be used in tool tips and detailed views. + Prescriptive guidance for namespace: + Read any 'display.provider' resource + Create or Update any 'display.provider' resource + Delete any 'display.provider' resource + Perform any other action on any 'display.provider' resource + Prescriptive guidance for namespace: + Read any 'display.resource' Create or Update any 'display.resource' Delete any + 'display.resource' 'ActionName' any 'display.resources'. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(Display, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Identity(msrest.serialization.Model): + """Defines the MSI properties of the Move Collection. + + :param type: The type of identity used for the region move service. Possible values include: + "None", "SystemAssigned", "UserAssigned". + :type type: str or ~region_move_service_api.models.ResourceIdentityType + :param principal_id: Gets or sets the principal id. + :type principal_id: str + :param tenant_id: Gets or sets the tenant id. + :type tenant_id: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + + +class JobStatus(msrest.serialization.Model): + """Defines the job status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar job_name: Defines the job name. Default value: "InitialSync". + :vartype job_name: str + :param job_progress: Gets or sets the monitoring job percentage. + :type job_progress: str + """ + + _validation = { + 'job_name': {'constant': True}, + } + + _attribute_map = { + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'job_progress': {'key': 'jobProgress', 'type': 'str'}, + } + + job_name = "InitialSync" + + def __init__( + self, + *, + job_progress: Optional[str] = None, + **kwargs + ): + super(JobStatus, self).__init__(**kwargs) + self.job_progress = job_progress + + +class LBBackendAddressPoolResourceSettings(msrest.serialization.Model): + """Defines load balancer backend address pool properties. + + :param name: Gets or sets the backend address pool name. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(LBBackendAddressPoolResourceSettings, self).__init__(**kwargs) + self.name = name + + +class LBFrontendIPConfigurationResourceSettings(msrest.serialization.Model): + """Defines load balancer frontend IP configuration properties. + + :param name: Gets or sets the frontend IP configuration name. + :type name: str + :param private_ip_address: Gets or sets the IP address of the Load Balancer.This is only + specified if a specific + private IP address shall be allocated from the subnet specified in subnetRef. + :type private_ip_address: str + :param private_ip_allocation_method: Gets or sets PrivateIP allocation method (Static/Dynamic). + :type private_ip_allocation_method: str + :param subnet: Defines reference to a proxy resource. + :type subnet: ~region_move_service_api.models.ProxyResourceReference + :param zones: Gets or sets the csv list of zones. + :type zones: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'privateIpAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ProxyResourceReference'}, + 'zones': {'key': 'zones', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[str] = None, + subnet: Optional["ProxyResourceReference"] = None, + zones: Optional[str] = None, + **kwargs + ): + super(LBFrontendIPConfigurationResourceSettings, self).__init__(**kwargs) + self.name = name + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.zones = zones + + +class ProxyResourceReference(AzureResourceReference): + """Defines reference to a proxy resource. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + :param name: Gets the name of the proxy resource on the target side. + :type name: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + source_arm_resource_id: str, + name: Optional[str] = None, + **kwargs + ): + super(ProxyResourceReference, self).__init__(source_arm_resource_id=source_arm_resource_id, **kwargs) + self.name = name + + +class LoadBalancerBackendAddressPoolReference(ProxyResourceReference): + """Defines reference to load balancer backend address pools. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + :param name: Gets the name of the proxy resource on the target side. + :type name: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + source_arm_resource_id: str, + name: Optional[str] = None, + **kwargs + ): + super(LoadBalancerBackendAddressPoolReference, self).__init__(source_arm_resource_id=source_arm_resource_id, name=name, **kwargs) + + +class LoadBalancerNatRuleReference(ProxyResourceReference): + """Defines reference to load balancer NAT rules. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + :param name: Gets the name of the proxy resource on the target side. + :type name: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + source_arm_resource_id: str, + name: Optional[str] = None, + **kwargs + ): + super(LoadBalancerNatRuleReference, self).__init__(source_arm_resource_id=source_arm_resource_id, name=name, **kwargs) + + +class LoadBalancerResourceSettings(ResourceSettings): + """Defines the load balancer resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param sku: Gets or sets load balancer sku (Basic/Standard). + :type sku: str + :param frontend_ip_configurations: Gets or sets the frontend IP configurations of the load + balancer. + :type frontend_ip_configurations: + list[~region_move_service_api.models.LBFrontendIPConfigurationResourceSettings] + :param backend_address_pools: Gets or sets the backend address pools of the load balancer. + :type backend_address_pools: + list[~region_move_service_api.models.LBBackendAddressPoolResourceSettings] + :param zones: Gets or sets the csv list of zones common for all frontend IP configurations. + Note this is given + precedence only if frontend IP configurations settings are not present. + :type zones: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'frontend_ip_configurations': {'key': 'frontendIPConfigurations', 'type': '[LBFrontendIPConfigurationResourceSettings]'}, + 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[LBBackendAddressPoolResourceSettings]'}, + 'zones': {'key': 'zones', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_name: str, + sku: Optional[str] = None, + frontend_ip_configurations: Optional[List["LBFrontendIPConfigurationResourceSettings"]] = None, + backend_address_pools: Optional[List["LBBackendAddressPoolResourceSettings"]] = None, + zones: Optional[str] = None, + **kwargs + ): + super(LoadBalancerResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Network/loadBalancers' + self.sku = sku + self.frontend_ip_configurations = frontend_ip_configurations + self.backend_address_pools = backend_address_pools + self.zones = zones + + +class ManualResolutionProperties(msrest.serialization.Model): + """Defines the properties for manual resolution. + + :param target_id: Gets or sets the target resource ARM ID of the dependent resource if the + resource type is Manual. + :type target_id: str + """ + + _attribute_map = { + 'target_id': {'key': 'targetId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_id: Optional[str] = None, + **kwargs + ): + super(ManualResolutionProperties, self).__init__(**kwargs) + self.target_id = target_id + + +class MoveCollection(msrest.serialization.Model): + """Define the move collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: The geo-location where the resource lives. + :type location: str + :param identity: Defines the MSI properties of the Move Collection. + :type identity: ~region_move_service_api.models.Identity + :param properties: Defines the move collection properties. + :type properties: ~region_move_service_api.models.MoveCollectionProperties + """ + + _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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'properties': {'key': 'properties', 'type': 'MoveCollectionProperties'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + location: Optional[str] = None, + identity: Optional["Identity"] = None, + properties: Optional["MoveCollectionProperties"] = None, + **kwargs + ): + super(MoveCollection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.location = location + self.identity = identity + self.properties = properties + + +class MoveCollectionProperties(msrest.serialization.Model): + """Defines the move collection properties. + + 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 source_region: Required. Gets or sets the source region. + :type source_region: str + :param target_region: Required. Gets or sets the target region. + :type target_region: str + :ivar provisioning_state: Defines the provisioning states. Possible values include: + "Succeeded", "Updating", "Creating", "Failed". + :vartype provisioning_state: str or ~region_move_service_api.models.ProvisioningState + """ + + _validation = { + 'source_region': {'required': True}, + 'target_region': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'source_region': {'key': 'sourceRegion', 'type': 'str'}, + 'target_region': {'key': 'targetRegion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + source_region: str, + target_region: str, + **kwargs + ): + super(MoveCollectionProperties, self).__init__(**kwargs) + self.source_region = source_region + self.target_region = target_region + self.provisioning_state = None + + +class MoveCollectionResultList(msrest.serialization.Model): + """Defines the collection of move collections. + + :param value: Gets the list of move collections. + :type value: list[~region_move_service_api.models.MoveCollection] + :param next_link: Gets the value of next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MoveCollection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MoveCollection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(MoveCollectionResultList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class MoveErrorInfo(msrest.serialization.Model): + """The move custom error info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar move_resources: The affected move resources. + :vartype move_resources: list[~region_move_service_api.models.AffectedMoveResource] + """ + + _validation = { + 'move_resources': {'readonly': True}, + } + + _attribute_map = { + 'move_resources': {'key': 'moveResources', 'type': '[AffectedMoveResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(MoveErrorInfo, self).__init__(**kwargs) + self.move_resources = None + + +class MoveResource(msrest.serialization.Model): + """Defines the move resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Defines the move resource properties. + :type properties: ~region_move_service_api.models.MoveResourceProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'MoveResourceProperties'}, + } + + def __init__( + self, + *, + properties: Optional["MoveResourceProperties"] = None, + **kwargs + ): + super(MoveResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class MoveResourceCollection(msrest.serialization.Model): + """Defines the collection of move resources. + + :param value: Gets the list of move resources. + :type value: list[~region_move_service_api.models.MoveResource] + :param next_link: Gets the value of next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MoveResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MoveResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(MoveResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class MoveResourceDependency(msrest.serialization.Model): + """Defines the dependency of the move resource. + + :param id: Gets the source ARM ID of the dependent resource. + :type id: str + :param resolution_status: Gets the dependency resolution status. + :type resolution_status: str + :param resolution_type: Defines the resolution type. Possible values include: "Manual", + "Automatic". + :type resolution_type: str or ~region_move_service_api.models.ResolutionType + :param dependency_type: Defines the dependency type. Possible values include: + "RequiredForPrepare", "RequiredForMove". + :type dependency_type: str or ~region_move_service_api.models.DependencyType + :param manual_resolution: Defines the properties for manual resolution. + :type manual_resolution: ~region_move_service_api.models.ManualResolutionProperties + :param automatic_resolution: Defines the properties for automatic resolution. + :type automatic_resolution: ~region_move_service_api.models.AutomaticResolutionProperties + :param is_optional: Gets or sets a value indicating whether the dependency is optional. + :type is_optional: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'resolution_status': {'key': 'resolutionStatus', 'type': 'str'}, + 'resolution_type': {'key': 'resolutionType', 'type': 'str'}, + 'dependency_type': {'key': 'dependencyType', 'type': 'str'}, + 'manual_resolution': {'key': 'manualResolution', 'type': 'ManualResolutionProperties'}, + 'automatic_resolution': {'key': 'automaticResolution', 'type': 'AutomaticResolutionProperties'}, + 'is_optional': {'key': 'isOptional', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + resolution_status: Optional[str] = None, + resolution_type: Optional[Union[str, "ResolutionType"]] = None, + dependency_type: Optional[Union[str, "DependencyType"]] = None, + manual_resolution: Optional["ManualResolutionProperties"] = None, + automatic_resolution: Optional["AutomaticResolutionProperties"] = None, + is_optional: Optional[str] = None, + **kwargs + ): + super(MoveResourceDependency, self).__init__(**kwargs) + self.id = id + self.resolution_status = resolution_status + self.resolution_type = resolution_type + self.dependency_type = dependency_type + self.manual_resolution = manual_resolution + self.automatic_resolution = automatic_resolution + self.is_optional = is_optional + + +class MoveResourceDependencyOverride(msrest.serialization.Model): + """Defines the dependency override of the move resource. + + :param id: Gets or sets the ARM ID of the dependent resource. + :type id: str + :param target_id: Gets or sets the resource ARM id of either the MoveResource or the resource + ARM ID of + the dependent resource. + :type target_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + target_id: Optional[str] = None, + **kwargs + ): + super(MoveResourceDependencyOverride, self).__init__(**kwargs) + self.id = id + self.target_id = target_id + + +class MoveResourceError(msrest.serialization.Model): + """An error response from the azure region move service. + + :param properties: The move resource error body. + :type properties: ~region_move_service_api.models.MoveResourceErrorBody + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'MoveResourceErrorBody'}, + } + + def __init__( + self, + *, + properties: Optional["MoveResourceErrorBody"] = None, + **kwargs + ): + super(MoveResourceError, self).__init__(**kwargs) + self.properties = properties + + +class MoveResourceErrorBody(msrest.serialization.Model): + """An error response from the Azure Migrate service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~region_move_service_api.models.MoveResourceErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[MoveResourceErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["MoveResourceErrorBody"]] = None, + **kwargs + ): + super(MoveResourceErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class MoveResourceFilter(msrest.serialization.Model): + """Move resource filter. + + :param properties: + :type properties: ~region_move_service_api.models.MoveResourceFilterProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'MoveResourceFilterProperties'}, + } + + def __init__( + self, + *, + properties: Optional["MoveResourceFilterProperties"] = None, + **kwargs + ): + super(MoveResourceFilter, self).__init__(**kwargs) + self.properties = properties + + +class MoveResourceFilterProperties(msrest.serialization.Model): + """MoveResourceFilterProperties. + + :param provisioning_state: The provisioning state. + :type provisioning_state: str + """ + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + provisioning_state: Optional[str] = None, + **kwargs + ): + super(MoveResourceFilterProperties, self).__init__(**kwargs) + self.provisioning_state = provisioning_state + + +class MoveResourceProperties(msrest.serialization.Model): + """Defines the move resource properties. + + 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. + + :ivar provisioning_state: Defines the provisioning states. Possible values include: + "Succeeded", "Updating", "Creating", "Failed". + :vartype provisioning_state: str or ~region_move_service_api.models.ProvisioningState + :param source_id: Required. Gets or sets the Source ARM Id of the resource. + :type source_id: str + :ivar target_id: Gets or sets the Target ARM Id of the resource. + :vartype target_id: str + :param existing_target_id: Gets or sets the existing target ARM Id of the resource. + :type existing_target_id: str + :param resource_settings: Gets or sets the resource settings. + :type resource_settings: ~region_move_service_api.models.ResourceSettings + :ivar source_resource_settings: Gets or sets the source resource settings. + :vartype source_resource_settings: ~region_move_service_api.models.ResourceSettings + :ivar move_status: Defines the move resource status. + :vartype move_status: ~region_move_service_api.models.MoveResourceStatus + :ivar depends_on: Gets or sets the move resource dependencies. + :vartype depends_on: list[~region_move_service_api.models.MoveResourceDependency] + :param depends_on_overrides: Gets or sets the move resource dependencies overrides. + :type depends_on_overrides: + list[~region_move_service_api.models.MoveResourceDependencyOverride] + :ivar errors: Defines the move resource errors. + :vartype errors: ~region_move_service_api.models.MoveResourceError + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'source_id': {'required': True}, + 'target_id': {'readonly': True}, + 'source_resource_settings': {'readonly': True}, + 'move_status': {'readonly': True}, + 'depends_on': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + 'existing_target_id': {'key': 'existingTargetId', 'type': 'str'}, + 'resource_settings': {'key': 'resourceSettings', 'type': 'ResourceSettings'}, + 'source_resource_settings': {'key': 'sourceResourceSettings', 'type': 'ResourceSettings'}, + 'move_status': {'key': 'moveStatus', 'type': 'MoveResourceStatus'}, + 'depends_on': {'key': 'dependsOn', 'type': '[MoveResourceDependency]'}, + 'depends_on_overrides': {'key': 'dependsOnOverrides', 'type': '[MoveResourceDependencyOverride]'}, + 'errors': {'key': 'errors', 'type': 'MoveResourceError'}, + } + + def __init__( + self, + *, + source_id: str, + existing_target_id: Optional[str] = None, + resource_settings: Optional["ResourceSettings"] = None, + depends_on_overrides: Optional[List["MoveResourceDependencyOverride"]] = None, + **kwargs + ): + super(MoveResourceProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.source_id = source_id + self.target_id = None + self.existing_target_id = existing_target_id + self.resource_settings = resource_settings + self.source_resource_settings = None + self.move_status = None + self.depends_on = None + self.depends_on_overrides = depends_on_overrides + self.errors = None + + +class MoveResourcePropertiesErrors(MoveResourceError): + """Defines the move resource errors. + + :param properties: The move resource error body. + :type properties: ~region_move_service_api.models.MoveResourceErrorBody + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'MoveResourceErrorBody'}, + } + + def __init__( + self, + *, + properties: Optional["MoveResourceErrorBody"] = None, + **kwargs + ): + super(MoveResourcePropertiesErrors, self).__init__(properties=properties, **kwargs) + + +class MoveResourceStatus(msrest.serialization.Model): + """Defines the move resource status. + + :param move_state: Defines the MoveResource states. Possible values include: + "AssignmentPending", "PreparePending", "PrepareInProgress", "PrepareFailed", "MovePending", + "MoveInProgress", "MoveFailed", "DiscardInProgress", "DiscardFailed", "CommitPending", + "CommitInProgress", "CommitFailed", "Committed". + :type move_state: str or ~region_move_service_api.models.MoveState + :param job_status: Defines the job status. + :type job_status: ~region_move_service_api.models.JobStatus + :param errors: An error response from the azure region move service. + :type errors: ~region_move_service_api.models.MoveResourceError + :param target_id: Gets the Target ARM Id of the resource. + :type target_id: str + """ + + _attribute_map = { + 'move_state': {'key': 'moveState', 'type': 'str'}, + 'job_status': {'key': 'jobStatus', 'type': 'JobStatus'}, + 'errors': {'key': 'errors', 'type': 'MoveResourceError'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + } + + def __init__( + self, + *, + move_state: Optional[Union[str, "MoveState"]] = None, + job_status: Optional["JobStatus"] = None, + errors: Optional["MoveResourceError"] = None, + target_id: Optional[str] = None, + **kwargs + ): + super(MoveResourceStatus, self).__init__(**kwargs) + self.move_state = move_state + self.job_status = job_status + self.errors = errors + self.target_id = target_id + + +class MoveResourcePropertiesMoveStatus(MoveResourceStatus): + """Defines the move resource status. + + :param move_state: Defines the MoveResource states. Possible values include: + "AssignmentPending", "PreparePending", "PrepareInProgress", "PrepareFailed", "MovePending", + "MoveInProgress", "MoveFailed", "DiscardInProgress", "DiscardFailed", "CommitPending", + "CommitInProgress", "CommitFailed", "Committed". + :type move_state: str or ~region_move_service_api.models.MoveState + :param job_status: Defines the job status. + :type job_status: ~region_move_service_api.models.JobStatus + :param errors: An error response from the azure region move service. + :type errors: ~region_move_service_api.models.MoveResourceError + :param target_id: Gets the Target ARM Id of the resource. + :type target_id: str + """ + + _attribute_map = { + 'move_state': {'key': 'moveState', 'type': 'str'}, + 'job_status': {'key': 'jobStatus', 'type': 'JobStatus'}, + 'errors': {'key': 'errors', 'type': 'MoveResourceError'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + } + + def __init__( + self, + *, + move_state: Optional[Union[str, "MoveState"]] = None, + job_status: Optional["JobStatus"] = None, + errors: Optional["MoveResourceError"] = None, + target_id: Optional[str] = None, + **kwargs + ): + super(MoveResourcePropertiesMoveStatus, self).__init__(move_state=move_state, job_status=job_status, errors=errors, target_id=target_id, **kwargs) + + +class MoveResourcePropertiesSourceResourceSettings(ResourceSettings): + """Gets or sets the source resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_name: str, + **kwargs + ): + super(MoveResourcePropertiesSourceResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'MoveResourceProperties-sourceResourceSettings' + + +class NetworkInterfaceResourceSettings(ResourceSettings): + """Defines the network interface resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param ip_configurations: Gets or sets the IP configurations of the NIC. + :type ip_configurations: + list[~region_move_service_api.models.NicIpConfigurationResourceSettings] + :param enable_accelerated_networking: Gets or sets a value indicating whether accelerated + networking is enabled. + :type enable_accelerated_networking: bool + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'ip_configurations': {'key': 'ipConfigurations', 'type': '[NicIpConfigurationResourceSettings]'}, + 'enable_accelerated_networking': {'key': 'enableAcceleratedNetworking', 'type': 'bool'}, + } + + def __init__( + self, + *, + target_resource_name: str, + ip_configurations: Optional[List["NicIpConfigurationResourceSettings"]] = None, + enable_accelerated_networking: Optional[bool] = None, + **kwargs + ): + super(NetworkInterfaceResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Network/networkInterfaces' + self.ip_configurations = ip_configurations + self.enable_accelerated_networking = enable_accelerated_networking + + +class NetworkSecurityGroupResourceSettings(ResourceSettings): + """Defines the NSG resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param security_rules: Gets or sets Security rules of network security group. + :type security_rules: list[~region_move_service_api.models.NsgSecurityRule] + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'security_rules': {'key': 'securityRules', 'type': '[NsgSecurityRule]'}, + } + + def __init__( + self, + *, + target_resource_name: str, + security_rules: Optional[List["NsgSecurityRule"]] = None, + **kwargs + ): + super(NetworkSecurityGroupResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Network/networkSecurityGroups' + self.security_rules = security_rules + + +class NicIpConfigurationResourceSettings(msrest.serialization.Model): + """Defines NIC IP configuration properties. + + :param name: Gets or sets the IP configuration name. + :type name: str + :param private_ip_address: Gets or sets the private IP address of the network interface IP + Configuration. + :type private_ip_address: str + :param private_ip_allocation_method: Gets or sets the private IP address allocation method. + :type private_ip_allocation_method: str + :param subnet: Defines reference to a proxy resource. + :type subnet: ~region_move_service_api.models.ProxyResourceReference + :param primary: Gets or sets a value indicating whether this IP configuration is the primary. + :type primary: bool + :param load_balancer_backend_address_pools: Gets or sets the references of the load balancer + backend address pools. + :type load_balancer_backend_address_pools: + list[~region_move_service_api.models.ProxyResourceReference] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'privateIpAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ProxyResourceReference'}, + 'primary': {'key': 'primary', 'type': 'bool'}, + 'load_balancer_backend_address_pools': {'key': 'loadBalancerBackendAddressPools', 'type': '[ProxyResourceReference]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[str] = None, + subnet: Optional["ProxyResourceReference"] = None, + primary: Optional[bool] = None, + load_balancer_backend_address_pools: Optional[List["ProxyResourceReference"]] = None, + **kwargs + ): + super(NicIpConfigurationResourceSettings, self).__init__(**kwargs) + self.name = name + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.primary = primary + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + + +class NsgSecurityRule(msrest.serialization.Model): + """Security Rule data model for Network Security Groups. + + :param name: Gets or sets the Security rule name. + :type name: str + :param access: Gets or sets whether network traffic is allowed or denied. + Possible values are “Allow” and “Deny”. + :type access: str + :param description: Gets or sets a description for this rule. Restricted to 140 chars. + :type description: str + :param destination_address_prefix: Gets or sets destination address prefix. CIDR or source IP + range. + A “*” can also be used to match all source IPs. Default tags such + as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. + :type destination_address_prefix: str + :param destination_port_range: Gets or sets Destination Port or Range. Integer or range between + 0 and 65535. A “*” can also be used to match all ports. + :type destination_port_range: str + :param direction: Gets or sets the direction of the rule.InBound or Outbound. The + direction specifies if rule will be evaluated on incoming or outgoing traffic. + :type direction: str + :param priority: Gets or sets the priority of the rule. The value can be between + 100 and 4096. The priority number must be unique for each rule in the collection. + The lower the priority number, the higher the priority of the rule. + :type priority: int + :param protocol: Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). + :type protocol: str + :param source_address_prefix: Gets or sets source address prefix. CIDR or source IP range. A + “*” can also be used to match all source IPs. Default tags such as ‘VirtualNetwork’, + ‘AzureLoadBalancer’ and ‘Internet’ can also be used. If this is an ingress + rule, specifies where network traffic originates from. + :type source_address_prefix: str + :param source_port_range: Gets or sets Source Port or Range. Integer or range between 0 and + + + #. A “*” can also be used to match all ports. + :type source_port_range: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'access': {'key': 'access', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, + 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, + 'direction': {'key': 'direction', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + access: Optional[str] = None, + description: Optional[str] = None, + destination_address_prefix: Optional[str] = None, + destination_port_range: Optional[str] = None, + direction: Optional[str] = None, + priority: Optional[int] = None, + protocol: Optional[str] = None, + source_address_prefix: Optional[str] = None, + source_port_range: Optional[str] = None, + **kwargs + ): + super(NsgSecurityRule, self).__init__(**kwargs) + self.name = name + self.access = access + self.description = description + self.destination_address_prefix = destination_address_prefix + self.destination_port_range = destination_port_range + self.direction = direction + self.priority = priority + self.protocol = protocol + self.source_address_prefix = source_address_prefix + self.source_port_range = source_port_range + + +class OperationErrorAdditionalInfo(msrest.serialization.Model): + """The operation error info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The error type. + :vartype type: str + :ivar info: The operation error info. + :vartype info: ~region_move_service_api.models.MoveErrorInfo + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'MoveErrorInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class OperationsDiscovery(msrest.serialization.Model): + """Operations discovery class. + + :param name: Gets or sets Name of the API. + The name of the operation being performed on this particular object. It should + match the action name that appears in RBAC / the event service. + Examples of operations include: + + + * Microsoft.Compute/virtualMachine/capture/action + * Microsoft.Compute/virtualMachine/restart/action + * Microsoft.Compute/virtualMachine/write + * Microsoft.Compute/virtualMachine/read + * Microsoft.Compute/virtualMachine/delete + Each action should include, in order: + (1) Resource Provider Namespace + (2) Type hierarchy for which the action applies (e.g. server/databases for a SQL + Azure database) + (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH + on a collection or named value, Write should be used. + If it is a GET, Read should be used. If it is a DELETE, Delete should be used. If it + is a POST, Action should be used. + As a note: all resource providers would need to include the "{Resource Provider + Namespace}/register/action" operation in their response. + This API is used to register for their service, and should include details about the + operation (e.g. a localized name for the resource provider + any special + considerations like PII release). + :type name: str + :param display: Contains the localized display information for this particular operation / + action. These + value will be used by several clients for + (1) custom role definitions for RBAC; + (2) complex query filters for the event service; and + (3) audit history / records for management operations. + :type display: ~region_move_service_api.models.Display + :param origin: Gets or sets Origin. + The intended executor of the operation; governs the display of the operation in the + RBAC UX and the audit logs UX. + Default value is "user,system". + :type origin: str + :param properties: Any object. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'Display'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["Display"] = None, + origin: Optional[str] = None, + properties: Optional[object] = None, + **kwargs + ): + super(OperationsDiscovery, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class OperationsDiscoveryCollection(msrest.serialization.Model): + """Collection of ClientDiscovery details. + + :param value: Gets or sets the ClientDiscovery details. + :type value: list[~region_move_service_api.models.OperationsDiscovery] + :param next_link: Gets or sets the value of next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationsDiscovery]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["OperationsDiscovery"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationsDiscoveryCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class OperationStatus(msrest.serialization.Model): + """Operation status REST resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Operation name. + :vartype name: str + :ivar status: Status of the operation. ARM expects the terminal status to be one of Succeeded/ + Failed/ Canceled. All other values imply that the operation is still running. + :vartype status: str + :ivar start_time: Start time. + :vartype start_time: str + :ivar end_time: End time. + :vartype end_time: str + :ivar error: Error stating all error details for the operation. + :vartype error: ~region_move_service_api.models.OperationStatusError + :ivar properties: Custom data. + :vartype properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationStatusError'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationStatus, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + self.properties = None + + +class OperationStatusError(msrest.serialization.Model): + """Class for operation status errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: list[~region_move_service_api.models.OperationStatusError] + :ivar additional_info: The additional info. + :vartype additional_info: list[~region_move_service_api.models.OperationErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[OperationStatusError]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[OperationErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationStatusError, self).__init__(**kwargs) + self.code = None + self.message = None + self.details = None + self.additional_info = None + + +class PrepareRequest(msrest.serialization.Model): + """Defines the request body for initiate prepare operation. + + All required parameters must be populated in order to send to Azure. + + :param validate_only: Gets or sets a value indicating whether the operation needs to only run + pre-requisite. + :type validate_only: bool + :param move_resources: Required. Gets or sets the list of resource Id's, by default it accepts + move resource id's unless the input type is switched via moveResourceInputType property. + :type move_resources: list[str] + :param move_resource_input_type: Defines the move resource input type. Possible values include: + "MoveResourceId", "MoveResourceSourceId". + :type move_resource_input_type: str or ~region_move_service_api.models.MoveResourceInputType + """ + + _validation = { + 'move_resources': {'required': True}, + } + + _attribute_map = { + 'validate_only': {'key': 'validateOnly', 'type': 'bool'}, + 'move_resources': {'key': 'moveResources', 'type': '[str]'}, + 'move_resource_input_type': {'key': 'moveResourceInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + move_resources: List[str], + validate_only: Optional[bool] = None, + move_resource_input_type: Optional[Union[str, "MoveResourceInputType"]] = None, + **kwargs + ): + super(PrepareRequest, self).__init__(**kwargs) + self.validate_only = validate_only + self.move_resources = move_resources + self.move_resource_input_type = move_resource_input_type + + +class PublicIPAddressResourceSettings(ResourceSettings): + """Defines the public IP address resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param domain_name_label: Gets or sets the domain name label. + :type domain_name_label: str + :param f_qdn: Gets or sets the fully qualified domain name. + :type f_qdn: str + :param public_ip_allocation_method: Gets or sets public IP allocation method. + :type public_ip_allocation_method: str + :param sku: Gets or sets public IP sku. + :type sku: str + :param zones: Gets or sets public IP zones. + :type zones: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + 'f_qdn': {'key': 'fQDN', 'type': 'str'}, + 'public_ip_allocation_method': {'key': 'publicIpAllocationMethod', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_name: str, + domain_name_label: Optional[str] = None, + f_qdn: Optional[str] = None, + public_ip_allocation_method: Optional[str] = None, + sku: Optional[str] = None, + zones: Optional[str] = None, + **kwargs + ): + super(PublicIPAddressResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Network/publicIPAddresses' + self.domain_name_label = domain_name_label + self.f_qdn = f_qdn + self.public_ip_allocation_method = public_ip_allocation_method + self.sku = sku + self.zones = zones + + +class ResourceGroupResourceSettings(ResourceSettings): + """Defines the resource group resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_name: str, + **kwargs + ): + super(ResourceGroupResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'resourceGroups' + + +class ResourceMoveRequest(msrest.serialization.Model): + """Defines the request body for resource move operation. + + All required parameters must be populated in order to send to Azure. + + :param validate_only: Gets or sets a value indicating whether the operation needs to only run + pre-requisite. + :type validate_only: bool + :param move_resources: Required. Gets or sets the list of resource Id's, by default it accepts + move resource id's unless the input type is switched via moveResourceInputType property. + :type move_resources: list[str] + :param move_resource_input_type: Defines the move resource input type. Possible values include: + "MoveResourceId", "MoveResourceSourceId". + :type move_resource_input_type: str or ~region_move_service_api.models.MoveResourceInputType + """ + + _validation = { + 'move_resources': {'required': True}, + } + + _attribute_map = { + 'validate_only': {'key': 'validateOnly', 'type': 'bool'}, + 'move_resources': {'key': 'moveResources', 'type': '[str]'}, + 'move_resource_input_type': {'key': 'moveResourceInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + move_resources: List[str], + validate_only: Optional[bool] = None, + move_resource_input_type: Optional[Union[str, "MoveResourceInputType"]] = None, + **kwargs + ): + super(ResourceMoveRequest, self).__init__(**kwargs) + self.validate_only = validate_only + self.move_resources = move_resources + self.move_resource_input_type = move_resource_input_type + + +class SqlDatabaseResourceSettings(ResourceSettings): + """Defines the Sql Database resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param zone_redundant: Defines the zone redundant resource setting. Possible values include: + "Enable", "Disable". + :type zone_redundant: str or ~region_move_service_api.models.ZoneRedundant + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_name: str, + zone_redundant: Optional[Union[str, "ZoneRedundant"]] = None, + **kwargs + ): + super(SqlDatabaseResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Sql/servers/databases' + self.zone_redundant = zone_redundant + + +class SqlElasticPoolResourceSettings(ResourceSettings): + """Defines the Sql ElasticPool resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param zone_redundant: Defines the zone redundant resource setting. Possible values include: + "Enable", "Disable". + :type zone_redundant: str or ~region_move_service_api.models.ZoneRedundant + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_name: str, + zone_redundant: Optional[Union[str, "ZoneRedundant"]] = None, + **kwargs + ): + super(SqlElasticPoolResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Sql/servers/elasticPools' + self.zone_redundant = zone_redundant + + +class SqlServerResourceSettings(ResourceSettings): + """Defines the SQL Server resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_name: str, + **kwargs + ): + super(SqlServerResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Sql/servers' + + +class SubnetReference(ProxyResourceReference): + """Defines reference to subnet. + + All required parameters must be populated in order to send to Azure. + + :param source_arm_resource_id: Required. Gets the ARM resource ID of the tracked resource being + referenced. + :type source_arm_resource_id: str + :param name: Gets the name of the proxy resource on the target side. + :type name: str + """ + + _validation = { + 'source_arm_resource_id': {'required': True}, + } + + _attribute_map = { + 'source_arm_resource_id': {'key': 'sourceArmResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + source_arm_resource_id: str, + name: Optional[str] = None, + **kwargs + ): + super(SubnetReference, self).__init__(source_arm_resource_id=source_arm_resource_id, name=name, **kwargs) + + +class SubnetResourceSettings(msrest.serialization.Model): + """Defines the virtual network subnets resource settings. + + :param name: Gets or sets the Subnet name. + :type name: str + :param address_prefix: Gets or sets address prefix for the subnet. + :type address_prefix: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + address_prefix: Optional[str] = None, + **kwargs + ): + super(SubnetResourceSettings, self).__init__(**kwargs) + self.name = name + self.address_prefix = address_prefix + + +class UnresolvedDependency(msrest.serialization.Model): + """Unresolved dependency. + + :param count: Gets or sets the count. + :type count: int + :param id: Gets or sets the arm id of the dependency. + :type id: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + count: Optional[int] = None, + id: Optional[str] = None, + **kwargs + ): + super(UnresolvedDependency, self).__init__(**kwargs) + self.count = count + self.id = id + + +class UnresolvedDependencyCollection(msrest.serialization.Model): + """Unresolved dependency collection. + + :param value: Gets or sets the list of unresolved dependencies. + :type value: list[~region_move_service_api.models.UnresolvedDependency] + :param next_link: Gets or sets the value of next link. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnresolvedDependency]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["UnresolvedDependency"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(UnresolvedDependencyCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class UpdateMoveCollectionRequest(msrest.serialization.Model): + """Defines the request body for updating move collection. + + :param tags: A set of tags. Gets or sets the Resource tags. + :type tags: dict[str, str] + :param identity: Defines the MSI properties of the Move Collection. + :type identity: ~region_move_service_api.models.Identity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + identity: Optional["Identity"] = None, + **kwargs + ): + super(UpdateMoveCollectionRequest, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + + +class VirtualMachineResourceSettings(ResourceSettings): + """Gets or sets the virtual machine resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param target_availability_zone: Gets or sets the target availability zone. Possible values + include: "1", "2", "3", "NA". + :type target_availability_zone: str or ~region_move_service_api.models.TargetAvailabilityZone + :param target_vm_size: Gets or sets the target virtual machine size. + :type target_vm_size: str + :param target_availability_set_id: Gets or sets the target availability set id for virtual + machines not in an availability set at source. + :type target_availability_set_id: str + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_availability_zone': {'key': 'targetAvailabilityZone', 'type': 'str'}, + 'target_vm_size': {'key': 'targetVmSize', 'type': 'str'}, + 'target_availability_set_id': {'key': 'targetAvailabilitySetId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_name: str, + target_availability_zone: Optional[Union[str, "TargetAvailabilityZone"]] = None, + target_vm_size: Optional[str] = None, + target_availability_set_id: Optional[str] = None, + **kwargs + ): + super(VirtualMachineResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Compute/virtualMachines' + self.target_availability_zone = target_availability_zone + self.target_vm_size = target_vm_size + self.target_availability_set_id = target_availability_set_id + + +class VirtualNetworkResourceSettings(ResourceSettings): + """Defines the virtual network resource settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_type: Required. The resource type. For example, the value can be + Microsoft.Compute/virtualMachines.Constant filled by server. + :type resource_type: str + :param target_resource_name: Required. Gets or sets the target Resource name. + :type target_resource_name: str + :param enable_ddos_protection: Gets or sets a value indicating whether gets or sets whether the + DDOS protection should be switched on. + :type enable_ddos_protection: bool + :param address_space: Gets or sets the address prefixes for the virtual network. + :type address_space: list[str] + :param dns_servers: Gets or sets DHCPOptions that contains an array of DNS servers available to + VMs + deployed in the virtual network. + :type dns_servers: list[str] + :param subnets: Gets or sets List of subnets in a VirtualNetwork. + :type subnets: list[~region_move_service_api.models.SubnetResourceSettings] + """ + + _validation = { + 'resource_type': {'required': True}, + 'target_resource_name': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'enable_ddos_protection': {'key': 'enableDdosProtection', 'type': 'bool'}, + 'address_space': {'key': 'addressSpace', 'type': '[str]'}, + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + 'subnets': {'key': 'subnets', 'type': '[SubnetResourceSettings]'}, + } + + def __init__( + self, + *, + target_resource_name: str, + enable_ddos_protection: Optional[bool] = None, + address_space: Optional[List[str]] = None, + dns_servers: Optional[List[str]] = None, + subnets: Optional[List["SubnetResourceSettings"]] = None, + **kwargs + ): + super(VirtualNetworkResourceSettings, self).__init__(target_resource_name=target_resource_name, **kwargs) + self.resource_type: str = 'Microsoft.Network/virtualNetworks' + self.enable_ddos_protection = enable_ddos_protection + self.address_space = address_space + self.dns_servers = dns_servers + self.subnets = subnets diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_region_move_service_api_enums.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_region_move_service_api_enums.py new file mode 100644 index 0000000000000..e1c7f26e4cd01 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/models/_region_move_service_api_enums.py @@ -0,0 +1,81 @@ +# 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. +# -------------------------------------------------------------------------- + +from enum import Enum + +class DependencyType(str, Enum): + """Defines the dependency type. + """ + + required_for_prepare = "RequiredForPrepare" + required_for_move = "RequiredForMove" + +class MoveResourceInputType(str, Enum): + """Defines the move resource input type. + """ + + move_resource_id = "MoveResourceId" + move_resource_source_id = "MoveResourceSourceId" + +class MoveState(str, Enum): + """Defines the MoveResource states. + """ + + assignment_pending = "AssignmentPending" + prepare_pending = "PreparePending" + prepare_in_progress = "PrepareInProgress" + prepare_failed = "PrepareFailed" + move_pending = "MovePending" + move_in_progress = "MoveInProgress" + move_failed = "MoveFailed" + discard_in_progress = "DiscardInProgress" + discard_failed = "DiscardFailed" + commit_pending = "CommitPending" + commit_in_progress = "CommitInProgress" + commit_failed = "CommitFailed" + committed = "Committed" + +class ProvisioningState(str, Enum): + """Defines the provisioning states. + """ + + succeeded = "Succeeded" + updating = "Updating" + creating = "Creating" + failed = "Failed" + +class ResolutionType(str, Enum): + """Defines the resolution type. + """ + + manual = "Manual" + automatic = "Automatic" + +class ResourceIdentityType(str, Enum): + """The type of identity used for the region move service. + """ + + none = "None" + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + +class TargetAvailabilityZone(str, Enum): + """Gets or sets the target availability zone. + """ + + one = "1" + two = "2" + three = "3" + na = "NA" + +class ZoneRedundant(str, Enum): + """Defines the zone redundant resource setting. + """ + + enable = "Enable" + disable = "Disable" diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/__init__.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/__init__.py new file mode 100644 index 0000000000000..fb98319827bc2 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/__init__.py @@ -0,0 +1,19 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._move_collections_operations import MoveCollectionsOperations +from ._move_resources_operations import MoveResourcesOperations +from ._unresolved_dependencies_operations import UnresolvedDependenciesOperations +from ._operations_discovery_operations import OperationsDiscoveryOperations + +__all__ = [ + 'MoveCollectionsOperations', + 'MoveResourcesOperations', + 'UnresolvedDependenciesOperations', + 'OperationsDiscoveryOperations', +] diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_move_collections_operations.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_move_collections_operations.py new file mode 100644 index 0000000000000..9551e990e0de6 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_move_collections_operations.py @@ -0,0 +1,1106 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +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 MoveCollectionsOperations(object): + """MoveCollectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~region_move_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.MoveCollection"] + **kwargs # type: Any + ): + # type: (...) -> "models.MoveCollection" + """Creates or updates a move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.MoveCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MoveCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.MoveCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'MoveCollection') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('MoveCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('MoveCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.UpdateMoveCollectionRequest"] + **kwargs # type: Any + ): + # type: (...) -> "models.MoveCollection" + """Updates a move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.UpdateMoveCollectionRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MoveCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.MoveCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.update.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'UpdateMoveCollectionRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MoveCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + move_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + move_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationStatus"] + """Deletes a move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + move_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.MoveCollection" + """Gets the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MoveCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.MoveCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MoveCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}'} # type: ignore + + def _prepare_initial( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.PrepareRequest"] + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._prepare_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'PrepareRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _prepare_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/prepare'} # type: ignore + + def begin_prepare( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.PrepareRequest"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationStatus"] + """Initiates prepare for the set of resources included in the request body. The prepare operation + is on the moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a + successful completion the moveResource moveState do a transition to MovePending. To aid the + user to prerequisite the operation the client can call operation with validateOnly property set + to true. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.PrepareRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._prepare_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_prepare.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/prepare'} # type: ignore + + def _initiate_move_initial( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.ResourceMoveRequest"] + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._initiate_move_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceMoveRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _initiate_move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/initiateMove'} # type: ignore + + def begin_initiate_move( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.ResourceMoveRequest"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationStatus"] + """Moves the set of resources included in the request body. The move operation is triggered after + the moveResources are in the moveState 'MovePending' or 'MoveFailed', on a successful + completion the moveResource moveState do a transition to CommitPending. To aid the user to + prerequisite the operation the client can call operation with validateOnly property set to + true. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.ResourceMoveRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._initiate_move_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_initiate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/initiateMove'} # type: ignore + + def _commit_initial( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.CommitRequest"] + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._commit_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'CommitRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _commit_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/commit'} # type: ignore + + def begin_commit( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.CommitRequest"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationStatus"] + """Commits the set of resources included in the request body. The commit operation is triggered on + the moveResources in the moveState 'CommitPending' or 'CommitFailed', on a successful + completion the moveResource moveState do a transition to Committed. To aid the user to + prerequisite the operation the client can call operation with validateOnly property set to + true. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.CommitRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._commit_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_commit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/commit'} # type: ignore + + def _discard_initial( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.DiscardRequest"] + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._discard_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DiscardRequest') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _discard_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/discard'} # type: ignore + + def begin_discard( + self, + resource_group_name, # type: str + move_collection_name, # type: str + body=None, # type: Optional["models.DiscardRequest"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationStatus"] + """Discards the set of resources included in the request body. The discard operation is triggered + on the moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful + completion the moveResource moveState do a transition to MovePending. To aid the user to + prerequisite the operation the client can call operation with validateOnly property set to + true. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param body: + :type body: ~region_move_service_api.models.DiscardRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._discard_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_discard.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/discard'} # type: ignore + + def _resolve_dependencies_initial( + self, + resource_group_name, # type: str + move_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self._resolve_dependencies_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _resolve_dependencies_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/resolveDependencies'} # type: ignore + + def begin_resolve_dependencies( + self, + resource_group_name, # type: str + move_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationStatus"] + """Computes, resolves and validate the dependencies of the moveResources in the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._resolve_dependencies_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_resolve_dependencies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/resolveDependencies'} # type: ignore + + def list_move_collections_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.MoveCollectionResultList"] + """Get all Move Collections. + + Get all the Move Collections in the subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MoveCollectionResultList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~region_move_service_api.models.MoveCollectionResultList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollectionResultList"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_move_collections_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('MoveCollectionResultList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_move_collections_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Migrate/moveCollections'} # type: ignore + + def list_move_collections_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.MoveCollectionResultList"] + """Get all Move Collections. + + Get all the Move Collections in the resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MoveCollectionResultList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~region_move_service_api.models.MoveCollectionResultList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveCollectionResultList"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_move_collections_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('MoveCollectionResultList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_move_collections_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections'} # type: ignore diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_move_resources_operations.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_move_resources_operations.py new file mode 100644 index 0000000000000..337c9321175ea --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_move_resources_operations.py @@ -0,0 +1,430 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +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 MoveResourcesOperations(object): + """MoveResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~region_move_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + move_collection_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.MoveResourceCollection"] + """Lists the Move Resources in the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param filter: The filter to apply on the operation. For example, you can use + $filter=Properties/ProvisioningState eq 'Succeeded'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MoveResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~region_move_service_api.models.MoveResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveResourceCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('MoveResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + move_collection_name, # type: str + move_resource_name, # type: str + body=None, # type: Optional["models.MoveResource"] + **kwargs # type: Any + ): + # type: (...) -> Optional["models.MoveResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.MoveResource"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + 'moveResourceName': self._serialize.url("move_resource_name", move_resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'MoveResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MoveResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + move_collection_name, # type: str + move_resource_name, # type: str + body=None, # type: Optional["models.MoveResource"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.MoveResource"] + """Creates or updates a Move Resource in the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param move_resource_name: The Move Resource Name. + :type move_resource_name: str + :param body: + :type body: ~region_move_service_api.models.MoveResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either MoveResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~region_move_service_api.models.MoveResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + move_resource_name=move_resource_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MoveResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + move_collection_name, # type: str + move_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationStatus"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + 'moveResourceName': self._serialize.url("move_resource_name", move_resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + move_collection_name, # type: str + move_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationStatus"] + """Deletes a Move Resource from the move collection. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param move_resource_name: The Move Resource Name. + :type move_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :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 either OperationStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~region_move_service_api.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + move_collection_name=move_collection_name, + move_resource_name=move_resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + move_collection_name, # type: str + move_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.MoveResource" + """Gets the Move Resource. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :param move_resource_name: The Move Resource Name. + :type move_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MoveResource, or the result of cls(response) + :rtype: ~region_move_service_api.models.MoveResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.MoveResource"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + 'moveResourceName': self._serialize.url("move_resource_name", move_resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MoveResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}'} # type: ignore diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_operations_discovery_operations.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_operations_discovery_operations.py new file mode 100644 index 0000000000000..62707d81ac7a5 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_operations_discovery_operations.py @@ -0,0 +1,89 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationsDiscoveryOperations(object): + """OperationsDiscoveryOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~region_move_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + **kwargs # type: Any + ): + # type: (...) -> "models.OperationsDiscoveryCollection" + """get. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationsDiscoveryCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.OperationsDiscoveryCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationsDiscoveryCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationsDiscoveryCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Migrate/operations'} # type: ignore diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_unresolved_dependencies_operations.py b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_unresolved_dependencies_operations.py new file mode 100644 index 0000000000000..548d7b21c523d --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/operations/_unresolved_dependencies_operations.py @@ -0,0 +1,101 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class UnresolvedDependenciesOperations(object): + """UnresolvedDependenciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~region_move_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + move_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.UnresolvedDependencyCollection" + """Gets a list of unresolved dependencies. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param move_collection_name: The Move Collection Name. + :type move_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UnresolvedDependencyCollection, or the result of cls(response) + :rtype: ~region_move_service_api.models.UnresolvedDependencyCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.UnresolvedDependencyCollection"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-10-01-preview" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + 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'), + 'moveCollectionName': self._serialize.url("move_collection_name", move_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UnresolvedDependencyCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/unresolvedDependencies'} # type: ignore diff --git a/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/py.typed b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/regionmove/azure-mgmt-regionmove/dev_requirements.txt b/sdk/regionmove/azure-mgmt-regionmove/dev_requirements.txt new file mode 100644 index 0000000000000..f6457a93d5e82 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools \ No newline at end of file diff --git a/sdk/regionmove/azure-mgmt-regionmove/sdk_packaging.toml b/sdk/regionmove/azure-mgmt-regionmove/sdk_packaging.toml new file mode 100644 index 0000000000000..ab75913e7095d --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/sdk_packaging.toml @@ -0,0 +1,8 @@ +[packaging] +package_name = "azure-mgmt-regionmove" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "MyService Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = true diff --git a/sdk/regionmove/azure-mgmt-regionmove/setup.cfg b/sdk/regionmove/azure-mgmt-regionmove/setup.cfg new file mode 100644 index 0000000000000..3c6e79cf31da1 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/regionmove/azure-mgmt-regionmove/setup.py b/sdk/regionmove/azure-mgmt-regionmove/setup.py new file mode 100644 index 0000000000000..0585c318eaad2 --- /dev/null +++ b/sdk/regionmove/azure-mgmt-regionmove/setup.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-regionmove" +PACKAGE_PPRINT_NAME = "MyService Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + '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, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) diff --git a/sdk/regionmove/ci.yml b/sdk/regionmove/ci.yml new file mode 100644 index 0000000000000..0cbb10d557b4a --- /dev/null +++ b/sdk/regionmove/ci.yml @@ -0,0 +1,32 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - master + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/regionmove/ + +pr: + branches: + include: + - master + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/regionmove/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: regionmove + Artifacts: + - name: azure_mgmt_regionmove + safeName: azuremgmtregionmove diff --git a/sdk/relay/ci.yml b/sdk/relay/ci.yml index 82ecb9af476e4..d03cf2eb387ac 100644 --- a/sdk/relay/ci.yml +++ b/sdk/relay/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/reservations/ci.yml b/sdk/reservations/ci.yml index ebdb53e98dfa7..ea521550edc28 100644 --- a/sdk/reservations/ci.yml +++ b/sdk/reservations/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: reservations Artifacts: - name: azure_mgmt_reservations - safeName: azuremgmtreservations \ No newline at end of file + safeName: azuremgmtreservations diff --git a/sdk/resources/ci.yml b/sdk/resources/ci.yml index 8ff78c010caad..ea383e74e98cc 100644 --- a/sdk/resources/ci.yml +++ b/sdk/resources/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -34,4 +33,4 @@ extends: - name: azure_mgmt_resource safeName: azuremgmtresource - name: azure_mgmt_resourcegraph - safeName: azuremgmtresourcegraph \ No newline at end of file + safeName: azuremgmtresourcegraph diff --git a/sdk/scheduler/ci.yml b/sdk/scheduler/ci.yml index 4dd1caf0b77da..e952a0c5272c6 100644 --- a/sdk/scheduler/ci.yml +++ b/sdk/scheduler/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: scheduler Artifacts: - name: azure_mgmt_scheduler - safeName: azuremgmtscheduler \ No newline at end of file + safeName: azuremgmtscheduler diff --git a/sdk/schemaregistry/ci.yml b/sdk/schemaregistry/ci.yml index c07776b866444..aaa6f14460ea3 100644 --- a/sdk/schemaregistry/ci.yml +++ b/sdk/schemaregistry/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/search/azure-search-documents/CHANGELOG.md b/sdk/search/azure-search-documents/CHANGELOG.md index 0f6fe5150f276..303e8492ec52d 100644 --- a/sdk/search/azure-search-documents/CHANGELOG.md +++ b/sdk/search/azure-search-documents/CHANGELOG.md @@ -1,15 +1,24 @@ # Release History -## 11.1.0b2 (Unreleased) +## 11.1.0b2 (2020-09-08) +**Features** + +- Added `azure.search.documents.RequestEntityTooLargeError` +- `Flush` method in `BatchClient` now will not return until all actions are done + +**Breaking Changes** + +- Removed `succeeded_actions` & `failed_actions` from `BatchClient` +- Removed `get_index_document_batching_client` from `SearchClient` ## 11.1.0b1 (2020-08-11) **Features** -- new SearchIndexDocumentBatchingClient +- new `SearchIndexDocumentBatchingClient` -SearchIndexDocumentBatchingClient supports handling document indexing actions in an automatic way. It can trigger the flush method automatically based on pending tasks and idle time. +`SearchIndexDocumentBatchingClient` supports handling document indexing actions in an automatic way. It can trigger the flush method automatically based on pending tasks and idle time. ### Fixes diff --git a/sdk/search/azure-search-documents/README.md b/sdk/search/azure-search-documents/README.md index 01d120e9f42be..b1a0a37e3920f 100644 --- a/sdk/search/azure-search-documents/README.md +++ b/sdk/search/azure-search-documents/README.md @@ -37,7 +37,7 @@ Use the Azure.Search.Documents client library to: [Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/search/azure-search-documents) | [Package (PyPI)](https://pypi.org/project/azure-search-documents/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-search-documents/latest/index.html) | -[Product documentation](https://docs.microsoft.com/en-us/azure/search/search-what-is-azure-search) | +[Product documentation](https://docs.microsoft.com/azure/search/search-what-is-azure-search) | [Samples](samples) @@ -301,7 +301,7 @@ DOCUMENT = { search_client = SearchClient(endpoint, index_name, AzureKeyCredential(key)) -result = client.upload_documents(documents=[DOCUMENT]) +result = search_client.upload_documents(documents=[DOCUMENT]) print("Upload of new document succeeded: {}".format(result[0].succeeded)) ``` @@ -430,7 +430,7 @@ additional questions or comments. [azure_cli]: https://docs.microsoft.com/cli/azure [azure_core]: ../../core/azure-core/README.md [azure_sub]: https://azure.microsoft.com/free/ -[search_resource]: https://docs.microsoft.com/en-us/azure/search/search-create-service-portal +[search_resource]: https://docs.microsoft.com/azure/search/search-create-service-portal [azure_portal]: https://portal.azure.com [create_search_service_docs]: https://docs.microsoft.com/azure/search/search-create-service-portal diff --git a/sdk/search/azure-search-documents/azure/search/documents/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/__init__.py index 0242d66c261ef..2a0bc230789dc 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/__init__.py @@ -24,12 +24,10 @@ # # -------------------------------------------------------------------------- -from ._internal import ( - IndexDocumentsBatch, - SearchClient, - SearchItemPaged, - SearchIndexDocumentBatchingClient, -) +from ._internal._index_documents_batch import IndexDocumentsBatch +from ._internal._search_documents_error import RequestEntityTooLargeError +from ._internal._search_client import SearchClient, SearchItemPaged +from ._internal._search_index_document_batching_client import SearchIndexDocumentBatchingClient from ._version import VERSION __version__ = VERSION @@ -40,4 +38,5 @@ "SearchClient", "SearchItemPaged", "SearchIndexDocumentBatchingClient", + "RequestEntityTooLargeError", ) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/__init__.py index e8c197d4de974..b74cfa3b899cc 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/__init__.py @@ -2,21 +2,3 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from ._index_documents_batch import IndexDocumentsBatch # pylint: disable=unused-import -from ._search_client import ( # pylint: disable=unused-import - odata, - SearchItemPaged, - SearchClient, -) -from ._queries import ( # pylint: disable=unused-import - AutocompleteQuery, - SearchQuery, - SuggestQuery, -) -from ._generated.models import ( # pylint: disable=unused-import - IndexAction, - IndexingResult, -) -from ._search_index_document_batching_client import ( # pylint: disable=unused-import - SearchIndexDocumentBatchingClient, -) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/__init__.py deleted file mode 100644 index 6768e3864dca3..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/__init__.py +++ /dev/null @@ -1,16 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._search_service_client import SearchServiceClient -__all__ = ['SearchServiceClient'] - -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/_configuration.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/_configuration.py deleted file mode 100644 index 2a23ee76017d9..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/_configuration.py +++ /dev/null @@ -1,57 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - -VERSION = "unknown" - -class SearchServiceClientConfiguration(Configuration): - """Configuration for SearchServiceClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: The endpoint URL of the search service. - :type endpoint: str - """ - - def __init__( - self, - endpoint, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - if endpoint is None: - raise ValueError("Parameter 'endpoint' must not be None.") - super(SearchServiceClientConfiguration, self).__init__(**kwargs) - - self.endpoint = endpoint - self.api_version = "2020-06-30" - kwargs.setdefault('sdk_moniker', 'searchserviceclient/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/_search_service_client.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/_search_service_client.py deleted file mode 100644 index 4026396093417..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/_search_service_client.py +++ /dev/null @@ -1,63 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from msrest import Deserializer, Serializer -from azure.core import PipelineClient - -from ._configuration import SearchServiceClientConfiguration -from .operations import IndexesOperations -from .operations import SearchServiceClientOperationsMixin -from . import models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - - -class SearchServiceClient(SearchServiceClientOperationsMixin): - """Client that can be used to manage and query indexes and documents, - as well as manage other resources, on a search service. - - :param endpoint: The endpoint URL of the search service. - :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__( - self, - endpoint, # type: str - **kwargs # type: Any - ): # pylint: disable=missing-client-constructor-parameter-credential - # type: (...) -> None - base_url = '{endpoint}' - self._config = SearchServiceClientConfiguration(endpoint, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.indexes = IndexesOperations( - self._client, self._config, self._serialize, self._deserialize) - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> SearchServiceClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/__init__.py deleted file mode 100644 index bc2235f978a0a..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/__init__.py +++ /dev/null @@ -1,10 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._search_service_client_async import SearchServiceClient -__all__ = ['SearchServiceClient'] diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/_configuration_async.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/_configuration_async.py deleted file mode 100644 index 8d0da5ed73526..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/_configuration_async.py +++ /dev/null @@ -1,51 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies - -VERSION = "unknown" - -class SearchServiceClientConfiguration(Configuration): - """Configuration for SearchServiceClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: The endpoint URL of the search service. - :type endpoint: str - """ - - def __init__( - self, - endpoint: str, - **kwargs: Any - ) -> None: - if endpoint is None: - raise ValueError("Parameter 'endpoint' must not be None.") - super(SearchServiceClientConfiguration, self).__init__(**kwargs) - - self.endpoint = endpoint - self.api_version = "2020-06-30" - kwargs.setdefault('sdk_moniker', 'searchserviceclient/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/_search_service_client_async.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/_search_service_client_async.py deleted file mode 100644 index 6c793f2dcb69d..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/_search_service_client_async.py +++ /dev/null @@ -1,65 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from msrest import Deserializer, Serializer -from azure.core import AsyncPipelineClient - -from ._configuration_async import SearchServiceClientConfiguration -from .operations_async import IndexesOperations -from .operations_async import SearchServiceClientOperationsMixin -from .. import models - - -class SearchServiceClient(SearchServiceClientOperationsMixin): - """Client that can be used to manage and query indexes and documents, as well as manage other resources, - on a search service. - - :ivar data_sources: DataSourcesOperations operations - :vartype data_sources: azure.search.documents.indexes.aio.operations_async.DataSourcesOperations - :ivar indexers: IndexersOperations operations - :vartype indexers: azure.search.documents.indexes.aio.operations_async.IndexersOperations - :ivar skillsets: SkillsetsOperations operations - :vartype skillsets: azure.search.documents.indexes.aio.operations_async.SkillsetsOperations - :ivar synonym_maps: SynonymMapsOperations operations - :vartype synonym_maps: azure.search.documents.indexes.aio.operations_async.SynonymMapsOperations - :ivar indexes: IndexesOperations operations - :vartype indexes: azure.search.documents.indexes.aio.operations_async.IndexesOperations - :param endpoint: The endpoint URL of the search service. - :type endpoint: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - """ - - # pylint: disable=missing-client-constructor-parameter-credential - def __init__( - self, - endpoint: str, - **kwargs: Any - ) -> None: - base_url = '{endpoint}' - self._config = SearchServiceClientConfiguration(endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.indexes = IndexesOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "SearchServiceClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/__init__.py deleted file mode 100644 index 027b3f5c8eb65..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/__init__.py +++ /dev/null @@ -1,15 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._indexes_operations_async import IndexesOperations -from ._search_service_client_operations_async import SearchServiceClientOperationsMixin - -__all__ = [ - 'IndexesOperations', - 'SearchServiceClientOperationsMixin', -] diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/_indexes_operations_async.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/_indexes_operations_async.py deleted file mode 100644 index 899ac0d8363fc..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/_indexes_operations_async.py +++ /dev/null @@ -1,103 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IndexesOperations: - """IndexesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.indexes.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - index_name: str, - request_options: Optional["models.RequestOptions"] = None, - **kwargs - ) -> "models.SearchIndex": - # pylint: disable=protected-access - """Retrieves an index definition. - - :param index_name: The name of the index to retrieve. - :type index_name: str - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SearchIndex, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.SearchIndex - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndex"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - api_version = "2020-06-30" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _x_ms_client_request_id is not None: - header_parameters['x-ms-client-request-id'] = \ - self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') - header_parameters['Accept'] = 'application/json' - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = \ - await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.SearchError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('SearchIndex', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/_search_service_client_operations_async.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/_search_service_client_operations_async.py deleted file mode 100644 index 7f3d4e66ee024..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/aio/operations_async/_search_service_client_operations_async.py +++ /dev/null @@ -1,79 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class SearchServiceClientOperationsMixin: - - async def get_service_statistics( - self, - request_options: Optional["models.RequestOptions"] = None, - **kwargs - ) -> "models.ServiceStatistics": - # pylint: disable=protected-access - """Gets service level statistics for a search service. - - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceStatistics, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.ServiceStatistics - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServiceStatistics"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - api_version = "2020-06-30" - - # Construct URL - url = self.get_service_statistics.metadata['url'] # type: ignore - path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _x_ms_client_request_id is not None: - header_parameters['x-ms-client-request-id'] = \ - self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') - header_parameters['Accept'] = 'application/json' - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = \ - await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.SearchError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('ServiceStatistics', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_service_statistics.metadata = {'url': '/servicestats'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/__init__.py deleted file mode 100644 index b1be346130b4c..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/__init__.py +++ /dev/null @@ -1,22 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import RequestOptions - from ._models_py3 import SearchError - from ._models_py3 import SearchIndex -except (SyntaxError, ImportError): - from ._models import RequestOptions # type: ignore - from ._models import SearchError # type: ignore - from ._models import SearchIndex # type: ignore - -__all__ = [ - 'RequestOptions', - 'SearchError', - 'SearchIndex', -] diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/_models.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/_models.py deleted file mode 100644 index 3d3c1f735726b..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/_models.py +++ /dev/null @@ -1,612 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import msrest.serialization - - -class TokenFilter(msrest.serialization.Model): - """Base type for token filters. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AsciiFoldingTokenFilter, CjkBigramTokenFilter, CommonGramTokenFilter, - DictionaryDecompounderTokenFilter, EdgeNGramTokenFilter, EdgeNGramTokenFilterV2, - ElisionTokenFilter, KeepTokenFilter, KeywordMarkerTokenFilter, LengthTokenFilter, - LimitTokenFilter, NGramTokenFilter, NGramTokenFilterV2, PatternCaptureTokenFilter, - PatternReplaceTokenFilter, PhoneticTokenFilter, ShingleTokenFilter, SnowballTokenFilter, - StemmerOverrideTokenFilter, StemmerTokenFilter, StopwordsTokenFilter, SynonymTokenFilter, - TruncateTokenFilter, UniqueTokenFilter, WordDelimiterTokenFilter. - - All required parameters must be populated in order to send to Azure. - - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled - by server. - :type odata_type: str - :param name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :type name: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': { - '#Microsoft.Azure.Search.AsciiFoldingTokenFilter': 'AsciiFoldingTokenFilter', - '#Microsoft.Azure.Search.CjkBigramTokenFilter': 'CjkBigramTokenFilter', - '#Microsoft.Azure.Search.CommonGramTokenFilter': 'CommonGramTokenFilter', - '#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter': 'DictionaryDecompounderTokenFilter', - '#Microsoft.Azure.Search.EdgeNGramTokenFilter': 'EdgeNGramTokenFilter', - '#Microsoft.Azure.Search.EdgeNGramTokenFilterV2': 'EdgeNGramTokenFilterV2', - '#Microsoft.Azure.Search.ElisionTokenFilter': 'ElisionTokenFilter', - '#Microsoft.Azure.Search.KeepTokenFilter': 'KeepTokenFilter', - '#Microsoft.Azure.Search.KeywordMarkerTokenFilter': 'KeywordMarkerTokenFilter', - '#Microsoft.Azure.Search.LengthTokenFilter': 'LengthTokenFilter', - '#Microsoft.Azure.Search.LimitTokenFilter': 'LimitTokenFilter', - '#Microsoft.Azure.Search.NGramTokenFilter': 'NGramTokenFilter', - '#Microsoft.Azure.Search.NGramTokenFilterV2': 'NGramTokenFilterV2', - '#Microsoft.Azure.Search.PatternCaptureTokenFilter': 'PatternCaptureTokenFilter', - '#Microsoft.Azure.Search.PatternReplaceTokenFilter': 'PatternReplaceTokenFilter', - '#Microsoft.Azure.Search.PhoneticTokenFilter': 'PhoneticTokenFilter', - '#Microsoft.Azure.Search.ShingleTokenFilter': 'ShingleTokenFilter', - '#Microsoft.Azure.Search.SnowballTokenFilter': 'SnowballTokenFilter', - '#Microsoft.Azure.Search.StemmerOverrideTokenFilter': 'StemmerOverrideTokenFilter', - '#Microsoft.Azure.Search.StemmerTokenFilter': 'StemmerTokenFilter', - '#Microsoft.Azure.Search.StopwordsTokenFilter': 'StopwordsTokenFilter', - '#Microsoft.Azure.Search.SynonymTokenFilter': 'SynonymTokenFilter', - '#Microsoft.Azure.Search.TruncateTokenFilter': 'TruncateTokenFilter', - '#Microsoft.Azure.Search.UniqueTokenFilter': 'UniqueTokenFilter', - '#Microsoft.Azure.Search.WordDelimiterTokenFilter': 'WordDelimiterTokenFilter' - } - } - - def __init__( - self, - **kwargs - ): - super(TokenFilter, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = kwargs['name'] - - -class Similarity(msrest.serialization.Model): - """Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie queries - to documents. The higher the score, the more relevant the document is to that specific query. - Those scores are used to rank the search results. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BM25Similarity, ClassicSimilarity. - - All required parameters must be populated in order to send to Azure. - - :param odata_type: Required. Constant filled by server. - :type odata_type: str - """ - - _validation = { - 'odata_type': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': {'#Microsoft.Azure.Search.BM25Similarity': 'BM25Similarity', - '#Microsoft.Azure.Search.ClassicSimilarity': 'ClassicSimilarity'} - } - - def __init__( - self, - **kwargs - ): - super(Similarity, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - - -class LexicalTokenizer(msrest.serialization.Model): - """Base type for tokenizers. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ClassicTokenizer, EdgeNGramTokenizer, KeywordTokenizer, KeywordTokenizerV2, - MicrosoftLanguageStemmingTokenizer, MicrosoftLanguageTokenizer, NGramTokenizer, - PathHierarchyTokenizerV2, PatternTokenizer, LuceneStandardTokenizer, LuceneStandardTokenizerV2, - UaxUrlEmailTokenizer. - - All required parameters must be populated in order to send to Azure. - - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, - dashes or underscores, can only start and end with alphanumeric characters, and is limited to - 128 characters. - :type name: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': { - '#Microsoft.Azure.Search.ClassicTokenizer': 'ClassicTokenizer', - '#Microsoft.Azure.Search.EdgeNGramTokenizer': 'EdgeNGramTokenizer', - '#Microsoft.Azure.Search.KeywordTokenizer': 'KeywordTokenizer', - '#Microsoft.Azure.Search.KeywordTokenizerV2': 'KeywordTokenizerV2', - '#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer': 'MicrosoftLanguageStemmingTokenizer', - '#Microsoft.Azure.Search.MicrosoftLanguageTokenizer': 'MicrosoftLanguageTokenizer', - '#Microsoft.Azure.Search.NGramTokenizer': 'NGramTokenizer', - '#Microsoft.Azure.Search.PathHierarchyTokenizerV2': 'PathHierarchyTokenizerV2', - '#Microsoft.Azure.Search.PatternTokenizer': 'PatternTokenizer', - '#Microsoft.Azure.Search.StandardTokenizer': 'LuceneStandardTokenizer', - '#Microsoft.Azure.Search.StandardTokenizerV2': 'LuceneStandardTokenizerV2', - '#Microsoft.Azure.Search.UaxUrlEmailTokenizer': 'UaxUrlEmailTokenizer' - } - } - - def __init__( - self, - **kwargs - ): - super(LexicalTokenizer, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = kwargs['name'] - - -class CorsOptions(msrest.serialization.Model): - """Defines options to control Cross-Origin Resource Sharing (CORS) for an index. - - All required parameters must be populated in order to send to Azure. - - :param allowed_origins: Required. The list of origins from which JavaScript code will be - granted access to your index. Can contain a list of hosts of the form {protocol}://{fully- - qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not recommended). - :type allowed_origins: list[str] - :param max_age_in_seconds: The duration for which browsers should cache CORS preflight - responses. Defaults to 5 minutes. - :type max_age_in_seconds: long - """ - - _validation = { - 'allowed_origins': {'required': True}, - } - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(CorsOptions, self).__init__(**kwargs) - self.allowed_origins = kwargs['allowed_origins'] - self.max_age_in_seconds = kwargs.get('max_age_in_seconds', None) - - -class LexicalAnalyzer(msrest.serialization.Model): - """Base type for analyzers. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CustomAnalyzer, PatternAnalyzer, LuceneStandardAnalyzer, StopAnalyzer. - - All required parameters must be populated in order to send to Azure. - - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, - dashes or underscores, can only start and end with alphanumeric characters, and is limited to - 128 characters. - :type name: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': { - '#Microsoft.Azure.Search.CustomAnalyzer': 'CustomAnalyzer', - '#Microsoft.Azure.Search.PatternAnalyzer': 'PatternAnalyzer', - '#Microsoft.Azure.Search.StandardAnalyzer': 'LuceneStandardAnalyzer', - '#Microsoft.Azure.Search.StopAnalyzer': 'StopAnalyzer' - } - } - - def __init__( - self, - **kwargs - ): - super(LexicalAnalyzer, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = kwargs['name'] - - -class RequestOptions(msrest.serialization.Model): - """Parameter group. - - :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :type x_ms_client_request_id: str - """ - - _attribute_map = { - 'x_ms_client_request_id': {'key': 'x-ms-client-request-id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RequestOptions, self).__init__(**kwargs) - self.x_ms_client_request_id = kwargs.get('x_ms_client_request_id', None) - - -class ScoringProfile(msrest.serialization.Model): - """Defines parameters for a search index that influence scoring in search queries. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the scoring profile. - :type name: str - :param text_weights: Parameters that boost scoring based on text matches in certain index - fields. - :type text_weights: ~azure.search.documents.indexes.models.TextWeights - :param functions: The collection of functions that influence the scoring of documents. - :type functions: list[~azure.search.documents.indexes.models.ScoringFunction] - :param function_aggregation: A value indicating how the results of individual scoring functions - should be combined. Defaults to "Sum". Ignored if there are no scoring functions. Possible - values include: "sum", "average", "minimum", "maximum", "firstMatching". - :type function_aggregation: str or - ~azure.search.documents.indexes.models.ScoringFunctionAggregation - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'text_weights': {'key': 'text', 'type': 'TextWeights'}, - 'functions': {'key': 'functions', 'type': '[ScoringFunction]'}, - 'function_aggregation': {'key': 'functionAggregation', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScoringProfile, self).__init__(**kwargs) - self.name = kwargs['name'] - self.text_weights = kwargs.get('text_weights', None) - self.functions = kwargs.get('functions', None) - self.function_aggregation = kwargs.get('function_aggregation', None) - - -class SearchError(msrest.serialization.Model): - """Describes an error condition for the Azure Cognitive Search API. - - 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. - - :ivar code: One of a server-defined set of error codes. - :vartype code: str - :ivar message: Required. A human-readable representation of the error. - :vartype message: str - :ivar details: An array of details about specific errors that led to this reported error. - :vartype details: list[~azure.search.documents.indexes.models.SearchError] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'required': True, 'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[SearchError]'}, - } - - def __init__( - self, - **kwargs - ): - super(SearchError, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None - - -class SearchField(msrest.serialization.Model): - # pylint: disable=too-many-instance-attributes - """Represents a field in an index definition, which describes the name, data type, and search behavior of a field. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the field, which must be unique within the fields collection - of the index or parent field. - :type name: str - :param type: Required. The data type of the field. Possible values include: "Edm.String", - "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", - "Edm.GeographyPoint", "Edm.ComplexType". - :type type: str or ~azure.search.documents.indexes.models.SearchFieldDataType - :param key: A value indicating whether the field uniquely identifies documents in the index. - Exactly one top-level field in each index must be chosen as the key field and it must be of - type Edm.String. Key fields can be used to look up documents directly and update or delete - specific documents. Default is false for simple fields and null for complex fields. - :type key: bool - :param retrievable: A value indicating whether the field can be returned in a search result. - You can disable this option if you want to use a field (for example, margin) as a filter, - sorting, or scoring mechanism but do not want the field to be visible to the end user. This - property must be true for key fields, and it must be null for complex fields. This property can - be changed on existing fields. Enabling this property does not cause any increase in index - storage requirements. Default is true for simple fields and null for complex fields. - :type retrievable: bool - :param searchable: A value indicating whether the field is full-text searchable. This means it - will undergo analysis such as word-breaking during indexing. If you set a searchable field to a - value like "sunny day", internally it will be split into the individual tokens "sunny" and - "day". This enables full-text searches for these terms. Fields of type Edm.String or - Collection(Edm.String) are searchable by default. This property must be false for simple fields - of other non-string data types, and it must be null for complex fields. Note: searchable fields - consume extra space in your index since Azure Cognitive Search will store an additional - tokenized version of the field value for full-text searches. If you want to save space in your - index and you don't need a field to be included in searches, set searchable to false. - :type searchable: bool - :param filterable: A value indicating whether to enable the field to be referenced in $filter - queries. filterable differs from searchable in how strings are handled. Fields of type - Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so - comparisons are for exact matches only. For example, if you set such a field f to "sunny day", - $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property - must be null for complex fields. Default is true for simple fields and null for complex fields. - :type filterable: bool - :param sortable: A value indicating whether to enable the field to be referenced in $orderby - expressions. By default Azure Cognitive Search sorts results by score, but in many experiences - users will want to sort by fields in the documents. A simple field can be sortable only if it - is single-valued (it has a single value in the scope of the parent document). Simple collection - fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex - collections are also multi-valued, and therefore cannot be sortable. This is true whether it's - an immediate parent field, or an ancestor field, that's the complex collection. Complex fields - cannot be sortable and the sortable property must be null for such fields. The default for - sortable is true for single-valued simple fields, false for multi-valued simple fields, and - null for complex fields. - :type sortable: bool - :param facetable: A value indicating whether to enable the field to be referenced in facet - queries. Typically used in a presentation of search results that includes hit count by category - (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so - on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or - Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple - fields. - :type facetable: bool - :param analyzer: The name of the analyzer to use for the field. This option can be used only - with searchable fields and it can't be set together with either searchAnalyzer or - indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null - for complex fields. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", - "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh- - Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", - "cs.microsoft", "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", - "en.microsoft", "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", - "fr.lucene", "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", - "gu.microsoft", "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", - "is.microsoft", "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", - "ja.microsoft", "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", - "lv.lucene", "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", - "no.lucene", "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt- - PT.microsoft", "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", - "ru.lucene", "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", - "es.microsoft", "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", - "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", - "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", - "simple", "stop", "whitespace". - :type analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :param search_analyzer: The name of the analyzer used at search time for the field. This option - can be used only with searchable fields. It must be set together with indexAnalyzer and it - cannot be set together with the analyzer option. This property cannot be set to the name of a - language analyzer; use the analyzer property instead if you need a language analyzer. This - analyzer can be updated on an existing field. Must be null for complex fields. Possible values - include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", - "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", "zh- - Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene", "da.microsoft", - "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene", "et.microsoft", - "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene", "de.microsoft", - "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft", "hi.microsoft", - "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft", "id.lucene", - "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene", "kn.microsoft", - "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft", "ml.microsoft", - "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene", "pl.microsoft", - "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", "pt-PT.lucene", - "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", "sr- - cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :type search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :param index_analyzer: The name of the analyzer used at indexing time for the field. This - option can be used only with searchable fields. It must be set together with searchAnalyzer and - it cannot be set together with the analyzer option. This property cannot be set to the name of - a language analyzer; use the analyzer property instead if you need a language analyzer. Once - the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. - Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", - "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh- - Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", - "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", - "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", - "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", - "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", - "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", - "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", - "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", - "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", "sr- - cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :type index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :param synonym_maps: A list of the names of synonym maps to associate with this field. This - option can be used only with searchable fields. Currently only one synonym map per field is - supported. Assigning a synonym map to a field ensures that query terms targeting that field are - expanded at query-time using the rules in the synonym map. This attribute can be changed on - existing fields. Must be null or an empty collection for complex fields. - :type synonym_maps: list[str] - :param fields: A list of sub-fields if this is a field of type Edm.ComplexType or - Collection(Edm.ComplexType). Must be null or empty for simple fields. - :type fields: list[~azure.search.documents.indexes.models.SearchField] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'bool'}, - 'retrievable': {'key': 'retrievable', 'type': 'bool'}, - 'searchable': {'key': 'searchable', 'type': 'bool'}, - 'filterable': {'key': 'filterable', 'type': 'bool'}, - 'sortable': {'key': 'sortable', 'type': 'bool'}, - 'facetable': {'key': 'facetable', 'type': 'bool'}, - 'analyzer': {'key': 'analyzer', 'type': 'str'}, - 'search_analyzer': {'key': 'searchAnalyzer', 'type': 'str'}, - 'index_analyzer': {'key': 'indexAnalyzer', 'type': 'str'}, - 'synonym_maps': {'key': 'synonymMaps', 'type': '[str]'}, - 'fields': {'key': 'fields', 'type': '[SearchField]'}, - } - - def __init__( - self, - **kwargs - ): - super(SearchField, self).__init__(**kwargs) - self.name = kwargs['name'] - self.type = kwargs['type'] - self.key = kwargs.get('key', None) - self.retrievable = kwargs.get('retrievable', None) - self.searchable = kwargs.get('searchable', None) - self.filterable = kwargs.get('filterable', None) - self.sortable = kwargs.get('sortable', None) - self.facetable = kwargs.get('facetable', None) - self.analyzer = kwargs.get('analyzer', None) - self.search_analyzer = kwargs.get('search_analyzer', None) - self.index_analyzer = kwargs.get('index_analyzer', None) - self.synonym_maps = kwargs.get('synonym_maps', None) - self.fields = kwargs.get('fields', None) - - -class SearchIndex(msrest.serialization.Model): - # pylint: disable=too-many-instance-attributes - """Represents a search index definition, which describes the fields and search behavior of an index. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the index. - :type name: str - :param fields: Required. The fields of the index. - :type fields: list[~azure.search.documents.indexes.models.SearchField] - :param scoring_profiles: The scoring profiles for the index. - :type scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile] - :param default_scoring_profile: The name of the scoring profile to use if none is specified in - the query. If this property is not set and no scoring profile is specified in the query, then - default scoring (tf-idf) will be used. - :type default_scoring_profile: str - :param cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index. - :type cors_options: ~azure.search.documents.indexes.models.CorsOptions - :param suggesters: The suggesters for the index. - :type suggesters: list[~azure.search.documents.indexes.models.Suggester] - :param analyzers: The analyzers for the index. - :type analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] - :param tokenizers: The tokenizers for the index. - :type tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer] - :param token_filters: The token filters for the index. - :type token_filters: list[~azure.search.documents.indexes.models.TokenFilter] - :param char_filters: The character filters for the index. - :type char_filters: list[~azure.search.documents.indexes.models.CharFilter] - :param encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your data when you - want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive - Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive - Search will ignore attempts to set this property to null. You can change this property as - needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with - customer-managed keys is not available for free search services, and is only available for paid - services created on or after January 1, 2019. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :param similarity: The type of similarity algorithm to be used when scoring and ranking the - documents matching a search query. The similarity algorithm can only be defined at index - creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity - algorithm is used. - :type similarity: ~azure.search.documents.indexes.models.Similarity - :param e_tag: The ETag of the index. - :type e_tag: str - """ - - _validation = { - 'name': {'required': True}, - 'fields': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'fields': {'key': 'fields', 'type': '[SearchField]'}, - 'scoring_profiles': {'key': 'scoringProfiles', 'type': '[ScoringProfile]'}, - 'default_scoring_profile': {'key': 'defaultScoringProfile', 'type': 'str'}, - 'cors_options': {'key': 'corsOptions', 'type': 'CorsOptions'}, - 'suggesters': {'key': 'suggesters', 'type': '[Suggester]'}, - 'analyzers': {'key': 'analyzers', 'type': '[LexicalAnalyzer]'}, - 'tokenizers': {'key': 'tokenizers', 'type': '[LexicalTokenizer]'}, - 'token_filters': {'key': 'tokenFilters', 'type': '[TokenFilter]'}, - 'char_filters': {'key': 'charFilters', 'type': '[CharFilter]'}, - 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, - 'similarity': {'key': 'similarity', 'type': 'Similarity'}, - 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SearchIndex, self).__init__(**kwargs) - self.name = kwargs['name'] - self.fields = kwargs['fields'] - self.scoring_profiles = kwargs.get('scoring_profiles', None) - self.default_scoring_profile = kwargs.get('default_scoring_profile', None) - self.cors_options = kwargs.get('cors_options', None) - self.suggesters = kwargs.get('suggesters', None) - self.analyzers = kwargs.get('analyzers', None) - self.tokenizers = kwargs.get('tokenizers', None) - self.token_filters = kwargs.get('token_filters', None) - self.char_filters = kwargs.get('char_filters', None) - self.encryption_key = kwargs.get('encryption_key', None) - self.similarity = kwargs.get('similarity', None) - self.e_tag = kwargs.get('e_tag', None) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/_models_py3.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/_models_py3.py deleted file mode 100644 index 0fa3265bb4e29..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/models/_models_py3.py +++ /dev/null @@ -1,655 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import List, Optional, Union -import msrest.serialization - - -class TokenFilter(msrest.serialization.Model): - """Base type for token filters. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AsciiFoldingTokenFilter, CjkBigramTokenFilter, CommonGramTokenFilter, - DictionaryDecompounderTokenFilter, EdgeNGramTokenFilter, EdgeNGramTokenFilterV2, ElisionTokenFilter, - KeepTokenFilter, KeywordMarkerTokenFilter, LengthTokenFilter, LimitTokenFilter, NGramTokenFilter, - NGramTokenFilterV2, PatternCaptureTokenFilter, PatternReplaceTokenFilter, PhoneticTokenFilter, - ShingleTokenFilter, SnowballTokenFilter, StemmerOverrideTokenFilter, StemmerTokenFilter, - StopwordsTokenFilter, SynonymTokenFilter, TruncateTokenFilter, UniqueTokenFilter, WordDelimiterTokenFilter. - - All required parameters must be populated in order to send to Azure. - - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled - by server. - :type odata_type: str - :param name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :type name: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': { - '#Microsoft.Azure.Search.AsciiFoldingTokenFilter': 'AsciiFoldingTokenFilter', - '#Microsoft.Azure.Search.CjkBigramTokenFilter': 'CjkBigramTokenFilter', - '#Microsoft.Azure.Search.CommonGramTokenFilter': 'CommonGramTokenFilter', - '#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter': 'DictionaryDecompounderTokenFilter', - '#Microsoft.Azure.Search.EdgeNGramTokenFilter': 'EdgeNGramTokenFilter', - '#Microsoft.Azure.Search.EdgeNGramTokenFilterV2': 'EdgeNGramTokenFilterV2', - '#Microsoft.Azure.Search.ElisionTokenFilter': 'ElisionTokenFilter', - '#Microsoft.Azure.Search.KeepTokenFilter': 'KeepTokenFilter', - '#Microsoft.Azure.Search.KeywordMarkerTokenFilter': 'KeywordMarkerTokenFilter', - '#Microsoft.Azure.Search.LengthTokenFilter': 'LengthTokenFilter', - '#Microsoft.Azure.Search.LimitTokenFilter': 'LimitTokenFilter', - '#Microsoft.Azure.Search.NGramTokenFilter': 'NGramTokenFilter', - '#Microsoft.Azure.Search.NGramTokenFilterV2': 'NGramTokenFilterV2', - '#Microsoft.Azure.Search.PatternCaptureTokenFilter': 'PatternCaptureTokenFilter', - '#Microsoft.Azure.Search.PatternReplaceTokenFilter': 'PatternReplaceTokenFilter', - '#Microsoft.Azure.Search.PhoneticTokenFilter': 'PhoneticTokenFilter', - '#Microsoft.Azure.Search.ShingleTokenFilter': 'ShingleTokenFilter', - '#Microsoft.Azure.Search.SnowballTokenFilter': 'SnowballTokenFilter', - '#Microsoft.Azure.Search.StemmerOverrideTokenFilter': 'StemmerOverrideTokenFilter', - '#Microsoft.Azure.Search.StemmerTokenFilter': 'StemmerTokenFilter', - '#Microsoft.Azure.Search.StopwordsTokenFilter': 'StopwordsTokenFilter', - '#Microsoft.Azure.Search.SynonymTokenFilter': 'SynonymTokenFilter', - '#Microsoft.Azure.Search.TruncateTokenFilter': 'TruncateTokenFilter', - '#Microsoft.Azure.Search.UniqueTokenFilter': 'UniqueTokenFilter', - '#Microsoft.Azure.Search.WordDelimiterTokenFilter': 'WordDelimiterTokenFilter' - } - } - - def __init__( - self, - *, - name: str, - **kwargs - ): - super(TokenFilter, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = name - - -class Similarity(msrest.serialization.Model): - """Base type for similarity algorithms. Similarity algorithms are used to calculate scores that - tie queries to documents. The higher the score, the more relevant the document is to that specific - query. Those scores are used to rank the search results. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BM25Similarity, ClassicSimilarity. - - All required parameters must be populated in order to send to Azure. - - :param odata_type: Required. Constant filled by server. - :type odata_type: str - """ - - _validation = { - 'odata_type': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': {'#Microsoft.Azure.Search.BM25Similarity': 'BM25Similarity', - '#Microsoft.Azure.Search.ClassicSimilarity': 'ClassicSimilarity'} - } - - def __init__( - self, - **kwargs - ): - super(Similarity, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - - -class LexicalTokenizer(msrest.serialization.Model): - """Base type for tokenizers. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ClassicTokenizer, EdgeNGramTokenizer, KeywordTokenizer, KeywordTokenizerV2, - MicrosoftLanguageStemmingTokenizer, MicrosoftLanguageTokenizer, NGramTokenizer, PathHierarchyTokenizerV2, - PatternTokenizer, LuceneStandardTokenizer, LuceneStandardTokenizerV2, UaxUrlEmailTokenizer. - - All required parameters must be populated in order to send to Azure. - - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, - dashes or underscores, can only start and end with alphanumeric characters, and is limited to - 128 characters. - :type name: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': { - '#Microsoft.Azure.Search.ClassicTokenizer': 'ClassicTokenizer', - '#Microsoft.Azure.Search.EdgeNGramTokenizer': 'EdgeNGramTokenizer', - '#Microsoft.Azure.Search.KeywordTokenizer': 'KeywordTokenizer', - '#Microsoft.Azure.Search.KeywordTokenizerV2': 'KeywordTokenizerV2', - '#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer': 'MicrosoftLanguageStemmingTokenizer', - '#Microsoft.Azure.Search.MicrosoftLanguageTokenizer': 'MicrosoftLanguageTokenizer', - '#Microsoft.Azure.Search.NGramTokenizer': 'NGramTokenizer', - '#Microsoft.Azure.Search.PathHierarchyTokenizerV2': 'PathHierarchyTokenizerV2', - '#Microsoft.Azure.Search.PatternTokenizer': 'PatternTokenizer', - '#Microsoft.Azure.Search.StandardTokenizer': 'LuceneStandardTokenizer', - '#Microsoft.Azure.Search.StandardTokenizerV2': 'LuceneStandardTokenizerV2', - '#Microsoft.Azure.Search.UaxUrlEmailTokenizer': 'UaxUrlEmailTokenizer' - } - } - - def __init__( - self, - *, - name: str, - **kwargs - ): - super(LexicalTokenizer, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = name - - -class CorsOptions(msrest.serialization.Model): - """Defines options to control Cross-Origin Resource Sharing (CORS) for an index. - - All required parameters must be populated in order to send to Azure. - - :param allowed_origins: Required. The list of origins from which JavaScript code will be - granted access to your index. Can contain a list of hosts of the form {protocol}://{fully- - qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not recommended). - :type allowed_origins: list[str] - :param max_age_in_seconds: The duration for which browsers should cache CORS preflight - responses. Defaults to 5 minutes. - :type max_age_in_seconds: long - """ - - _validation = { - 'allowed_origins': {'required': True}, - } - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, - } - - def __init__( - self, - *, - allowed_origins: List[str], - max_age_in_seconds: Optional[int] = None, - **kwargs - ): - super(CorsOptions, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.max_age_in_seconds = max_age_in_seconds - - -class LexicalAnalyzer(msrest.serialization.Model): - """Base type for analyzers. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CustomAnalyzer, PatternAnalyzer, LuceneStandardAnalyzer, StopAnalyzer. - - All required parameters must be populated in order to send to Azure. - - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, - dashes or underscores, can only start and end with alphanumeric characters, and is limited to - 128 characters. - :type name: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': { - '#Microsoft.Azure.Search.CustomAnalyzer': 'CustomAnalyzer', - '#Microsoft.Azure.Search.PatternAnalyzer': 'PatternAnalyzer', - '#Microsoft.Azure.Search.StandardAnalyzer': 'LuceneStandardAnalyzer', - '#Microsoft.Azure.Search.StopAnalyzer': 'StopAnalyzer' - } - } - - def __init__( - self, - *, - name: str, - **kwargs - ): - super(LexicalAnalyzer, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = name - - -class RequestOptions(msrest.serialization.Model): - """Parameter group. - - :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :type x_ms_client_request_id: str - """ - - _attribute_map = { - 'x_ms_client_request_id': {'key': 'x-ms-client-request-id', 'type': 'str'}, - } - - def __init__( - self, - *, - x_ms_client_request_id: Optional[str] = None, - **kwargs - ): - super(RequestOptions, self).__init__(**kwargs) - self.x_ms_client_request_id = x_ms_client_request_id - - -class ScoringProfile(msrest.serialization.Model): - """Defines parameters for a search index that influence scoring in search queries. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the scoring profile. - :type name: str - :param text_weights: Parameters that boost scoring based on text matches in certain index - fields. - :type text_weights: ~azure.search.documents.indexes.models.TextWeights - :param functions: The collection of functions that influence the scoring of documents. - :type functions: list[~azure.search.documents.indexes.models.ScoringFunction] - :param function_aggregation: A value indicating how the results of individual scoring functions - should be combined. Defaults to "Sum". Ignored if there are no scoring functions. Possible - values include: "sum", "average", "minimum", "maximum", "firstMatching". - :type function_aggregation: str or - ~azure.search.documents.indexes.models.ScoringFunctionAggregation - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'text_weights': {'key': 'text', 'type': 'TextWeights'}, - 'functions': {'key': 'functions', 'type': '[ScoringFunction]'}, - 'function_aggregation': {'key': 'functionAggregation', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - text_weights: Optional["TextWeights"] = None, - functions: Optional[List["ScoringFunction"]] = None, - function_aggregation: Optional[Union[str, "ScoringFunctionAggregation"]] = None, - **kwargs - ): - super(ScoringProfile, self).__init__(**kwargs) - self.name = name - self.text_weights = text_weights - self.functions = functions - self.function_aggregation = function_aggregation - - -class SearchError(msrest.serialization.Model): - """Describes an error condition for the Azure Cognitive Search API. - - 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. - - :ivar code: One of a server-defined set of error codes. - :vartype code: str - :ivar message: Required. A human-readable representation of the error. - :vartype message: str - :ivar details: An array of details about specific errors that led to this reported error. - :vartype details: list[~azure.search.documents.indexes.models.SearchError] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'required': True, 'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[SearchError]'}, - } - - def __init__( - self, - **kwargs - ): - super(SearchError, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None - - -class SearchField(msrest.serialization.Model): - # pylint: disable=too-many-instance-attributes - """Represents a field in an index definition, which describes the name, data type, and search behavior of a field. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the field, which must be unique within the fields collection - of the index or parent field. - :type name: str - :param type: Required. The data type of the field. Possible values include: "Edm.String", - "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", - "Edm.GeographyPoint", "Edm.ComplexType". - :type type: str or ~azure.search.documents.indexes.models.SearchFieldDataType - :param key: A value indicating whether the field uniquely identifies documents in the index. - Exactly one top-level field in each index must be chosen as the key field and it must be of - type Edm.String. Key fields can be used to look up documents directly and update or delete - specific documents. Default is false for simple fields and null for complex fields. - :type key: bool - :param retrievable: A value indicating whether the field can be returned in a search result. - You can disable this option if you want to use a field (for example, margin) as a filter, - sorting, or scoring mechanism but do not want the field to be visible to the end user. This - property must be true for key fields, and it must be null for complex fields. This property can - be changed on existing fields. Enabling this property does not cause any increase in index - storage requirements. Default is true for simple fields and null for complex fields. - :type retrievable: bool - :param searchable: A value indicating whether the field is full-text searchable. This means it - will undergo analysis such as word-breaking during indexing. If you set a searchable field to a - value like "sunny day", internally it will be split into the individual tokens "sunny" and - "day". This enables full-text searches for these terms. Fields of type Edm.String or - Collection(Edm.String) are searchable by default. This property must be false for simple fields - of other non-string data types, and it must be null for complex fields. Note: searchable fields - consume extra space in your index since Azure Cognitive Search will store an additional - tokenized version of the field value for full-text searches. If you want to save space in your - index and you don't need a field to be included in searches, set searchable to false. - :type searchable: bool - :param filterable: A value indicating whether to enable the field to be referenced in $filter - queries. filterable differs from searchable in how strings are handled. Fields of type - Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so - comparisons are for exact matches only. For example, if you set such a field f to "sunny day", - $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property - must be null for complex fields. Default is true for simple fields and null for complex fields. - :type filterable: bool - :param sortable: A value indicating whether to enable the field to be referenced in $orderby - expressions. By default Azure Cognitive Search sorts results by score, but in many experiences - users will want to sort by fields in the documents. A simple field can be sortable only if it - is single-valued (it has a single value in the scope of the parent document). Simple collection - fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex - collections are also multi-valued, and therefore cannot be sortable. This is true whether it's - an immediate parent field, or an ancestor field, that's the complex collection. Complex fields - cannot be sortable and the sortable property must be null for such fields. The default for - sortable is true for single-valued simple fields, false for multi-valued simple fields, and - null for complex fields. - :type sortable: bool - :param facetable: A value indicating whether to enable the field to be referenced in facet - queries. Typically used in a presentation of search results that includes hit count by category - (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so - on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or - Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple - fields. - :type facetable: bool - :param analyzer: The name of the analyzer to use for the field. This option can be used only - with searchable fields and it can't be set together with either searchAnalyzer or - indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null - for complex fields. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", - "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh- - Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", - "cs.microsoft", "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", - "en.microsoft", "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", - "fr.lucene", "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", - "gu.microsoft", "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", - "is.microsoft", "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", - "ja.microsoft", "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", - "lv.lucene", "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", - "no.lucene", "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt- - PT.microsoft", "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", - "ru.lucene", "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", - "es.microsoft", "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", - "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", - "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", - "simple", "stop", "whitespace". - :type analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :param search_analyzer: The name of the analyzer used at search time for the field. This option - can be used only with searchable fields. It must be set together with indexAnalyzer and it - cannot be set together with the analyzer option. This property cannot be set to the name of a - language analyzer; use the analyzer property instead if you need a language analyzer. This - analyzer can be updated on an existing field. Must be null for complex fields. Possible values - include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", - "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", "zh- - Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene", "da.microsoft", - "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene", "et.microsoft", - "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene", "de.microsoft", - "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft", "hi.microsoft", - "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft", "id.lucene", - "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene", "kn.microsoft", - "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft", "ml.microsoft", - "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene", "pl.microsoft", - "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", "pt-PT.lucene", - "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", "sr- - cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :type search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :param index_analyzer: The name of the analyzer used at indexing time for the field. This - option can be used only with searchable fields. It must be set together with searchAnalyzer and - it cannot be set together with the analyzer option. This property cannot be set to the name of - a language analyzer; use the analyzer property instead if you need a language analyzer. Once - the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. - Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", - "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh- - Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", - "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", - "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", - "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", - "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", - "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", - "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", - "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", - "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", "sr- - cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :type index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :param synonym_maps: A list of the names of synonym maps to associate with this field. This - option can be used only with searchable fields. Currently only one synonym map per field is - supported. Assigning a synonym map to a field ensures that query terms targeting that field are - expanded at query-time using the rules in the synonym map. This attribute can be changed on - existing fields. Must be null or an empty collection for complex fields. - :type synonym_maps: list[str] - :param fields: A list of sub-fields if this is a field of type Edm.ComplexType or - Collection(Edm.ComplexType). Must be null or empty for simple fields. - :type fields: list[~azure.search.documents.indexes.models.SearchField] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'bool'}, - 'retrievable': {'key': 'retrievable', 'type': 'bool'}, - 'searchable': {'key': 'searchable', 'type': 'bool'}, - 'filterable': {'key': 'filterable', 'type': 'bool'}, - 'sortable': {'key': 'sortable', 'type': 'bool'}, - 'facetable': {'key': 'facetable', 'type': 'bool'}, - 'analyzer': {'key': 'analyzer', 'type': 'str'}, - 'search_analyzer': {'key': 'searchAnalyzer', 'type': 'str'}, - 'index_analyzer': {'key': 'indexAnalyzer', 'type': 'str'}, - 'synonym_maps': {'key': 'synonymMaps', 'type': '[str]'}, - 'fields': {'key': 'fields', 'type': '[SearchField]'}, - } - - def __init__( - self, - *, - name: str, - type: Union[str, "SearchFieldDataType"], - key: Optional[bool] = None, - retrievable: Optional[bool] = None, - searchable: Optional[bool] = None, - filterable: Optional[bool] = None, - sortable: Optional[bool] = None, - facetable: Optional[bool] = None, - analyzer: Optional[Union[str, "LexicalAnalyzerName"]] = None, - search_analyzer: Optional[Union[str, "LexicalAnalyzerName"]] = None, - index_analyzer: Optional[Union[str, "LexicalAnalyzerName"]] = None, - synonym_maps: Optional[List[str]] = None, - fields: Optional[List["SearchField"]] = None, - **kwargs - ): # pylint: disable=redefined-builtin - super(SearchField, self).__init__(**kwargs) - self.name = name - self.type = type - self.key = key - self.retrievable = retrievable - self.searchable = searchable - self.filterable = filterable - self.sortable = sortable - self.facetable = facetable - self.analyzer = analyzer - self.search_analyzer = search_analyzer - self.index_analyzer = index_analyzer - self.synonym_maps = synonym_maps - self.fields = fields - - -class SearchIndex(msrest.serialization.Model): - # pylint: disable=too-many-instance-attributes - """Represents a search index definition, which describes the fields and search behavior of an index. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the index. - :type name: str - :param fields: Required. The fields of the index. - :type fields: list[~azure.search.documents.indexes.models.SearchField] - :param scoring_profiles: The scoring profiles for the index. - :type scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile] - :param default_scoring_profile: The name of the scoring profile to use if none is specified in - the query. If this property is not set and no scoring profile is specified in the query, then - default scoring (tf-idf) will be used. - :type default_scoring_profile: str - :param cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index. - :type cors_options: ~azure.search.documents.indexes.models.CorsOptions - :param suggesters: The suggesters for the index. - :type suggesters: list[~azure.search.documents.indexes.models.Suggester] - :param analyzers: The analyzers for the index. - :type analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] - :param tokenizers: The tokenizers for the index. - :type tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer] - :param token_filters: The token filters for the index. - :type token_filters: list[~azure.search.documents.indexes.models.TokenFilter] - :param char_filters: The character filters for the index. - :type char_filters: list[~azure.search.documents.indexes.models.CharFilter] - :param encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your data when you - want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive - Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive - Search will ignore attempts to set this property to null. You can change this property as - needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with - customer-managed keys is not available for free search services, and is only available for paid - services created on or after January 1, 2019. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :param similarity: The type of similarity algorithm to be used when scoring and ranking the - documents matching a search query. The similarity algorithm can only be defined at index - creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity - algorithm is used. - :type similarity: ~azure.search.documents.indexes.models.Similarity - :param e_tag: The ETag of the index. - :type e_tag: str - """ - - _validation = { - 'name': {'required': True}, - 'fields': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'fields': {'key': 'fields', 'type': '[SearchField]'}, - 'scoring_profiles': {'key': 'scoringProfiles', 'type': '[ScoringProfile]'}, - 'default_scoring_profile': {'key': 'defaultScoringProfile', 'type': 'str'}, - 'cors_options': {'key': 'corsOptions', 'type': 'CorsOptions'}, - 'suggesters': {'key': 'suggesters', 'type': '[Suggester]'}, - 'analyzers': {'key': 'analyzers', 'type': '[LexicalAnalyzer]'}, - 'tokenizers': {'key': 'tokenizers', 'type': '[LexicalTokenizer]'}, - 'token_filters': {'key': 'tokenFilters', 'type': '[TokenFilter]'}, - 'char_filters': {'key': 'charFilters', 'type': '[CharFilter]'}, - 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, - 'similarity': {'key': 'similarity', 'type': 'Similarity'}, - 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - fields: List["SearchField"], - scoring_profiles: Optional[List["ScoringProfile"]] = None, - default_scoring_profile: Optional[str] = None, - cors_options: Optional["CorsOptions"] = None, - suggesters: Optional[List["Suggester"]] = None, - analyzers: Optional[List["LexicalAnalyzer"]] = None, - tokenizers: Optional[List["LexicalTokenizer"]] = None, - token_filters: Optional[List["TokenFilter"]] = None, - char_filters: Optional[List["CharFilter"]] = None, - encryption_key: Optional["SearchResourceEncryptionKey"] = None, - similarity: Optional["Similarity"] = None, - e_tag: Optional[str] = None, - **kwargs - ): - super(SearchIndex, self).__init__(**kwargs) - self.name = name - self.fields = fields - self.scoring_profiles = scoring_profiles - self.default_scoring_profile = default_scoring_profile - self.cors_options = cors_options - self.suggesters = suggesters - self.analyzers = analyzers - self.tokenizers = tokenizers - self.token_filters = token_filters - self.char_filters = char_filters - self.encryption_key = encryption_key - self.similarity = similarity - self.e_tag = e_tag diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/__init__.py deleted file mode 100644 index 5a2eb2acf63ab..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/__init__.py +++ /dev/null @@ -1,15 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._indexes_operations import IndexesOperations -from ._search_service_client_operations import SearchServiceClientOperationsMixin - -__all__ = [ - 'IndexesOperations', - 'SearchServiceClientOperationsMixin', -] diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/_indexes_operations.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/_indexes_operations.py deleted file mode 100644 index 555e197f40c96..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/_indexes_operations.py +++ /dev/null @@ -1,108 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IndexesOperations(object): - """IndexesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.indexes.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - index_name, # type: str - request_options=None, # type: Optional["models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> "models.SearchIndex" - # pylint: disable=protected-access - """Retrieves an index definition. - - :param index_name: The name of the index to retrieve. - :type index_name: str - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SearchIndex, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.SearchIndex - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndex"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - api_version = "2020-06-30" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _x_ms_client_request_id is not None: - header_parameters['x-ms-client-request-id'] = \ - self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') - header_parameters['Accept'] = 'application/json' - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = \ - self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.SearchError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('SearchIndex', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/_search_service_client_operations.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/_search_service_client_operations.py deleted file mode 100644 index 32ab6e9e12cf2..0000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_generated_serviceclient/operations/_search_service_client_operations.py +++ /dev/null @@ -1,84 +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. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class SearchServiceClientOperationsMixin(object): - - def get_service_statistics( - self, - request_options=None, # type: Optional["models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> "models.ServiceStatistics" - # pylint: disable=protected-access - """Gets service level statistics for a search service. - - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceStatistics, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.ServiceStatistics - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServiceStatistics"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - api_version = "2020-06-30" - - # Construct URL - url = self.get_service_statistics.metadata['url'] # type: ignore - path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _x_ms_client_request_id is not None: - header_parameters['x-ms-client-request-id'] = \ - self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') - header_parameters['Accept'] = 'application/json' - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = \ - self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.SearchError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('ServiceStatistics', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_service_statistics.metadata = {'url': '/servicestats'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_index_documents_batch.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_index_documents_batch.py index 1caf527f91638..d0baf3f4690bf 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_index_documents_batch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/_index_documents_batch.py @@ -13,7 +13,7 @@ from typing import List -def flatten_args(args): +def _flatten_args(args): # type (Union[List[dict], List[List[dict]]]) -> List[dict] if len(args) == 1 and isinstance(args[0], (list, tuple)): return args[0] @@ -32,8 +32,6 @@ class IndexDocumentsBatch(object): def __init__(self): # type: () -> None self._actions = [] # type: List[IndexAction] - self._succeeded_actions = [] # type: List[IndexAction] - self._failed_actions = [] # type: List[IndexAction] self._lock = Lock() def __repr__(self): @@ -51,9 +49,10 @@ def add_upload_actions(self, *documents): :param documents: Documents to upload to an Azure search index. May be a single list of documents, or documents as individual parameters. :type documents: dict or list[dict] + :return: the added actions :rtype: List[IndexAction] """ - return self._extend_batch(flatten_args(documents), "upload") + return self._extend_batch(_flatten_args(documents), "upload") def add_delete_actions(self, *documents): # type (Union[List[dict], List[List[dict]]]) -> List[IndexAction] @@ -71,9 +70,10 @@ def add_delete_actions(self, *documents): :param documents: Documents to delete from an Azure search index. May be a single list of documents, or documents as individual parameters. :type documents: dict or list[dict] + :return: the added actions :rtype: List[IndexAction] """ - return self._extend_batch(flatten_args(documents), "delete") + return self._extend_batch(_flatten_args(documents), "delete") def add_merge_actions(self, *documents): # type (Union[List[dict], List[List[dict]]]) -> List[IndexAction] @@ -88,9 +88,10 @@ def add_merge_actions(self, *documents): :param documents: Documents to merge into an Azure search index. May be a single list of documents, or documents as individual parameters. :type documents: dict or list[dict] + :return: the added actions :rtype: List[IndexAction] """ - return self._extend_batch(flatten_args(documents), "merge") + return self._extend_batch(_flatten_args(documents), "merge") def add_merge_or_upload_actions(self, *documents): # type (Union[List[dict], List[List[dict]]]) -> List[IndexAction] @@ -105,9 +106,10 @@ def add_merge_or_upload_actions(self, *documents): index. May be a single list of documents, or documents as individual parameters. :type documents: dict or list[dict] + :return: the added actions :rtype: List[IndexAction] """ - return self._extend_batch(flatten_args(documents), "mergeOrUpload") + return self._extend_batch(_flatten_args(documents), "mergeOrUpload") @property def actions(self): @@ -118,24 +120,6 @@ def actions(self): """ return list(self._actions) - @property - def succeeded_actions(self): - # type: () -> List[IndexAction] - """The list of currently succeeded index actions. - - :rtype: List[IndexAction] - """ - return list(self._succeeded_actions) - - @property - def failed_actions(self): - # type: () -> List[IndexAction] - """The list of currently failed index actions. - - :rtype: List[IndexAction] - """ - return list(self._failed_actions) - def dequeue_actions(self): # type: () -> List[IndexAction] """Get the list of currently configured index actions and clear it. @@ -154,19 +138,12 @@ def enqueue_actions(self, new_actions): with self._lock: self._actions.extend(new_actions) - def enqueue_succeeded_actions(self, succeeded_actions): - # type: (List[IndexAction]) -> None - """Enqueue a list of succeeded index actions. - """ - with self._lock: - self._succeeded_actions.extend(succeeded_actions) - - def enqueue_failed_actions(self, failed_actions): - # type: (List[IndexAction]) -> None - """Enqueue a list of failed index actions. + def enqueue_action(self, new_action): + # type: (IndexAction) -> None + """Enqueue a single index action """ with self._lock: - self._failed_actions.extend(failed_actions) + self._actions.append(new_action) def _extend_batch(self, documents, action_type): # type: (List[dict], str) -> List[IndexAction] diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_client.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_client.py index 567bf500154ae..f8f3b108f161d 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_client.py @@ -17,7 +17,6 @@ from ._queries import AutocompleteQuery, SearchQuery, SuggestQuery from .._headers_mixin import HeadersMixin from .._version import SDK_MONIKER -from ._search_index_document_batching_client import SearchIndexDocumentBatchingClient if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports @@ -96,16 +95,11 @@ def __repr__(self): def close(self): # type: () -> None - """Close the :class:`~azure.search.SearchClient` session. + """Close the :class:`~azure.search.documents.SearchClient` session. """ return self._client.close() - def get_index_document_batching_client(self, **kwargs): - # type: (str, dict) -> SearchIndexDocumentBatchingClient - """Return a search index document batching client""" - return SearchIndexDocumentBatchingClient(self._endpoint, self._index_name, self._credential, **kwargs) - @distributed_trace def get_document_count(self, **kwargs): # type: (**Any) -> int @@ -531,10 +525,10 @@ def index_documents(self, batch, **kwargs): :param batch: A batch of document operations to perform. :type batch: IndexDocumentsBatch :rtype: List[IndexingResult] + :raises :class:`~azure.search.documents.RequestEntityTooLargeError` """ return self._index_documents_actions(actions=batch.actions, **kwargs) - @distributed_trace def _index_documents_actions(self, actions, **kwargs): # type: (List[IndexAction], **Any) -> List[IndexingResult] error_map = {413: RequestEntityTooLargeError} diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_index_document_batching_client.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_index_document_batching_client.py index 32dbd6ad949bd..4a09fa11eea12 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_index_document_batching_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_index_document_batching_client.py @@ -4,15 +4,15 @@ # license information. # -------------------------------------------------------------------------- from typing import cast, List, TYPE_CHECKING +import time import threading -from typing_extensions import Protocol from azure.core.tracing.decorator import distributed_trace -from azure.core.exceptions import HttpResponseError -from .._api_versions import validate_api_version +from azure.core.exceptions import ServiceResponseTimeoutError from ._utils import is_retryable_status_code +from ._search_index_document_batching_client_base import SearchIndexDocumentBatchingClientBase from ._generated import SearchIndexClient -from ._generated_serviceclient import SearchServiceClient +from ..indexes import SearchIndexClient as SearchServiceClient from ._generated.models import IndexBatch, IndexingResult from ._search_documents_error import RequestEntityTooLargeError from ._index_documents_batch import IndexDocumentsBatch @@ -24,24 +24,7 @@ from typing import Any, Union from azure.core.credentials import AzureKeyCredential -class PersistenceBase(Protocol): - def add_queued_actions(self, actions, **kwargs): - # type: (*str, List[IndexAction], dict) -> None - pass - - def add_succeeded_action(self, action, **kwargs): - # type: (*str, IndexAction, dict) -> None - pass - - def add_failed_action(self, action, **kwargs): - # type: (*str, IndexAction, dict) -> None - pass - - def remove_queued_action(self, action, **kwargs): - # type: (*str, IndexAction, dict) -> None - pass - -class SearchIndexDocumentBatchingClient(HeadersMixin): +class SearchIndexDocumentBatchingClient(SearchIndexDocumentBatchingClientBase, HeadersMixin): """A client to do index document batching. :param endpoint: The URL endpoint of an Azure search service @@ -50,49 +33,37 @@ class SearchIndexDocumentBatchingClient(HeadersMixin): :type index_name: str :param credential: A credential to authorize search client requests :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword bool auto_flush: if the auto flush mode is on. Default to True. :keyword int window: how many seconds if there is no changes that triggers auto flush. - if window is less or equal than 0, it will disable auto flush - :keyword int batch_size: batch size. Default to 1000. It only takes affect when auto_flush is on - :keyword persistence: persistence hook. If it is set, the batch client will dump actions queue when it changes - :paramtype persistence: PersistenceBase + Default to 60 seconds + :keyword hook: hook. If it is set, the client will call corresponding methods when status changes + :paramtype hook: IndexingHook :keyword str api_version: The Search API version to use for requests. """ # pylint: disable=too-many-instance-attributes - _ODATA_ACCEPT = "application/json;odata.metadata=none" # type: str - _DEFAULT_WINDOW = 0 - _DEFAULT_BATCH_SIZE = 1000 def __init__(self, endpoint, index_name, credential, **kwargs): # type: (str, str, AzureKeyCredential, **Any) -> None - - api_version = kwargs.pop('api_version', None) - validate_api_version(api_version) - self._batch_size = kwargs.pop('batch_size', self._DEFAULT_BATCH_SIZE) - self._window = kwargs.pop('window', self._DEFAULT_WINDOW) - self._auto_flush = self._window > 0 + super(SearchIndexDocumentBatchingClient, self).__init__( + endpoint=endpoint, + index_name=index_name, + credential=credential, + **kwargs) self._index_documents_batch = IndexDocumentsBatch() - self._endpoint = endpoint # type: str - self._index_name = index_name # type: str - self._index_key = None - self._credential = credential # type: AzureKeyCredential self._client = SearchIndexClient( endpoint=endpoint, index_name=index_name, sdk_moniker=SDK_MONIKER, **kwargs ) # type: SearchIndexClient self._reset_timer() - self._persistence = kwargs.pop('persistence', None) - def _cleanup(self, flush=True, raise_error=False): + def _cleanup(self, flush=True): # type: () -> None """Clean up the client. :param bool flush: flush the actions queue before shutdown the client Default to True. - :param bool raise_error: raise error if there are failures during flushing - Default to False which re-queue the failed tasks and retry on next flush. - :raises: ~azure.core.exceptions.HttpResponseError """ if flush: - self.flush(raise_error=raise_error) + self.flush() if self._auto_flush: self._timer.cancel() @@ -111,92 +82,74 @@ def actions(self): """ return self._index_documents_batch.actions - @property - def succeeded_actions(self): - # type: () -> List[IndexAction] - """The list of currently succeeded index actions in queue. - - :rtype: List[IndexAction] - """ - return self._index_documents_batch.succeeded_actions - - @property - def failed_actions(self): - # type: () -> List[IndexAction] - """The list of currently failed index actions in queue. - - :rtype: List[IndexAction] - """ - return self._index_documents_batch.failed_actions - - @property - def batch_size(self): - # type: () -> int - return self._batch_size - def close(self): # type: () -> None - """Close the :class:`~azure.search.SearchClient` session. - - """ + """Close the :class:`~azure.search.documents.SearchClient` session.""" self._cleanup(flush=True) return self._client.close() - def flush(self, raise_error=False): - # type: (bool) -> None + @distributed_trace + def flush(self, timeout=86400, **kwargs): # pylint:disable=unused-argument + # type: (int) -> bool """Flush the batch. - :param bool raise_error: raise error if there are failures during flushing - Default to False which re-queue the failed tasks and retry on next flush. - :raises: ~azure.core.exceptions.HttpResponseError + :param int timeout: time out setting. Default is 86400s (one day) + :return: True if there are errors. Else False + :rtype: bool """ - # get actions + has_error = False + begin_time = int(time.time()) + while len(self.actions) > 0: + now = int(time.time()) + remaining = timeout - (now - begin_time) + if remaining < 0: + raise ServiceResponseTimeoutError("Service response time out") + result = self._process(timeout=remaining, raise_error=False) + if result: + has_error = True + return has_error + + def _process(self, timeout=86400, **kwargs): + # type: (int) -> bool + raise_error = kwargs.pop("raise_error", True) actions = self._index_documents_batch.dequeue_actions() - try: - results = self._index_documents_actions(actions=actions) - # re-queue 207: - if not self._index_key: - client = SearchServiceClient(self._endpoint) - kwargs = {"headers": self._merge_client_headers({})} - result = client.indexes.get(self._index_name, **kwargs) - if not result: - # Cannot find the index - self._index_key = "" - else: + has_error = False + if not self._index_key: + try: + client = SearchServiceClient(self._endpoint, self._credential) + result = client.get_index(self._index_name) + if result: for field in result.fields: if field.key: self._index_key = field.name break + except Exception: # pylint: disable=broad-except + pass - has_error = False - + try: + results = self._index_documents_actions(actions=actions, timeout=timeout) for result in results: - action = [x for x in actions if x.get(self._index_key) == result.key] - if is_retryable_status_code(result.status_code): - self._index_documents_batch.enqueue_actions(action) - has_error = True - elif result.status_code in [200, 201]: - if self._persistence: - self._persistence.remove_queued_action(action) - self._persistence.add_succeeded_action(action) - self._index_documents_batch.enqueue_succeeded_actions(action) - else: - if self._persistence: - self._persistence.remove_queued_action(action) - self._persistence.add_failed_action(action) - self._index_documents_batch.enqueue_failed_actions(action) - has_error = True - - if has_error and raise_error: - raise HttpResponseError(message="Some actions failed. Failed actions are re-queued.") - - except Exception: # pylint: disable=broad-except - # Do we want to re-queue these failures? - self._index_documents_batch.enqueue_actions(actions) - if raise_error: - raise - - def _flush_if_needed(self): + try: + action = next(x for x in actions if x.additional_properties.get(self._index_key) == result.key) + if result.succeeded: + self._succeed_callback(action) + elif is_retryable_status_code(result.status_code): + self._retry_action(action) + has_error = True + else: + self._fail_callback(action) + has_error = True + except StopIteration: + pass + return has_error + except Exception: # pylint: disable=broad-except + for action in actions: + self._retry_action(action) + if raise_error: + raise + return True + + def _process_if_needed(self): # type: () -> bool """ Every time when a new action is queued, this method will be triggered. It checks the actions already queued and flushes them if: @@ -212,7 +165,7 @@ def _flush_if_needed(self): if len(self._index_documents_batch.actions) < self._batch_size: return - self.flush(raise_error=False) + self._process(raise_error=False) def _reset_timer(self): # pylint: disable=access-member-before-definition @@ -220,7 +173,7 @@ def _reset_timer(self): self._timer.cancel() except AttributeError: pass - self._timer = threading.Timer(self._window, self.flush) + self._timer = threading.Timer(self._window, self._process) if self._auto_flush: self._timer.start() @@ -232,9 +185,8 @@ def add_upload_actions(self, documents): :type documents: List[dict] """ actions = self._index_documents_batch.add_upload_actions(documents) - if self._persistence: - self._persistence.add_queued_actions(actions) - self._flush_if_needed() + self._new_callback(actions) + self._process_if_needed() def add_delete_actions(self, documents): # type: (List[dict]) -> None @@ -244,9 +196,8 @@ def add_delete_actions(self, documents): :type documents: List[dict] """ actions = self._index_documents_batch.add_delete_actions(documents) - if self._persistence: - self._persistence.add_queued_actions(actions) - self._flush_if_needed() + self._new_callback(actions) + self._process_if_needed() def add_merge_actions(self, documents): # type: (List[dict]) -> None @@ -256,9 +207,8 @@ def add_merge_actions(self, documents): :type documents: List[dict] """ actions = self._index_documents_batch.add_merge_actions(documents) - if self._persistence: - self._persistence.add_queued_actions(actions) - self._flush_if_needed() + self._new_callback(actions) + self._process_if_needed() def add_merge_or_upload_actions(self, documents): # type: (List[dict]) -> None @@ -268,15 +218,15 @@ def add_merge_or_upload_actions(self, documents): :type documents: List[dict] """ actions = self._index_documents_batch.add_merge_or_upload_actions(documents) - if self._persistence: - self._persistence.add_queued_actions(actions) - self._flush_if_needed() + self._new_callback(actions) + self._process_if_needed() - @distributed_trace def _index_documents_actions(self, actions, **kwargs): # type: (List[IndexAction], **Any) -> List[IndexingResult] error_map = {413: RequestEntityTooLargeError} + timeout = kwargs.pop('timeout', 86400) + begin_time = int(time.time()) kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) try: index_documents = IndexBatch(actions=actions) @@ -286,21 +236,31 @@ def _index_documents_actions(self, actions, **kwargs): if len(actions) == 1: raise pos = round(len(actions) / 2) + now = int(time.time()) + remaining = timeout - (now - begin_time) + if remaining < 0: + raise ServiceResponseTimeoutError("Service response time out") batch_response_first_half = self._index_documents_actions( actions=actions[:pos], error_map=error_map, + timeout=remaining, **kwargs ) - if batch_response_first_half: + if len(batch_response_first_half) > 0: result_first_half = cast(List[IndexingResult], batch_response_first_half.results) else: result_first_half = [] + now = int(time.time()) + remaining = timeout - (now - begin_time) + if remaining < 0: + raise ServiceResponseTimeoutError("Service response time out") batch_response_second_half = self._index_documents_actions( actions=actions[pos:], error_map=error_map, + timeout=remaining, **kwargs ) - if batch_response_second_half: + if len(batch_response_second_half) > 0: result_second_half = cast(List[IndexingResult], batch_response_second_half.results) else: result_second_half = [] @@ -315,3 +275,21 @@ def __exit__(self, *args): # type: (*Any) -> None self.close() self._client.__exit__(*args) # pylint:disable=no-member + + def _retry_action(self, action): + # type: (IndexAction) -> None + if not self._index_key: + self._fail_callback(action) + return + key = action.additional_properties.get(self._index_key) + counter = self._retry_counter.get(key) + if not counter: + # first time that fails + self._retry_counter[key] = 1 + self._index_documents_batch.enqueue_action(action) + elif counter < self._RETRY_LIMIT - 1: + # not reach retry limit yet + self._retry_counter[key] = counter + 1 + self._index_documents_batch.enqueue_action(action) + else: + self._fail_callback(action) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_index_document_batching_client_base.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_index_document_batching_client_base.py new file mode 100644 index 0000000000000..cfa0caa101206 --- /dev/null +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/_search_index_document_batching_client_base.py @@ -0,0 +1,79 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from typing import List, TYPE_CHECKING +from typing_extensions import Protocol + +from .._api_versions import validate_api_version +from .._headers_mixin import HeadersMixin + +if TYPE_CHECKING: + # pylint:disable=unused-import,ungrouped-imports + from typing import Any, Union + from azure.core.credentials import AzureKeyCredential + +class IndexingHook(Protocol): + def new(self, action, **kwargs): + # type: (*str, IndexAction, dict) -> None + pass + + def progress(self, action, **kwargs): + # type: (*str, IndexAction, dict) -> None + pass + + def error(self, action, **kwargs): + # type: (*str, IndexAction, dict) -> None + pass + + def remove(self, action, **kwargs): + # type: (*str, IndexAction, dict) -> None + pass + +class SearchIndexDocumentBatchingClientBase(HeadersMixin): + """Base of search index document batching client""" + _ODATA_ACCEPT = "application/json;odata.metadata=none" # type: str + _DEFAULT_WINDOW = 60 + _DEFAULT_BATCH_SIZE = 1000 + _RETRY_LIMIT = 10 + + def __init__(self, endpoint, index_name, credential, **kwargs): + # type: (str, str, AzureKeyCredential, **Any) -> None + + api_version = kwargs.pop('api_version', None) + validate_api_version(api_version) + self._auto_flush = kwargs.pop('auto_flush', True) + self._batch_size = kwargs.pop('batch_size', self._DEFAULT_BATCH_SIZE) + self._window = kwargs.pop('window', self._DEFAULT_WINDOW) + if self._window <= 0: + self._window = 86400 + self._endpoint = endpoint # type: str + self._index_name = index_name # type: str + self._index_key = None + self._credential = credential # type: AzureKeyCredential + self._hook = kwargs.pop('hook', None) + self._retry_counter = {} + + @property + def batch_size(self): + # type: () -> int + return self._batch_size + + def _succeed_callback(self, action): + # type: (IndexAction) -> None + if self._hook: + self._hook.remove(action) + self._hook.progress(action) + + def _fail_callback(self, action): + # type: (IndexAction) -> None + if self._hook: + self._hook.remove(action) + self._hook.error(action) + + def _new_callback(self, actions): + # type: (List[IndexAction]) -> None + if self._hook: + for action in actions: + self._hook.new(action) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/__init__.py index 6832d836c1c0d..b74cfa3b899cc 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/__init__.py @@ -2,7 +2,3 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from ._search_client_async import AsyncSearchItemPaged, SearchClient -from ._search_index_document_batching_client_async import SearchIndexDocumentBatchingClient - -__all__ = ("AsyncSearchItemPaged", "SearchClient", "SearchIndexDocumentBatchingClient") diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_index_documents_batch_async.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_index_documents_batch_async.py index 7c709c7881e70..d53936c059da6 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_index_documents_batch_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_index_documents_batch_async.py @@ -13,7 +13,7 @@ from typing import List -def flatten_args(args): +def _flatten_args(args): # type (Union[List[dict], List[List[dict]]]) -> List[dict] if len(args) == 1 and isinstance(args[0], (list, tuple)): return args[0] @@ -32,8 +32,6 @@ class IndexDocumentsBatch(object): def __init__(self): # type: () -> None self._actions = [] # type: List[IndexAction] - self._succeeded_actions = [] # type: List[IndexAction] - self._failed_actions = [] # type: List[IndexAction] self._lock = asyncio.Lock() def __repr__(self): @@ -51,9 +49,10 @@ async def add_upload_actions(self, *documents): :param documents: Documents to upload to an Azure search index. May be a single list of documents, or documents as individual parameters. :type documents: dict or list[dict] + :return: the added actions :rtype: List[IndexAction] """ - return await self._extend_batch(flatten_args(documents), "upload") + return await self._extend_batch(_flatten_args(documents), "upload") async def add_delete_actions(self, *documents): # type (Union[List[dict], List[List[dict]]]) -> List[IndexAction] @@ -71,9 +70,10 @@ async def add_delete_actions(self, *documents): :param documents: Documents to delete from an Azure search index. May be a single list of documents, or documents as individual parameters. :type documents: dict or list[dict] + :return: the added actions :rtype: List[IndexAction] """ - return await self._extend_batch(flatten_args(documents), "delete") + return await self._extend_batch(_flatten_args(documents), "delete") async def add_merge_actions(self, *documents): # type (Union[List[dict], List[List[dict]]]) -> List[IndexAction] @@ -88,9 +88,10 @@ async def add_merge_actions(self, *documents): :param documents: Documents to merge into an Azure search index. May be a single list of documents, or documents as individual parameters. :type documents: dict or list[dict] + :return: the added actions :rtype: List[IndexAction] """ - return await self._extend_batch(flatten_args(documents), "merge") + return await self._extend_batch(_flatten_args(documents), "merge") async def add_merge_or_upload_actions(self, *documents): # type (Union[List[dict], List[List[dict]]]) -> List[IndexAction] @@ -105,9 +106,10 @@ async def add_merge_or_upload_actions(self, *documents): index. May be a single list of documents, or documents as individual parameters. :type documents: dict or list[dict] + :return: the added actions :rtype: List[IndexAction] """ - return await self._extend_batch(flatten_args(documents), "mergeOrUpload") + return await self._extend_batch(_flatten_args(documents), "mergeOrUpload") @property def actions(self): @@ -118,24 +120,6 @@ def actions(self): """ return list(self._actions) - @property - def succeeded_actions(self): - # type: () -> List[IndexAction] - """The list of currently succeeded index actions. - - :rtype: List[IndexAction] - """ - return list(self._succeeded_actions) - - @property - def failed_actions(self): - # type: () -> List[IndexAction] - """The list of currently failed index actions. - - :rtype: List[IndexAction] - """ - return list(self._failed_actions) - async def dequeue_actions(self): # type: () -> List[IndexAction] """Get the list of currently configured index actions and clear it. @@ -154,19 +138,12 @@ async def enqueue_actions(self, new_actions): async with self._lock: self._actions.extend(new_actions) - async def enqueue_succeeded_actions(self, succeeded_actions): - # type: (List[IndexAction]) -> None - """Enqueue a list of succeeded index actions. - """ - async with self._lock: - self._succeeded_actions.extend(succeeded_actions) - - async def enqueue_failed_actions(self, failed_actions): - # type: (List[IndexAction]) -> None - """Enqueue a list of failed index actions. + async def enqueue_action(self, new_action): + # type: (IndexAction) -> None + """Enqueue a single index action to index. """ async with self._lock: - self._failed_actions.extend(failed_actions) + self._actions.append(new_action) async def _extend_batch(self, documents, action_type): # type: (List[dict], str) -> List[IndexAction] diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_search_client_async.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_search_client_async.py index 599cee40846a7..b1ea7aaef7cc7 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_search_client_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_search_client_async.py @@ -15,7 +15,6 @@ from ..._api_versions import validate_api_version from ..._headers_mixin import HeadersMixin from ..._version import SDK_MONIKER -from ._search_index_document_batching_client_async import SearchIndexDocumentBatchingClient if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports @@ -68,16 +67,11 @@ def __repr__(self): async def close(self): # type: () -> None - """Close the :class:`~azure.search.aio.SearchClient` session. + """Close the :class:`~azure.search.documents.aio.SearchClient` session. """ return await self._client.close() - def get_index_document_batching_client(self, **kwargs): - # type: (str, dict) -> SearchIndexDocumentBatchingClient - """Return a search index document batching client""" - return SearchIndexDocumentBatchingClient(self._endpoint, self._index_name, self._credential, **kwargs) - @distributed_trace_async async def get_document_count(self, **kwargs): # type: (**Any) -> int @@ -503,6 +497,7 @@ async def index_documents(self, batch, **kwargs): :param batch: A batch of document operations to perform. :type batch: IndexDocumentsBatch :rtype: List[IndexingResult] + :raises :class:`~azure.search.documents.RequestEntityTooLargeError` """ return await self._index_documents_actions(actions=batch.actions, **kwargs) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_search_index_document_batching_client_async.py b/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_search_index_document_batching_client_async.py index 165d5262464ff..ab738e44dc8fc 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_search_index_document_batching_client_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_internal/aio/_search_index_document_batching_client_async.py @@ -4,17 +4,18 @@ # license information. # -------------------------------------------------------------------------- from typing import cast, List, TYPE_CHECKING +import time from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.exceptions import HttpResponseError +from azure.core.exceptions import ServiceResponseTimeoutError from ._timer import Timer from .._utils import is_retryable_status_code -from .._generated_serviceclient.aio import SearchServiceClient +from .._search_index_document_batching_client_base import SearchIndexDocumentBatchingClientBase +from ...indexes.aio import SearchIndexClient as SearchServiceClient from .._generated.aio import SearchIndexClient from .._generated.models import IndexBatch, IndexingResult from .._search_documents_error import RequestEntityTooLargeError from ._index_documents_batch_async import IndexDocumentsBatch -from ..._api_versions import validate_api_version from ..._headers_mixin import HeadersMixin from ..._version import SDK_MONIKER @@ -24,7 +25,7 @@ from azure.core.credentials import AzureKeyCredential -class SearchIndexDocumentBatchingClient(HeadersMixin): +class SearchIndexDocumentBatchingClient(SearchIndexDocumentBatchingClientBase, HeadersMixin): """A client to do index document batching. :param endpoint: The URL endpoint of an Azure search service @@ -33,49 +34,37 @@ class SearchIndexDocumentBatchingClient(HeadersMixin): :type index_name: str :param credential: A credential to authorize search client requests :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword bool auto_flush: if the auto flush mode is on. Default to True. :keyword int window: how many seconds if there is no changes that triggers auto flush. - if window is less or equal than 0, it will disable auto flush - :keyword int batch_size: batch size. Default to 1000. It only takes affect when auto_flush is on - :keyword persistence: persistence hook. If it is set, the batch client will dump actions queue when it changes - :paramtype persistence: PersistenceBase + Default to 60 seconds + :keyword hook: hook. If it is set, the client will call corresponding methods when status changes + :paramtype hook: IndexingHook :keyword str api_version: The Search API version to use for requests. """ # pylint: disable=too-many-instance-attributes - _ODATA_ACCEPT = "application/json;odata.metadata=none" # type: str - _DEFAULT_WINDOW = 0 - _DEFAULT_BATCH_SIZE = 1000 def __init__(self, endpoint, index_name, credential, **kwargs): # type: (str, str, AzureKeyCredential, **Any) -> None - - api_version = kwargs.pop('api_version', None) - validate_api_version(api_version) - self._batch_size = kwargs.pop('batch_size', self._DEFAULT_BATCH_SIZE) - self._window = kwargs.pop('window', self._DEFAULT_WINDOW) - self._auto_flush = self._window > 0 + super(SearchIndexDocumentBatchingClient, self).__init__( + endpoint=endpoint, + index_name=index_name, + credential=credential, + **kwargs) self._index_documents_batch = IndexDocumentsBatch() - self._endpoint = endpoint # type: str - self._index_name = index_name # type: str - self._index_key = None - self._credential = credential # type: AzureKeyCredential self._client = SearchIndexClient( endpoint=endpoint, index_name=index_name, sdk_moniker=SDK_MONIKER, **kwargs ) # type: SearchIndexClient self._reset_timer() - self._persistence = kwargs.pop('persistence', None) - async def _cleanup(self, flush=True, raise_error=False): + async def _cleanup(self, flush=True): # type: () -> None """Clean up the client. :param bool flush: flush the actions queue before shutdown the client Default to True. - :param bool raise_error: raise error if there are failures during flushing - Default to False which re-queue the failed tasks and retry on next flush. - :raises: ~azure.core.exceptions.HttpResponseError """ if flush: - await self.flush(raise_error=raise_error) + await self.flush() if self._auto_flush: self._timer.cancel() @@ -93,92 +82,75 @@ def actions(self): """ return self._index_documents_batch.actions - @property - def succeeded_actions(self): - # type: () -> List[IndexAction] - """The list of currently succeeded index actions in queue. - - :rtype: List[IndexAction] - """ - return self._index_documents_batch.succeeded_actions - - @property - def failed_actions(self): - # type: () -> List[IndexAction] - """The list of currently failed index actions in queue. - - :rtype: List[IndexAction] - """ - return self._index_documents_batch.failed_actions - - @property - def batch_size(self): - # type: () -> int - return self._batch_size - async def close(self): # type: () -> None - """Close the :class:`~azure.search.aio.SearchClient` session. - - """ + """Close the :class:`~azure.search.documents.aio.SearchClient` session.""" await self._cleanup(flush=True) return await self._client.close() - async def flush(self, raise_error=False): - # type: (bool) -> None + @distributed_trace_async + async def flush(self, timeout=86400, **kwargs): # pylint:disable=unused-argument + # type: (bool) -> bool """Flush the batch. - - :param bool raise_error: raise error if there are failures during flushing - Default to False which re-queue the failed tasks and retry on next flush. - :raises: ~azure.core.exceptions.HttpResponseError + :param int timeout: time out setting. Default is 86400s (one day) + :return: True if there are errors. Else False + :rtype: bool """ - # get actions + has_error = False + begin_time = int(time.time()) + while len(self.actions) > 0: + now = int(time.time()) + remaining = timeout - (now - begin_time) + if remaining < 0: + raise ServiceResponseTimeoutError("Service response time out") + result = await self._process(timeout=remaining, raise_error=False) + if result: + has_error = True + return has_error + + async def _process(self, timeout=86400, **kwargs): + # type: (int) -> bool + raise_error = kwargs.pop("raise_error", True) actions = await self._index_documents_batch.dequeue_actions() - try: - results = await self._index_documents_actions(actions=actions) - # re-queue 207: - if not self._index_key: - client = SearchServiceClient(self._endpoint) - kwargs = {"headers": self._merge_client_headers({})} - result = await client.indexes.get(self._index_name, **kwargs) - if not result: - # Cannot find the index - self._index_key = "" - else: + has_error = False + if not self._index_key: + try: + client = SearchServiceClient(self._endpoint, self._credential) + result = await client.get_index(self._index_name) + if result: for field in result.fields: if field.key: self._index_key = field.name break + except Exception: # pylint: disable=broad-except + pass - has_error = False - + try: + results = await self._index_documents_actions(actions=actions, timeout=timeout) for result in results: - action = [x for x in actions if x.get(self._index_key) == result.key] - if is_retryable_status_code(result.status_code): - await self._index_documents_batch.enqueue_actions(action) - has_error = True - elif result.status_code in [200, 201]: - if self._persistence: - self._persistence.remove_queued_action(action) - self._persistence.add_succeeded_action(action) - await self._index_documents_batch.enqueue_succeeded_actions(action) - else: - if self._persistence: - self._persistence.remove_queued_action(action) - self._persistence.add_failed_action(action) - await self._index_documents_batch.enqueue_failed_actions(action) - has_error = True - - if has_error and raise_error: - raise HttpResponseError(message="Some actions failed. Failed actions are re-queued.") + try: + action = next(x for x in actions if x.additional_properties.get(self._index_key) == result.key) + if result.succeeded: + self._succeed_callback(action) + elif is_retryable_status_code(result.status_code): + await self._retry_action(action) + has_error = True + else: + self._fail_callback(action) + has_error = True + except StopIteration: + pass + + return has_error except Exception: # pylint: disable=broad-except - # Do we want to re-queue these failures? - await self._index_documents_batch.enqueue_actions(actions) - if raise_error: - raise + for action in actions: + await self._retry_action(action) + if raise_error: + raise + return True - async def _flush_if_needed(self): + async def _process_if_needed(self): # type: () -> bool """ Every time when a new action is queued, this method will be triggered. It checks the actions already queued and flushes them if: @@ -194,7 +166,7 @@ async def _flush_if_needed(self): if len(self._index_documents_batch.actions) < self._batch_size: return - await self.flush(raise_error=False) + await self._process(raise_error=False) def _reset_timer(self): # pylint: disable=access-member-before-definition @@ -203,7 +175,7 @@ def _reset_timer(self): except AttributeError: pass if self._auto_flush: - self._timer = Timer(self._window, self.flush) + self._timer = Timer(self._window, self._process) async def add_upload_actions(self, documents): # type: (List[dict]) -> None @@ -212,9 +184,8 @@ async def add_upload_actions(self, documents): :type documents: List[dict] """ actions = await self._index_documents_batch.add_upload_actions(documents) - if self._persistence: - self._persistence.add_queued_actions(actions) - await self._flush_if_needed() + self._new_callback(actions) + await self._process_if_needed() async def add_delete_actions(self, documents): # type: (List[dict]) -> None @@ -223,9 +194,8 @@ async def add_delete_actions(self, documents): :type documents: List[dict] """ actions = await self._index_documents_batch.add_delete_actions(documents) - if self._persistence: - self._persistence.add_queued_actions(actions) - await self._flush_if_needed() + self._new_callback(actions) + await self._process_if_needed() async def add_merge_actions(self, documents): # type: (List[dict]) -> None @@ -234,9 +204,8 @@ async def add_merge_actions(self, documents): :type documents: List[dict] """ actions = await self._index_documents_batch.add_merge_actions(documents) - if self._persistence: - self._persistence.add_queued_actions(actions) - await self._flush_if_needed() + self._new_callback(actions) + await self._process_if_needed() async def add_merge_or_upload_actions(self, documents): # type: (List[dict]) -> None @@ -245,15 +214,15 @@ async def add_merge_or_upload_actions(self, documents): :type documents: List[dict] """ actions = await self._index_documents_batch.add_merge_or_upload_actions(documents) - if self._persistence: - self._persistence.add_queued_actions(actions) - await self._flush_if_needed() + self._new_callback(actions) + await self._process_if_needed() - @distributed_trace_async async def _index_documents_actions(self, actions, **kwargs): # type: (List[IndexAction], **Any) -> List[IndexingResult] error_map = {413: RequestEntityTooLargeError} + timeout = kwargs.pop('timeout', 86400) + begin_time = int(time.time()) kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) try: index_documents = IndexBatch(actions=actions) @@ -263,21 +232,29 @@ async def _index_documents_actions(self, actions, **kwargs): if len(actions) == 1: raise pos = round(len(actions) / 2) + now = int(time.time()) + remaining = timeout - (now - begin_time) + if remaining < 0: + raise ServiceResponseTimeoutError("Service response time out") batch_response_first_half = await self._index_documents_actions( actions=actions[:pos], error_map=error_map, **kwargs ) - if batch_response_first_half: + if len(batch_response_first_half) > 0: result_first_half = cast(List[IndexingResult], batch_response_first_half.results) else: result_first_half = [] + now = int(time.time()) + remaining = timeout - (now - begin_time) + if remaining < 0: + raise ServiceResponseTimeoutError("Service response time out") batch_response_second_half = await self._index_documents_actions( actions=actions[pos:], error_map=error_map, **kwargs ) - if batch_response_second_half: + if len(batch_response_second_half) > 0: result_second_half = cast(List[IndexingResult], batch_response_second_half.results) else: result_second_half = [] @@ -292,3 +269,21 @@ async def __aexit__(self, *args): # type: (*Any) -> None await self.close() await self._client.__aexit__(*args) # pylint: disable=no-member + + async def _retry_action(self, action): + # type: (IndexAction) -> None + if not self._index_key: + self._fail_callback(action) + return + key = action.additional_properties.get(self._index_key) + counter = self._retry_counter.get(key) + if not counter: + # first time that fails + self._retry_counter[key] = 1 + await self._index_documents_batch.enqueue_action(action) + elif counter < self._RETRY_LIMIT - 1: + # not reach retry limit yet + self._retry_counter[key] = counter + 1 + await self._index_documents_batch.enqueue_action(action) + else: + self._fail_callback(action) diff --git a/sdk/search/azure-search-documents/azure/search/documents/aio.py b/sdk/search/azure-search-documents/azure/search/documents/aio.py index a389ab6d60db4..0d1c15fb0c58f 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/aio.py +++ b/sdk/search/azure-search-documents/azure/search/documents/aio.py @@ -24,8 +24,8 @@ # # -------------------------------------------------------------------------- -from ._internal.aio import AsyncSearchItemPaged, SearchClient, SearchIndexDocumentBatchingClient - +from ._internal.aio._search_client_async import AsyncSearchItemPaged, SearchClient +from ._internal.aio._search_index_document_batching_client_async import SearchIndexDocumentBatchingClient __all__ = ( "AsyncSearchItemPaged", diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/__init__.py index 2d1a744ba6c0f..5c14c4715f028 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/__init__.py @@ -24,11 +24,8 @@ # # -------------------------------------------------------------------------- -from ._internal import ( - SearchIndexClient, - SearchIndexerClient, -) - +from ._internal._search_index_client import SearchIndexClient +from ._internal._search_indexer_client import SearchIndexerClient __all__ = ( "SearchIndexerClient", diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/__init__.py index b0d6dd0718e85..b74cfa3b899cc 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/__init__.py @@ -2,13 +2,3 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from ._index import ( # pylint: disable=unused-import - ComplexField, - SearchField, - SearchableField, - SimpleField, -) -from ._search_index_client import SearchIndexClient # pylint: disable=unused-import -from ._search_indexer_client import SearchIndexerClient # pylint: disable=unused-import - -from . import _edm as SearchFieldDataType # pylint: disable=unused-import diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_search_index_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_search_index_client.py index 8fe294555ec1f..d186af3f7fbaf 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_search_index_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_search_index_client.py @@ -21,7 +21,7 @@ ) from ..._headers_mixin import HeadersMixin from ..._version import SDK_MONIKER -from ... import SearchClient +from ..._internal._search_client import SearchClient if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/__init__.py index 49c60a65974d2..b74cfa3b899cc 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/__init__.py @@ -2,10 +2,3 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from ._search_indexer_client import SearchIndexerClient -from ._search_index_client import SearchIndexClient - -__all__ = ( - "SearchIndexerClient", - "SearchIndexClient", -) diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/_search_index_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/_search_index_client.py index de914c6282946..95c22e1c9ea5a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/_search_index_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/_search_index_client.py @@ -10,7 +10,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.async_paging import AsyncItemPaged from .._generated.aio import SearchServiceClient as _SearchServiceClient -from ....aio import SearchClient +from ...._internal.aio._search_client_async import SearchClient from .._utils import ( pack_search_index, unpack_search_index, diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio.py index a88bb515f16fe..c39f6ffd4736f 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio.py @@ -24,10 +24,8 @@ # # -------------------------------------------------------------------------- -from ._internal.aio import ( - SearchIndexClient, - SearchIndexerClient, -) +from ._internal.aio._search_index_client import SearchIndexClient +from ._internal.aio._search_indexer_client import SearchIndexerClient __all__ = ( "SearchIndexClient", diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py index 110772f4945a6..df1892d766862 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py @@ -24,13 +24,13 @@ # # -------------------------------------------------------------------------- -from .._internal import ( +from .._internal._index import ( ComplexField, SearchField, SearchableField, SimpleField, - SearchFieldDataType, ) +from .._internal import _edm as SearchFieldDataType from ..._internal._generated.models import SuggestOptions from .._internal._generated.models import ( AnalyzeResult, diff --git a/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py index 9a8f5307fbb4a..eeb2d38f633ad 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py @@ -24,11 +24,8 @@ # # -------------------------------------------------------------------------- -from .._internal import ( - IndexAction, - IndexingResult, - odata, -) +from .._internal._generated.models import IndexAction, IndexingResult +from .._internal._search_client import odata __all__ = ( diff --git a/sdk/search/azure-search-documents/samples/README.md b/sdk/search/azure-search-documents/samples/README.md index 47a5868e081d3..bb8deebd3b8d4 100644 --- a/sdk/search/azure-search-documents/samples/README.md +++ b/sdk/search/azure-search-documents/samples/README.md @@ -14,7 +14,7 @@ Search client library. The async versions of the samples (the python sample files appended with `_async`) show asynchronous operations with Cognitive Search and require Python version 3.5 or later. -Authenticate the client with a Azure Cognitive Search [API Key Credential](https://docs.microsoft.com/en-us/azure/search/search-security-api-keys): +Authenticate the client with a Azure Cognitive Search [API Key Credential](https://docs.microsoft.com/azure/search/search-security-api-keys): [sample_authentication.py](sample_authentication.py) ([async version](async_samples/sample_authentication_async.py)) @@ -45,7 +45,7 @@ Then for common search index operations: ## Prerequisites * Python 2.7, or 3.5 or later is required to use this package (3.5 or later if using asyncio) * You must have an [Azure subscription](https://azure.microsoft.com/free/) -* You must create the "Hotels" sample index [in the Azure Portal](https://docs.microsoft.com/en-us/azure/search/search-get-started-portal) +* You must create the "Hotels" sample index [in the Azure Portal](https://docs.microsoft.com/azure/search/search-get-started-portal) ## Setup @@ -67,5 +67,5 @@ Then for common search index operations: ## Next steps -Check out the [API reference documentation](https://docs.microsoft.com/en-us/rest/api/searchservice/) +Check out the [API reference documentation](https://docs.microsoft.com/rest/api/searchservice/) to learn more about what you can do with the Azure Cognitive Search client library. diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_data_source_operations_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_data_source_operations_async.py index 1afb437220a12..6c5522f36be9b 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_data_source_operations_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_data_source_operations_async.py @@ -40,31 +40,27 @@ async def create_data_source_connection(): connection_string=connection_string, container=container ) - async with client: - result = await client.create_data_source_connection(data_source) + result = await client.create_data_source_connection(data_source) print("Create new Data Source Connection - async-sample-data-source-connection") # [END create_data_source_connection_async] async def list_data_source_connections(): # [START list_data_source_connection_async] - async with client: - result = await client.get_data_source_connections() + result = await client.get_data_source_connections() names = [x.name for x in result] print("Found {} Data Source Connections in the service: {}".format(len(result), ", ".join(names))) # [END list_data_source_connection_async] async def get_data_source_connection(): # [START get_data_source_connection_async] - async with client: - result = await client.get_data_source_connection("async-sample-data-source-connection") - print("Retrived Data Source Connection 'async-sample-data-source-connection'") - return result + result = await client.get_data_source_connection("async-sample-data-source-connection") + print("Retrived Data Source Connection 'async-sample-data-source-connection'") + return result # [END get_data_source_connection_async] async def delete_data_source_connection(): # [START delete_data_source_connection_async] - async with client: - client.delete_data_source_connection("async-sample-data-source-connection") + await client.delete_data_source_connection("async-sample-data-source-connection") print("Data Source Connection 'async-sample-data-source-connection' successfully deleted") # [END delete_data_source_connection_async] diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_indexers_operations_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_indexers_operations_async.py index 2f26c0a00b41f..50df2a3dc5b28 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_indexers_operations_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_indexers_operations_async.py @@ -40,7 +40,7 @@ async def create_indexer(): # create an index - index_name = "indexer-hotels" + index_name = "async-indexer-hotels" fields = [ SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), SimpleField(name="baseRate", type=SearchFieldDataType.Double) @@ -59,8 +59,7 @@ async def create_indexer(): connection_string=connection_string, container=container ) - async with indexers_client: - data_source = await indexers_client.create_data_source_connection(data_source_connection) + data_source = await indexers_client.create_data_source_connection(data_source_connection) # create an indexer indexer = SearchIndexer( @@ -68,55 +67,48 @@ async def create_indexer(): data_source_name="async-indexer-datasource", target_index_name="indexer-hotels" ) - async with indexers_client: - result = await indexers_client.create_indexer(indexer) + result = await indexers_client.create_indexer(indexer) print("Create new Indexer - async-sample-indexer") # [END create_indexer_async] async def list_indexers(): # [START list_indexer_async] - async with indexers_client: - result = await indexers_client.get_indexers() + result = await indexers_client.get_indexers() names = [x.name for x in result] print("Found {} Indexers in the service: {}".format(len(result), ", ".join(names))) # [END list_indexer_async] async def get_indexer(): # [START get_indexer_async] - async with indexers_client: - result = await indexers_client.get_indexer("async-sample-indexer") - print("Retrived Indexer 'async-sample-indexer'") - return result + result = await indexers_client.get_indexer("async-sample-indexer") + print("Retrived Indexer 'async-sample-indexer'") + return result # [END get_indexer_async] async def get_indexer_status(): # [START get_indexer_status_async] - async with indexers_client: - result = await indexers_client.get_indexer_status("async-sample-indexer") - print("Retrived Indexer status for 'async-sample-indexer'") - return result + result = await indexers_client.get_indexer_status("async-sample-indexer") + print("Retrived Indexer status for 'async-sample-indexer'") + return result # [END get_indexer_status_async] async def run_indexer(): # [START run_indexer_async] - async with indexers_client: - result = await indexers_client.run_indexer("async-sample-indexer") - print("Ran the Indexer 'async-sample-indexer'") - return result + result = await indexers_client.run_indexer("async-sample-indexer") + print("Ran the Indexer 'async-sample-indexer'") + return result # [END run_indexer_async] async def reset_indexer(): # [START reset_indexer_async] - async with indexers_client: - result = await indexers_client.reset_indexer("async-sample-indexer") - print("Reset the Indexer 'async-sample-indexer'") - return result + result = await indexers_client.reset_indexer("async-sample-indexer") + print("Reset the Indexer 'async-sample-indexer'") + return result # [END reset_indexer_async] async def delete_indexer(): # [START delete_indexer_async] - async with indexers_client: - indexers_client.delete_indexer("async-sample-indexer") + await indexers_client.delete_indexer("async-sample-indexer") print("Indexer 'async-sample-indexer' successfully deleted") # [END delete_indexer_async] diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_async_get_document_count.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_async_get_document_count.yaml deleted file mode 100644 index 75ec7200920a7..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_async_get_document_count.yaml +++ /dev/null @@ -1,34 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 14143B3872694CCFBEFE981DD2C64829 - method: GET - uri: https://search22c31514.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF10" - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '127' - content-type: text/plain - date: Wed, 29 Apr 2020 23:26:21 GMT - elapsed-time: '79' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d54bdc7a-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search22c31514.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_autocomplete.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_autocomplete.yaml deleted file mode 100644 index a85f05a28ae3e..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_autocomplete.yaml +++ /dev/null @@ -1,38 +0,0 @@ -interactions: -- request: - body: '{"search": "mot", "suggesterName": "sg"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '40' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 74E424E128C2B04981151C353961D673 - method: POST - uri: https://search42ca1023.search.windows.net/indexes('drgqefsg')/docs/search.post.autocomplete?api-version=2020-06-30 - response: - body: - string: '{"value":[{"text":"motel","queryPlusText":"motel"}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '163' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:26:32 GMT - elapsed-time: '64' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: dc60bb98-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search42ca1023.search.windows.net/indexes('drgqefsg')/docs/search.post.autocomplete?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_delete_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_delete_documents_existing.yaml deleted file mode 100644 index d58b3e7801994..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_delete_documents_existing.yaml +++ /dev/null @@ -1,125 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "3", "@search.action": "delete"}, {"hotelId": "4", - "@search.action": "delete"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '103' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 2786DDE4C12B551D17578A94A8CAD1CC - method: POST - uri: https://search37b1157f.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '190' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:26:44 GMT - elapsed-time: '77' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e30156a6-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search37b1157f.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 2786DDE4C12B551D17578A94A8CAD1CC - method: GET - uri: https://search37b1157f.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF8" - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '126' - content-type: text/plain - date: Wed, 29 Apr 2020 23:26:46 GMT - elapsed-time: '2' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e4e804f6-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search37b1157f.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 2786DDE4C12B551D17578A94A8CAD1CC - method: GET - uri: https://search37b1157f.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - content-length: '0' - date: Wed, 29 Apr 2020 23:26:46 GMT - elapsed-time: '4' - expires: '-1' - pragma: no-cache - request-id: e4ec7fc2-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found - url: https://search37b1157f.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 2786DDE4C12B551D17578A94A8CAD1CC - method: GET - uri: https://search37b1157f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - content-length: '0' - date: Wed, 29 Apr 2020 23:26:46 GMT - elapsed-time: '3' - expires: '-1' - pragma: no-cache - request-id: e4f0cc26-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found - url: https://search37b1157f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_delete_documents_missing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_delete_documents_missing.yaml deleted file mode 100644 index 8e7494fef5fb6..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_delete_documents_missing.yaml +++ /dev/null @@ -1,125 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "@search.action": "delete"}, {"hotelId": - "4", "@search.action": "delete"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '106' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C3AE890D3C892CC8F95D58D7DB853379 - method: POST - uri: https://search2224150e.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '193' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:26:57 GMT - elapsed-time: '107' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: eb538018-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search2224150e.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C3AE890D3C892CC8F95D58D7DB853379 - method: GET - uri: https://search2224150e.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF9" - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '126' - content-type: text/plain - date: Wed, 29 Apr 2020 23:27:01 GMT - elapsed-time: '3' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: ed3c47fc-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search2224150e.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C3AE890D3C892CC8F95D58D7DB853379 - method: GET - uri: https://search2224150e.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - content-length: '0' - date: Wed, 29 Apr 2020 23:27:01 GMT - elapsed-time: '4' - expires: '-1' - pragma: no-cache - request-id: ed40a586-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found - url: https://search2224150e.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C3AE890D3C892CC8F95D58D7DB853379 - method: GET - uri: https://search2224150e.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - content-length: '0' - date: Wed, 29 Apr 2020 23:27:01 GMT - elapsed-time: '17' - expires: '-1' - pragma: no-cache - request-id: ed44f6b8-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found - url: https://search2224150e.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_document.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_document.yaml deleted file mode 100644 index c7a6f7bbd8f3c..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_document.yaml +++ /dev/null @@ -1,370 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('1')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"1","hotelName":"Fancy Stay","description":"Best hotel in - town if you like luxury hotels. They have an amazing infinity pool, a spa, - and a really helpful concierge. The location is perfect -- right downtown, - close to all the tourist attractions. We highly recommend this hotel.","descriptionFr":"Meilleur - h\u00f4tel en ville si vous aimez les h\u00f4tels de luxe. Ils ont une magnifique - piscine \u00e0 d\u00e9bordement, un spa et un concierge tr\u00e8s utile. L''emplacement - est parfait \u2013 en plein centre, \u00e0 proximit\u00e9 de toutes les attractions - touristiques. Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '748' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '83' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f446d418-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('1')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('2')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"2","hotelName":"Roach Motel","description":"Cheapest hotel - in town. Infact, a motel.","descriptionFr":"H\u00f4tel le moins cher en ville. - Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '449' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f462e662-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('2')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular - hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '438' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f467db4a-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good - hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '422' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '3' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f46c83e8-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('5')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"5","hotelName":"Comfy Place","description":"Another good - hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '424' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '19' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f4711b06-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('5')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('6')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"6","hotelName":null,"description":"Surprisingly expensive. - Model suites have an ocean-view.","descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '301' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '6' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f477f8a4-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('6')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('7')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"7","hotelName":"Modern Stay","description":"Modern architecture, - very polite staff and very clean. Also very affordable.","descriptionFr":"Architecture - moderne, personnel poli et tr\u00e8s propre. Aussi tr\u00e8s abordable.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '357' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '3' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f47d0d80-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('7')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('8')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"8","hotelName":null,"description":"Has some road noise - and is next to the very police station. Bathrooms had morel coverings.","descriptionFr":"Il - y a du bruit de la route et se trouve \u00e0 c\u00f4t\u00e9 de la station - de police. Les salles de bain avaient des rev\u00eatements de morilles.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '411' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '5' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f48192c4-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('8')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('9')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"9","hotelName":"Secret Point Motel","description":"The - hotel is ideally located on the main commercial artery of the city in the - heart of New York. A few minutes away is Time''s Square and the historic centre - of the city, as well as other places of interest that make New York one of - America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '1061' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '9' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f4866e8e-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('9')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AB0C0391C5B486DC4244CF967D7CAFD9 - method: GET - uri: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('10')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"10","hotelName":"Countryside Hotel","description":"Save - up to 50% off traditional hotels. Free WiFi, great location near downtown, - full kitchen, washer & dryer, 24/7 support, bowling alley, fitness center - and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 50% sur les h\u00f4tels - traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 pr\u00e8s du centre-ville, - cuisine compl\u00e8te, laveuse & s\u00e9cheuse, support 24/7, bowling, centre - de fitness et plus encore.","category":"Budget","tags":["24-hour front desk - service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '938' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:13 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f48c128a-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search41be100f.search.windows.net/indexes('drgqefsg')/docs('10')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_document_missing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_document_missing.yaml deleted file mode 100644 index 638fc8d31bf49..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_document_missing.yaml +++ /dev/null @@ -1,29 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 0CF3302F0AB74F3241C00534746EFD38 - method: GET - uri: https://searchd1281368.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - content-length: '0' - date: Wed, 29 Apr 2020 23:27:24 GMT - elapsed-time: '67' - expires: '-1' - pragma: no-cache - request-id: fb4d5aca-8a70-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found - url: https://searchd1281368.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_counts.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_counts.yaml deleted file mode 100644 index 9caebe3eeb7e3..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_counts.yaml +++ /dev/null @@ -1,160 +0,0 @@ -interactions: -- request: - body: '{"search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 748B4ADAF1B19F896323F9333355C5BF - method: POST - uri: https://search97b31221.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '2377' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:36 GMT - elapsed-time: '91' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 02404c5c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search97b31221.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -- request: - body: '{"count": true, "search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '34' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 748B4ADAF1B19F896323F9333355C5BF - method: POST - uri: https://search97b31221.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"@odata.count":7,"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '2388' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:36 GMT - elapsed-time: '8' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 025ce056-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search97b31221.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_coverage.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_coverage.yaml deleted file mode 100644 index ec17e72c1dae6..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_coverage.yaml +++ /dev/null @@ -1,160 +0,0 @@ -interactions: -- request: - body: '{"search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 621610911B3D9D8BC6F4D01ACBF7CEDF - method: POST - uri: https://searchbcc312d1.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '2377' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:47 GMT - elapsed-time: '19' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 09345ed6-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchbcc312d1.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -- request: - body: '{"minimumCoverage": 50.0, "search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '44' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 621610911B3D9D8BC6F4D01ACBF7CEDF - method: POST - uri: https://searchbcc312d1.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"@search.coverage":100.0,"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '2389' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:47 GMT - elapsed-time: '6' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 0948655c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchbcc312d1.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_facets_none.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_facets_none.yaml deleted file mode 100644 index 3e149ec8f7801..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_facets_none.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: '{"search": "WiFi", "select": "hotelName,category,description"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '62' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B014CAE409517E3739DCEE8A22A1F630 - method: POST - uri: https://searchf724140a.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.2423066,"hotelName":"Countryside Hotel","description":"Save - up to 50% off traditional hotels. Free WiFi, great location near downtown, - full kitchen, washer & dryer, 24/7 support, bowling alley, fitness center - and more.","category":"Budget"},{"@search.score":0.19169211,"hotelName":"EconoStay","description":"Very - popular hotel in town","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Express - Rooms","description":"Pretty good hotel","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Comfy - Place","description":"Another good hotel","category":"Budget"},{"@search.score":0.15335369,"hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","category":"Luxury"}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '609' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:27:58 GMT - elapsed-time: '69' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 0f4de288-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchf724140a.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_facets_result.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_facets_result.yaml deleted file mode 100644 index 8bc9ba1ba329e..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_facets_result.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: '{"facets": ["category"], "search": "WiFi", "select": "hotelName,category,description"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '86' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6DF34EBCEF728149C24DAA6B4F57A090 - method: POST - uri: https://search20bd14f9.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"@search.facets":{"category":[{"count":4,"value":"Budget"},{"count":1,"value":"Luxury"}]},"value":[{"@search.score":0.2423066,"hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","category":"Budget"},{"@search.score":0.19169211,"hotelName":"EconoStay","description":"Very - popular hotel in town","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Express - Rooms","description":"Pretty good hotel","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Comfy - Place","description":"Another good hotel","category":"Budget"},{"@search.score":0.15335369,"hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","category":"Luxury"}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '646' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:28:09 GMT - elapsed-time: '76' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 15c6c256-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search20bd14f9.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_filter.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_filter.yaml deleted file mode 100644 index 12c3a1eb6790b..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_filter.yaml +++ /dev/null @@ -1,45 +0,0 @@ -interactions: -- request: - body: '{"filter": "category eq ''Budget''", "orderby": "hotelName desc", "search": - "WiFi", "select": "hotelName,category,description"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '125' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E6523D6B24E3D5FF5244EA40EE2C8867 - method: POST - uri: https://search9776120b.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.19169211,"hotelName":"Express Rooms","description":"Pretty - good hotel","category":"Budget"},{"@search.score":0.19169211,"hotelName":"EconoStay","description":"Very - popular hotel in town","category":"Budget"},{"@search.score":0.2423066,"hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Comfy - Place","description":"Another good hotel","category":"Budget"}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '441' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:28:19 GMT - elapsed-time: '59' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 1c93fe8c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search9776120b.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_simple.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_simple.yaml deleted file mode 100644 index 33fd52d18e58b..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_get_search_simple.yaml +++ /dev/null @@ -1,136 +0,0 @@ -interactions: -- request: - body: '{"search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7AB8FFBA7B9EDE0DF1F968DDEDB0DE83 - method: POST - uri: https://search97bd120f.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '2377' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:28:31 GMT - elapsed-time: '125' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 2345b16c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search97bd120f.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -- request: - body: '{"search": "motel"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7AB8FFBA7B9EDE0DF1F968DDEDB0DE83 - method: POST - uri: https://search97bd120f.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":1.2368374,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.24176063,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '1271' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:28:31 GMT - elapsed-time: '7' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 236960f8-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search97bd120f.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_documents_existing.yaml deleted file mode 100644 index 1b20e123c65cb..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_documents_existing.yaml +++ /dev/null @@ -1,137 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "3", "rating": 1, "@search.action": "merge"}, {"hotelId": - "4", "rating": 2, "@search.action": "merge"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 997EA709A1A4230F4F928B43047A5B90 - method: POST - uri: https://search2308151c.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '190' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:28:43 GMT - elapsed-time: '93' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 2a1fec32-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search2308151c.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 997EA709A1A4230F4F928B43047A5B90 - method: GET - uri: https://search2308151c.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF10" - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '127' - content-type: text/plain - date: Wed, 29 Apr 2020 23:28:45 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 2c058994-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search2308151c.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 997EA709A1A4230F4F928B43047A5B90 - method: GET - uri: https://search2308151c.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular - hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '438' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:28:45 GMT - elapsed-time: '11' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 2c09faec-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search2308151c.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 997EA709A1A4230F4F928B43047A5B90 - method: GET - uri: https://search2308151c.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good - hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '422' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:28:45 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 2c0f8278-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search2308151c.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_documents_missing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_documents_missing.yaml deleted file mode 100644 index 214ddd7d8fa20..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_documents_missing.yaml +++ /dev/null @@ -1,132 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "merge"}, - {"hotelId": "4", "rating": 2, "@search.action": "merge"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '130' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1B247C95470A5FEF7DE61B9207A271A9 - method: POST - uri: https://searchdde14ab.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":false,"errorMessage":"Document not - found.","statusCode":404},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '225' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:28:57 GMT - elapsed-time: '202' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 32e4ec96-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 207 - message: Multi-Status - url: https://searchdde14ab.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1B247C95470A5FEF7DE61B9207A271A9 - method: GET - uri: https://searchdde14ab.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF10" - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '127' - content-type: text/plain - date: Wed, 29 Apr 2020 23:29:01 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 34dc2c26-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchdde14ab.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1B247C95470A5FEF7DE61B9207A271A9 - method: GET - uri: https://searchdde14ab.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - content-length: '0' - date: Wed, 29 Apr 2020 23:29:01 GMT - elapsed-time: '3' - expires: '-1' - pragma: no-cache - request-id: 34e0f814-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found - url: https://searchdde14ab.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1B247C95470A5FEF7DE61B9207A271A9 - method: GET - uri: https://searchdde14ab.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good - hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '422' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:29:01 GMT - elapsed-time: '8' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 34e5f63e-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchdde14ab.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_or_upload_documents.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_or_upload_documents.yaml deleted file mode 100644 index 5f0e9b56e4be5..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_merge_or_upload_documents.yaml +++ /dev/null @@ -1,136 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "mergeOrUpload"}, - {"hotelId": "4", "rating": 2, "@search.action": "mergeOrUpload"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '146' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - DF3A01F67870E9C3EA75AA1D1DCE0A9C - method: POST - uri: https://search37e51576.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '196' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:29:12 GMT - elapsed-time: '88' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 3c2fa872-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search37e51576.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - DF3A01F67870E9C3EA75AA1D1DCE0A9C - method: GET - uri: https://search37e51576.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF11" - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '127' - content-type: text/plain - date: Wed, 29 Apr 2020 23:29:16 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 3e151c4e-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search37e51576.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - DF3A01F67870E9C3EA75AA1D1DCE0A9C - method: GET - uri: https://search37e51576.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"1000","hotelName":null,"description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":1,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '257' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:29:16 GMT - elapsed-time: '6' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 3e19a96c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search37e51576.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - DF3A01F67870E9C3EA75AA1D1DCE0A9C - method: GET - uri: https://search37e51576.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good - hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '422' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:29:16 GMT - elapsed-time: '5' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 3e1e857c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search37e51576.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_suggest.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_suggest.yaml deleted file mode 100644 index 0c18edad7137f..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_suggest.yaml +++ /dev/null @@ -1,39 +0,0 @@ -interactions: -- request: - body: '{"search": "mot", "suggesterName": "sg"}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '40' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7399C73616B0BBA23C477AA593479766 - method: POST - uri: https://searchf6640e13.search.windows.net/indexes('drgqefsg')/docs/search.post.suggest?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.text":"Cheapest hotel in town. Infact, a motel.","hotelId":"2"},{"@search.text":"Secret - Point Motel","hotelId":"9"}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '216' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:29:27 GMT - elapsed-time: '76' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 44aeb0c4-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchf6640e13.search.windows.net/indexes('drgqefsg')/docs/search.post.suggest?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_upload_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_upload_documents_existing.yaml deleted file mode 100644 index 073a180694d78..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_upload_documents_existing.yaml +++ /dev/null @@ -1,40 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure - Inn", "@search.action": "upload"}, {"hotelId": "3", "rating": 4, "rooms": [], - "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '214' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F47F7007381641D41B993D937AF79882 - method: POST - uri: https://search399b1591.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"3","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '196' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:29:44 GMT - elapsed-time: '87' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 4e984b4a-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search399b1591.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_upload_documents_new.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_upload_documents_new.yaml deleted file mode 100644 index 554118c0269bf..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_index_live_async.test_upload_documents_new.yaml +++ /dev/null @@ -1,136 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure - Inn", "@search.action": "upload"}, {"hotelId": "1001", "rating": 4, "rooms": - [], "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Content-Length: - - '217' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 0A3266A57EF6CCD9A3923E5ED929B490 - method: POST - uri: https://searchd1e61370.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"1001","status":true,"errorMessage":null,"statusCode":201}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '193' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:29:56 GMT - elapsed-time: '285' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 55e1e26c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchd1e61370.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 0A3266A57EF6CCD9A3923E5ED929B490 - method: GET - uri: https://searchd1e61370.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF12" - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '127' - content-type: text/plain - date: Wed, 29 Apr 2020 23:30:00 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 57f58fcc-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchd1e61370.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 0A3266A57EF6CCD9A3923E5ED929B490 - method: GET - uri: https://searchd1e61370.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"1000","hotelName":"Azure Inn","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":5,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '267' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:30:00 GMT - elapsed-time: '7' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 57fa16c8-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchd1e61370.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 0A3266A57EF6CCD9A3923E5ED929B490 - method: GET - uri: https://searchd1e61370.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"1001","hotelName":"Redmond Hotel","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":4,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '268' - content-type: application/json; odata.metadata=none - date: Wed, 29 Apr 2020 23:30:00 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 57fef116-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchd1e61370.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_async_get_document_count.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_async_get_document_count.yaml new file mode 100644 index 0000000000000..f327e8e5a429a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_async_get_document_count.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search6dc91ab1.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 20:50:02 GMT + elapsed-time: '3' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0b58841e-e970-11ea-b85a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search6dc91ab1.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_get_document.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_get_document.yaml new file mode 100644 index 0000000000000..b702aff7daf8f --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_get_document.yaml @@ -0,0 +1,350 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('1')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1","hotelName":"Fancy Stay","description":"Best hotel in + town if you like luxury hotels. They have an amazing infinity pool, a spa, + and a really helpful concierge. The location is perfect -- right downtown, + close to all the tourist attractions. We highly recommend this hotel.","descriptionFr":"Meilleur + h\u00f4tel en ville si vous aimez les h\u00f4tels de luxe. Ils ont une magnifique + piscine \u00e0 d\u00e9bordement, un spa et un concierge tr\u00e8s utile. L''emplacement + est parfait \u2013 en plein centre, \u00e0 proximit\u00e9 de toutes les attractions + touristiques. Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '748' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:21 GMT + elapsed-time: '54' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 16f90283-e970-11ea-aa15-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('1')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('2')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"2","hotelName":"Roach Motel","description":"Cheapest hotel + in town. Infact, a motel.","descriptionFr":"H\u00f4tel le moins cher en ville. + Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '449' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:21 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 17282947-e970-11ea-97bb-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('2')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular + hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '438' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:21 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 17358eab-e970-11ea-8b59-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '422' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:21 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 174245af-e970-11ea-81bb-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('5')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"5","hotelName":"Comfy Place","description":"Another good + hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '424' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:21 GMT + elapsed-time: '6' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1751f445-e970-11ea-aed7-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('5')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('6')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"6","hotelName":null,"description":"Surprisingly expensive. + Model suites have an ocean-view.","descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '301' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:22 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 175d43ce-e970-11ea-b122-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('6')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('7')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"7","hotelName":"Modern Stay","description":"Modern architecture, + very polite staff and very clean. Also very affordable.","descriptionFr":"Architecture + moderne, personnel poli et tr\u00e8s propre. Aussi tr\u00e8s abordable.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '357' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:22 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 176a1840-e970-11ea-8c98-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('7')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('8')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"8","hotelName":null,"description":"Has some road noise + and is next to the very police station. Bathrooms had morel coverings.","descriptionFr":"Il + y a du bruit de la route et se trouve \u00e0 c\u00f4t\u00e9 de la station + de police. Les salles de bain avaient des rev\u00eatements de morilles.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '411' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:22 GMT + elapsed-time: '3' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 177b20f8-e970-11ea-bee8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('8')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('9')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"9","hotelName":"Secret Point Motel","description":"The + hotel is ideally located on the main commercial artery of the city in the + heart of New York. A few minutes away is Time''s Square and the historic centre + of the city, as well as other places of interest that make New York one of + America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1061' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:22 GMT + elapsed-time: '8' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1787ce63-e970-11ea-87e0-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('9')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('10')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"10","hotelName":"Countryside Hotel","description":"Save + up to 50% off traditional hotels. Free WiFi, great location near downtown, + full kitchen, washer & dryer, 24/7 support, bowling alley, fitness center + and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 50% sur les h\u00f4tels + traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 pr\u00e8s du centre-ville, + cuisine compl\u00e8te, laveuse & s\u00e9cheuse, support 24/7, bowling, centre + de fitness et plus encore.","category":"Budget","tags":["24-hour front desk + service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '938' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:50:22 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1799fef0-e970-11ea-b087-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search496815ac.search.windows.net/indexes('drgqefsg')/docs('10')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_get_document_missing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_get_document_missing.yaml new file mode 100644 index 0000000000000..39094e4670c8f --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_basic_live_async.test_get_document_missing.yaml @@ -0,0 +1,27 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search5c91905.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 20:50:38 GMT + elapsed-time: '66' + expires: '-1' + pragma: no-cache + request-id: 20cadcef-e970-11ea-b2ce-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search5c91905.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_delete_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_delete_documents_existing.yaml new file mode 100644 index 0000000000000..bf521664bf6f9 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_delete_documents_existing.yaml @@ -0,0 +1,148 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchada31f38.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchada31f38.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B958C33442C\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1166' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:01:39 GMT + elapsed-time: '41' + etag: W/"0x8D84B958C33442C" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: aa92754b-e971-11ea-9c02-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchada31f38.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +- request: + body: '{"value": [{"hotelId": "3", "@search.action": "delete"}, {"hotelId": "4", + "@search.action": "delete"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '103' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchada31f38.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '190' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:01:39 GMT + elapsed-time: '58' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: aad3942c-e971-11ea-a952-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchada31f38.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchada31f38.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF8" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '126' + content-type: text/plain + date: Fri, 28 Aug 2020 21:01:43 GMT + elapsed-time: '6' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: acf742fe-e971-11ea-90a5-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchada31f38.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchada31f38.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 21:01:43 GMT + elapsed-time: '5' + expires: '-1' + pragma: no-cache + request-id: ad5ba92f-e971-11ea-8846-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://searchada31f38.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchada31f38.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 21:01:43 GMT + elapsed-time: '5' + expires: '-1' + pragma: no-cache + request-id: ad760dcc-e971-11ea-b20b-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://searchada31f38.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_delete_documents_missing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_delete_documents_missing.yaml new file mode 100644 index 0000000000000..0439211d2a2e0 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_delete_documents_missing.yaml @@ -0,0 +1,148 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8e5d1ec7.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B959B16BD4F\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1166' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:02:04 GMT + elapsed-time: '36' + etag: W/"0x8D84B959B16BD4F" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b976e810-e971-11ea-bcf9-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +- request: + body: '{"value": [{"hotelId": "1000", "@search.action": "delete"}, {"hotelId": + "4", "@search.action": "delete"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '106' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '193' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:02:04 GMT + elapsed-time: '73' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b9fff789-e971-11ea-9d6e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF9" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '126' + content-type: text/plain + date: Fri, 28 Aug 2020 21:02:08 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: bc08f78d-e971-11ea-8b61-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 21:02:08 GMT + elapsed-time: '4' + expires: '-1' + pragma: no-cache + request-id: bc68eb8c-e971-11ea-a31c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 21:02:08 GMT + elapsed-time: '3' + expires: '-1' + pragma: no-cache + request-id: bc83536e-e971-11ea-920a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search8e5d1ec7.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_documents_existing.yaml new file mode 100644 index 0000000000000..cc32ac483e6b1 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_documents_existing.yaml @@ -0,0 +1,160 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8f411ed5.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8f411ed5.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B95A9C672C9\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1166' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:02:29 GMT + elapsed-time: '1132' + etag: W/"0x8D84B95A9C672C9" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c805f759-e971-11ea-ab23-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8f411ed5.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +- request: + body: '{"value": [{"hotelId": "3", "rating": 1, "@search.action": "merge"}, {"hotelId": + "4", "rating": 2, "@search.action": "merge"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search8f411ed5.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '190' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:02:30 GMT + elapsed-time: '70' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c923196a-e971-11ea-89bc-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8f411ed5.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8f411ed5.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 21:02:33 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cb55bfd1-e971-11ea-a7f5-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8f411ed5.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8f411ed5.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular + hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '438' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:02:33 GMT + elapsed-time: '8' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cbc08818-e971-11ea-ba07-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8f411ed5.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8f411ed5.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '422' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:02:34 GMT + elapsed-time: '9' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cbd2ce23-e971-11ea-a76d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8f411ed5.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_documents_missing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_documents_missing.yaml new file mode 100644 index 0000000000000..f7753096974c0 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_documents_missing.yaml @@ -0,0 +1,155 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search705e1e64.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search705e1e64.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B95B98E1FBC\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1166' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:02:56 GMT + elapsed-time: '1094' + etag: W/"0x8D84B95B98E1FBC" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d7f0acd2-e971-11ea-a91a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search705e1e64.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +- request: + body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "merge"}, + {"hotelId": "4", "rating": 2, "@search.action": "merge"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '130' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search705e1e64.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":false,"errorMessage":"Document not + found.","statusCode":404},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '225' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:02:57 GMT + elapsed-time: '91' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d919f491-e971-11ea-b0e9-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 207 + message: Multi-Status + url: https://search705e1e64.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search705e1e64.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 21:03:01 GMT + elapsed-time: '102' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: db768231-e971-11ea-aea6-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search705e1e64.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search705e1e64.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 21:03:01 GMT + elapsed-time: '25' + expires: '-1' + pragma: no-cache + request-id: dc06db6b-e971-11ea-9f05-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search705e1e64.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search705e1e64.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '422' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:03:01 GMT + elapsed-time: '38' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: dc27f7e9-e971-11ea-a19f-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search705e1e64.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_or_upload_documents.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_or_upload_documents.yaml new file mode 100644 index 0000000000000..56b9f8cb2dd2e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_merge_or_upload_documents.yaml @@ -0,0 +1,159 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchadd71f2f.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B95DA21B81D\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1165' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:03:51 GMT + elapsed-time: '1597' + etag: W/"0x8D84B95DA21B81D" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f85a019a-e971-11ea-a96f-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +- request: + body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "mergeOrUpload"}, + {"hotelId": "4", "rating": 2, "@search.action": "mergeOrUpload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '146' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '196' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:03:51 GMT + elapsed-time: '182' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f99db2fd-e971-11ea-a7d3-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF11" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 21:03:56 GMT + elapsed-time: '22' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: fbcfac18-e971-11ea-8143-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1000","hotelName":null,"description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":1,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '257' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:03:56 GMT + elapsed-time: '27' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: fc759edf-e971-11ea-b3e0-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '422' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:03:56 GMT + elapsed-time: '13' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: fc9da632-e971-11ea-9766-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchadd71f2f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_upload_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_upload_documents_existing.yaml new file mode 100644 index 0000000000000..b3aaa9eb7b859 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_upload_documents_existing.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchaf8d1f4a.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchaf8d1f4a.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B95EBC8AAA2\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1165' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:04:19 GMT + elapsed-time: '37' + etag: W/"0x8D84B95EBC8AAA2" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0a4dcb09-e972-11ea-9c8e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchaf8d1f4a.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +- request: + body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure + Inn", "@search.action": "upload"}, {"hotelId": "3", "rating": 4, "rooms": [], + "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '214' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchaf8d1f4a.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"3","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '196' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:04:21 GMT + elapsed-time: '115' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0abd2eb8-e972-11ea-9f84-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchaf8d1f4a.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchaf8d1f4a.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF11" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 21:04:25 GMT + elapsed-time: '22' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0d442f7c-e972-11ea-b569-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchaf8d1f4a.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_upload_documents_new.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_upload_documents_new.yaml new file mode 100644 index 0000000000000..00e683e447571 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_batching_client_live_async.test_upload_documents_new.yaml @@ -0,0 +1,159 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search174a1d29.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search174a1d29.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B95FC771DA1\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1166' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:04:48 GMT + elapsed-time: '42' + etag: W/"0x8D84B95FC771DA1" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1af4a5b7-e972-11ea-9322-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search174a1d29.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +- request: + body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure + Inn", "@search.action": "upload"}, {"hotelId": "1001", "rating": 4, "rooms": + [], "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '217' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search174a1d29.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"1001","status":true,"errorMessage":null,"statusCode":201}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '193' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:04:48 GMT + elapsed-time: '87' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1b8b9a40-e972-11ea-a747-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search174a1d29.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search174a1d29.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF12" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 21:04:52 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1de926e7-e972-11ea-8a33-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search174a1d29.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search174a1d29.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1000","hotelName":"Azure Inn","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":5,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '267' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:04:52 GMT + elapsed-time: '9' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1e5387a5-e972-11ea-988d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search174a1d29.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search174a1d29.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1001","hotelName":"Redmond Hotel","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":4,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '268' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:04:52 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1e63871d-e972-11ea-b17e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search174a1d29.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_delete_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_delete_documents_existing.yaml new file mode 100644 index 0000000000000..6d34da97e6277 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_delete_documents_existing.yaml @@ -0,0 +1,117 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "3", "@search.action": "delete"}, {"hotelId": "4", + "@search.action": "delete"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '103' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search94f31ef0.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '190' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:53:25 GMT + elapsed-time: '16' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 843e0892-e970-11ea-9a1e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search94f31ef0.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search94f31ef0.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF8" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '126' + content-type: text/plain + date: Fri, 28 Aug 2020 20:53:29 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 86c686e9-e970-11ea-9e9d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search94f31ef0.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search94f31ef0.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 20:53:29 GMT + elapsed-time: '5' + expires: '-1' + pragma: no-cache + request-id: 86e3c2b6-e970-11ea-a951-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search94f31ef0.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search94f31ef0.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 20:53:29 GMT + elapsed-time: '4' + expires: '-1' + pragma: no-cache + request-id: 87058858-e970-11ea-840a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search94f31ef0.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_delete_documents_missing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_delete_documents_missing.yaml new file mode 100644 index 0000000000000..5b160b9ca9362 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_delete_documents_missing.yaml @@ -0,0 +1,117 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "@search.action": "delete"}, {"hotelId": + "4", "@search.action": "delete"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '106' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search75f51e7f.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '193' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:53:50 GMT + elapsed-time: '220' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 93566eaa-e970-11ea-a8fa-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search75f51e7f.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search75f51e7f.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF9" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '126' + content-type: text/plain + date: Fri, 28 Aug 2020 20:53:53 GMT + elapsed-time: '22' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 95755e6c-e970-11ea-b9e7-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search75f51e7f.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search75f51e7f.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 20:53:53 GMT + elapsed-time: '66' + expires: '-1' + pragma: no-cache + request-id: 95862fe2-e970-11ea-8bba-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search75f51e7f.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search75f51e7f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 20:53:53 GMT + elapsed-time: '3' + expires: '-1' + pragma: no-cache + request-id: 959ad1e3-e970-11ea-a6f3-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search75f51e7f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_documents_existing.yaml new file mode 100644 index 0000000000000..81ca475cbb8e7 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_documents_existing.yaml @@ -0,0 +1,129 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "3", "rating": 1, "@search.action": "merge"}, {"hotelId": + "4", "rating": 2, "@search.action": "merge"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search76d91e8d.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '190' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:54:14 GMT + elapsed-time: '98' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a1a41d8b-e970-11ea-a440-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search76d91e8d.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search76d91e8d.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 20:54:17 GMT + elapsed-time: '3' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a3b60a9b-e970-11ea-9dc1-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search76d91e8d.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search76d91e8d.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular + hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '438' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:54:18 GMT + elapsed-time: '9' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a3ea173b-e970-11ea-8721-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search76d91e8d.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search76d91e8d.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '422' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:54:18 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a41fc53d-e970-11ea-af74-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search76d91e8d.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_documents_missing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_documents_missing.yaml new file mode 100644 index 0000000000000..04347d8a3e3f2 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_documents_missing.yaml @@ -0,0 +1,124 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "merge"}, + {"hotelId": "4", "rating": 2, "@search.action": "merge"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '130' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search583e1e1c.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":false,"errorMessage":"Document not + found.","statusCode":404},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '225' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:54:40 GMT + elapsed-time: '25' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b185db95-e970-11ea-8597-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 207 + message: Multi-Status + url: https://search583e1e1c.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search583e1e1c.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 20:54:44 GMT + elapsed-time: '6' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b3b55a05-e970-11ea-98eb-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search583e1e1c.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search583e1e1c.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 28 Aug 2020 20:54:44 GMT + elapsed-time: '4' + expires: '-1' + pragma: no-cache + request-id: b3d6954e-e970-11ea-b9e2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found + url: https://search583e1e1c.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search583e1e1c.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '422' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:54:44 GMT + elapsed-time: '12' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b3ea6b5e-e970-11ea-a539-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search583e1e1c.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_or_upload_documents.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_or_upload_documents.yaml new file mode 100644 index 0000000000000..2a65ebdde6d98 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_merge_or_upload_documents.yaml @@ -0,0 +1,128 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "mergeOrUpload"}, + {"hotelId": "4", "rating": 2, "@search.action": "mergeOrUpload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '146' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search95271ee7.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '196' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:55:00 GMT + elapsed-time: '70' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: bd3434db-e970-11ea-a426-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search95271ee7.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search95271ee7.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF11" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 20:55:03 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: bf35790b-e970-11ea-921c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search95271ee7.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search95271ee7.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1000","hotelName":null,"description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":1,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '257' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:55:03 GMT + elapsed-time: '7' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: bf4298e3-e970-11ea-a7e8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search95271ee7.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search95271ee7.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '422' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:55:03 GMT + elapsed-time: '6' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: bf53e8d3-e970-11ea-988d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search95271ee7.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_upload_documents_existing.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_upload_documents_existing.yaml new file mode 100644 index 0000000000000..5cf6557a1cefe --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_upload_documents_existing.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure + Inn", "@search.action": "upload"}, {"hotelId": "3", "rating": 4, "rooms": [], + "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '214' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search96dd1f02.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"3","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '196' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:55:25 GMT + elapsed-time: '22' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cbdd1b84-e970-11ea-8eba-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search96dd1f02.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_upload_documents_new.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_upload_documents_new.yaml new file mode 100644 index 0000000000000..32676c3299a35 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_index_document_live_async.test_upload_documents_new.yaml @@ -0,0 +1,128 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure + Inn", "@search.action": "upload"}, {"hotelId": "1001", "rating": 4, "rooms": + [], "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '217' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search21ce1.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"1001","status":true,"errorMessage":null,"statusCode":201}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '193' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:55:45 GMT + elapsed-time: '98' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d7a21d85-e970-11ea-b2c2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search21ce1.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search21ce1.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF12" + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '127' + content-type: text/plain + date: Fri, 28 Aug 2020 20:55:48 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d9c98dbb-e970-11ea-a609-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search21ce1.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search21ce1.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1000","hotelName":"Azure Inn","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":5,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '267' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:55:48 GMT + elapsed-time: '10' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d9db9180-e970-11ea-9f51-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search21ce1.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search21ce1.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1001","hotelName":"Redmond Hotel","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":4,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '268' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 20:55:48 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: da0e002f-e970-11ea-98ec-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search21ce1.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_autocomplete.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_autocomplete.yaml new file mode 100644 index 0000000000000..0f557be069d06 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_autocomplete.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"search": "mot", "suggesterName": "sg"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '40' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search62221634.search.windows.net/indexes('drgqefsg')/docs/search.post.autocomplete?api-version=2020-06-30 + response: + body: + string: '{"value":[{"text":"motel","queryPlusText":"motel"}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '163' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:05:41 GMT + elapsed-time: '86' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3afa546c-e972-11ea-b7c5-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search62221634.search.windows.net/indexes('drgqefsg')/docs/search.post.autocomplete?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_counts.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_counts.yaml new file mode 100644 index 0000000000000..0381a680ae93e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_counts.yaml @@ -0,0 +1,156 @@ +interactions: +- request: + body: '{"search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd5601832.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '2378' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:06:02 GMT + elapsed-time: '98' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 477f6b35-e972-11ea-a737-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchd5601832.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +- request: + body: '{"count": true, "search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '34' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd5601832.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"@odata.count":7,"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '2387' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:06:03 GMT + elapsed-time: '8' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 482fcd6e-e972-11ea-8ad3-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchd5601832.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_coverage.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_coverage.yaml new file mode 100644 index 0000000000000..2f8407f9e2806 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_coverage.yaml @@ -0,0 +1,156 @@ +interactions: +- request: + body: '{"search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search6a118e2.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '2378' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:06:25 GMT + elapsed-time: '89' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 550d8fc6-e972-11ea-b80b-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search6a118e2.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +- request: + body: '{"minimumCoverage": 50.0, "search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '44' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search6a118e2.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"@search.coverage":100.0,"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '2391' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:06:25 GMT + elapsed-time: '6' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 5576a0ef-e972-11ea-a712-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search6a118e2.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_facets_none.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_facets_none.yaml new file mode 100644 index 0000000000000..f30215ceefd57 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_facets_none.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: '{"search": "WiFi", "select": "hotelName,category,description"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '62' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search53351a1b.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":2.3832736,"hotelName":"Countryside Hotel","description":"Save + up to 50% off traditional hotels. Free WiFi, great location near downtown, + full kitchen, washer & dryer, 24/7 support, bowling alley, fitness center + and more.","category":"Budget"},{"@search.score":1.0225849,"hotelName":"EconoStay","description":"Very + popular hotel in town","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Express + Rooms","description":"Pretty good hotel","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Comfy + Place","description":"Another good hotel","category":"Budget"},{"@search.score":0.7987757,"hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","category":"Luxury"}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '611' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:06:48 GMT + elapsed-time: '81' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 62c2e8eb-e972-11ea-875d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search53351a1b.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_facets_result.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_facets_result.yaml new file mode 100644 index 0000000000000..4019afd445961 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_facets_result.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: '{"facets": ["category"], "search": "WiFi", "select": "hotelName,category,description"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '86' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search88e11b0a.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"@search.facets":{"category":[{"count":4,"value":"Budget"},{"count":1,"value":"Luxury"}]},"value":[{"@search.score":2.3832736,"hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","category":"Budget"},{"@search.score":1.0225849,"hotelName":"EconoStay","description":"Very + popular hotel in town","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Express + Rooms","description":"Pretty good hotel","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Comfy + Place","description":"Another good hotel","category":"Budget"},{"@search.score":0.7987757,"hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","category":"Luxury"}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '646' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:07:08 GMT + elapsed-time: '123' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6eb0a5ec-e972-11ea-9db1-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search88e11b0a.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_filter.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_filter.yaml new file mode 100644 index 0000000000000..ab10e9ea87346 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_filter.yaml @@ -0,0 +1,43 @@ +interactions: +- request: + body: '{"filter": "category eq ''Budget''", "orderby": "hotelName desc", "search": + "WiFi", "select": "hotelName,category,description"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '125' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd523181c.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":1.0225849,"hotelName":"Express Rooms","description":"Pretty + good hotel","category":"Budget"},{"@search.score":1.0225849,"hotelName":"EconoStay","description":"Very + popular hotel in town","category":"Budget"},{"@search.score":2.3832736,"hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Comfy + Place","description":"Another good hotel","category":"Budget"}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '442' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:07:31 GMT + elapsed-time: '73' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 7c9fee41-e972-11ea-9d02-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchd523181c.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_simple.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_simple.yaml new file mode 100644 index 0000000000000..a31ad40c646b5 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_get_search_simple.yaml @@ -0,0 +1,132 @@ +interactions: +- request: + body: '{"search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd56a1820.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '2378' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:07:53 GMT + elapsed-time: '83' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 8a56c06f-e972-11ea-a554-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchd56a1820.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +- request: + body: '{"search": "motel"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd56a1820.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":8.376183,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.8858137,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1269' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:07:55 GMT + elapsed-time: '7' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 8ac67395-e972-11ea-9c35-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchd56a1820.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_suggest.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_suggest.yaml new file mode 100644 index 0000000000000..ec8f11a82e7ec --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_client_search_live_async.test_suggest.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: '{"search": "mot", "suggesterName": "sg"}' + headers: + Accept: + - application/json;odata.metadata=none + Content-Length: + - '40' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchf7671424.search.windows.net/indexes('drgqefsg')/docs/search.post.suggest?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.text":"Cheapest hotel in town. Infact, a motel.","hotelId":"2"},{"@search.text":"Secret + Point Motel","hotelId":"9"}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '216' + content-type: application/json; odata.metadata=none + date: Fri, 28 Aug 2020 21:08:16 GMT + elapsed-time: '95' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 97046df8-e972-11ea-a2f1-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchf7671424.search.windows.net/indexes('drgqefsg')/docs/search.post.suggest?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_datasource_async.yaml new file mode 100644 index 0000000000000..d1c51c45c36cf --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_datasource_async.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchb0841f28.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchb0841f28.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9B8481B87C\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:44:18 GMT + elapsed-time: '34' + etag: W/"0x8D84B9B8481B87C" + expires: '-1' + location: https://searchb0841f28.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a005fc23-e977-11ea-8901-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchb0841f28.search.windows.net/datasources?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_or_update_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_or_update_datasource_async.yaml new file mode 100644 index 0000000000000..d46db2f3a6cfd --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_or_update_datasource_async.yaml @@ -0,0 +1,168 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchfed3234a.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfed3234a.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9B97F863A6\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:44:51 GMT + elapsed-time: '63' + etag: W/"0x8D84B9B97F863A6" + expires: '-1' + location: https://searchfed3234a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b23625fd-e977-11ea-8bbe-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchfed3234a.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchfed3234a.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfed3234a.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D84B9B97F863A6\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '376' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:44:52 GMT + elapsed-time: '12' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b405761b-e977-11ea-bae9-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchfed3234a.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchfed3234a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfed3234a.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9B98D81751\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '374' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:44:52 GMT + elapsed-time: '39' + etag: W/"0x8D84B9B98D81751" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b4d0e358-e977-11ea-a41a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchfed3234a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchfed3234a.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfed3234a.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D84B9B98D81751\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '380' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:44:52 GMT + elapsed-time: '21' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b4e3738b-e977-11ea-b822-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchfed3234a.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchfed3234a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfed3234a.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9B98D81751\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '374' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:44:52 GMT + elapsed-time: '6' + etag: W/"0x8D84B9B98D81751" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b4f240f0-e977-11ea-b352-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchfed3234a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_or_update_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_or_update_datasource_if_unchanged.yaml new file mode 100644 index 0000000000000..28419e9a01b69 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_create_or_update_datasource_if_unchanged.yaml @@ -0,0 +1,118 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search802607.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search802607.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BA6A1147A\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '389' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:45:15 GMT + elapsed-time: '68' + etag: W/"0x8D84B9BA6A1147A" + expires: '-1' + location: https://search802607.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c27b729e-e977-11ea-bad6-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search802607.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search802607.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search802607.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BA6B67527\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '374' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:45:15 GMT + elapsed-time: '47' + etag: W/"0x8D84B9BA6B67527" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c2b1e27c-e977-11ea-a2d7-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search802607.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +- request: + body: '{"name": "sample-datasource", "description": "changed", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}, "@odata.etag": "\"0x8D84B9BA6A1147A\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '385' + Content-Type: + - application/json + If-Match: + - '"0x8D84B9BA6A1147A"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search802607.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:45:15 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c2c18c8d-e977-11ea-b879-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://search802607.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_delete_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_delete_datasource_async.yaml new file mode 100644 index 0000000000000..1121059d7e118 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_delete_datasource_async.yaml @@ -0,0 +1,122 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchb0601f27.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchb0601f27.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BB3815BE0\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:45:37 GMT + elapsed-time: '45' + etag: W/"0x8D84B9BB3815BE0" + expires: '-1' + location: https://searchb0601f27.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: ce6a471e-e977-11ea-a2ad-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchb0601f27.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchb0601f27.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchb0601f27.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D84B9BB3815BE0\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '376' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:45:37 GMT + elapsed-time: '54' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cf8c9538-e977-11ea-ae61-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchb0601f27.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchb0601f27.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Fri, 28 Aug 2020 21:45:37 GMT + elapsed-time: '20' + expires: '-1' + pragma: no-cache + request-id: cfd333a9-e977-11ea-988c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: https://searchb0601f27.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchb0601f27.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchb0601f27.search.windows.net/$metadata#datasources","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '202' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:45:38 GMT + elapsed-time: '6' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d00a5187-e977-11ea-8c59-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchb0601f27.search.windows.net/datasources?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_delete_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_delete_datasource_if_unchanged.yaml new file mode 100644 index 0000000000000..fe506ac40c78d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_delete_datasource_if_unchanged.yaml @@ -0,0 +1,110 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search950921e4.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search950921e4.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BCA3CCF43\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:46:15 GMT + elapsed-time: '39' + etag: W/"0x8D84B9BCA3CCF43" + expires: '-1' + location: https://search950921e4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e5bcd4ac-e977-11ea-aa0c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search950921e4.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search950921e4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search950921e4.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BCA914055\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '375' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:46:16 GMT + elapsed-time: '45' + etag: W/"0x8D84B9BCA914055" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e649a707-e977-11ea-b894-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search950921e4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + If-Match: + - '"0x8D84B9BCA3CCF43"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search950921e4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:46:16 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e69ddcf7-e977-11ea-822a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://search950921e4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_get_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_get_datasource_async.yaml new file mode 100644 index 0000000000000..6f4cf21ac6d95 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_get_datasource_async.yaml @@ -0,0 +1,69 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search54ec1df4.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search54ec1df4.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BE3E1E1D3\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:46:58 GMT + elapsed-time: '78' + etag: W/"0x8D84B9BE3E1E1D3" + expires: '-1' + location: https://search54ec1df4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: fef8a970-e977-11ea-8ae9-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search54ec1df4.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search54ec1df4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search54ec1df4.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BE3E1E1D3\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '369' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:46:58 GMT + elapsed-time: '13' + etag: W/"0x8D84B9BE3E1E1D3" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: ffedee3c-e977-11ea-869d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search54ec1df4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_list_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_list_datasource_async.yaml new file mode 100644 index 0000000000000..b4666738fc786 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_data_source_live_async.test_list_datasource_async.yaml @@ -0,0 +1,104 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search74a71e70.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search74a71e70.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BF2B0BEFE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:47:23 GMT + elapsed-time: '50' + etag: W/"0x8D84B9BF2B0BEFE" + expires: '-1' + location: https://search74a71e70.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0e3a6cc9-e978-11ea-b09a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search74a71e70.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "another-sample", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '316' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search74a71e70.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search74a71e70.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B9BF2F4B24E\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '388' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:47:23 GMT + elapsed-time: '31' + etag: W/"0x8D84B9BF2F4B24E" + expires: '-1' + location: https://search74a71e70.search.windows.net/datasources('another-sample')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0ebb6b47-e978-11ea-a243-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search74a71e70.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search74a71e70.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search74a71e70.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D84B9BF2F4B24E\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null},{"@odata.etag":"\"0x8D84B9BF2B0BEFE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '399' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:47:23 GMT + elapsed-time: '24' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0eff6bc6-e978-11ea-ac4c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search74a71e70.search.windows.net/datasources?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_analyze_text.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_analyze_text.yaml new file mode 100644 index 0000000000000..66eab2a9ef18d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_analyze_text.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"text": "One''s ", "analyzer": "standard.lucene"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '55' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4cbf15dc.search.windows.net/indexes('drgqefsg')/search.analyze?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4cbf15dc.search.windows.net/$metadata#Microsoft.Azure.Search.V2020_06_30.AnalyzeResult","tokens":[{"token":"one''s","startOffset":0,"endOffset":5,"position":0},{"token":"two","startOffset":7,"endOffset":10,"position":1}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '297' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:46:58 GMT + elapsed-time: '42' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: febd0e0b-e977-11ea-8cb2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search4cbf15dc.search.windows.net/indexes('drgqefsg')/search.analyze?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_datasource_async.yaml new file mode 100644 index 0000000000000..9e4514e2630d6 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_datasource_async.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search55981a3f.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search55981a3f.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F242A325627\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:43 GMT + elapsed-time: '121' + etag: W/"0x8D83F242A325627" + expires: '-1' + location: https://search55981a3f.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 45d40484-dd00-11ea-984d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search55981a3f.search.windows.net/datasources?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_index.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_index.yaml new file mode 100644 index 0000000000000..08cb1fa90a770 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_index.yaml @@ -0,0 +1,41 @@ +interactions: +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}, {"name": "baseRate", "type": "Edm.Double", + "key": false, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}], "scoringProfiles": [{"name": "MyProfile"}], + "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '457' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4bde15af.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4bde15af.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9BF6A0F1E0\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '967' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:47:29 GMT + elapsed-time: '950' + etag: W/"0x8D84B9BF6A0F1E0" + expires: '-1' + location: https://search4bde15af.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 110ae102-e978-11ea-a0e4-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search4bde15af.search.windows.net/indexes?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_indexer.yaml new file mode 100644 index 0000000000000..0fab3830d9065 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_indexer.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search78781686.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78781686.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F2474DBDBCD\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:01:48 GMT + elapsed-time: '82' + etag: W/"0x8D83F2474DBDBCD" + expires: '-1' + location: https://search78781686.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 9085f067-dd00-11ea-8292-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search78781686.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search78781686.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78781686.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F247572E035\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:01:49 GMT + elapsed-time: '832' + etag: W/"0x8D83F247572E035" + expires: '-1' + location: https://search78781686.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 90acc34b-dd00-11ea-9869-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search78781686.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search78781686.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:01:50 GMT + elapsed-time: '547' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 9146b6d9-dd00-11ea-80ea-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://search78781686.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_datasource_async.yaml new file mode 100644 index 0000000000000..d3a78293d582f --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_datasource_async.yaml @@ -0,0 +1,168 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search72cd1e61.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search72cd1e61.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F243204F4B1\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:56 GMT + elapsed-time: '50' + etag: W/"0x8D83F243204F4B1" + expires: '-1' + location: https://search72cd1e61.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 4db168ca-dd00-11ea-b0d8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search72cd1e61.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search72cd1e61.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search72cd1e61.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D83F243204F4B1\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '375' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:56 GMT + elapsed-time: '11' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 4dd296e3-dd00-11ea-8784-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search72cd1e61.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search72cd1e61.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search72cd1e61.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F2432191C9C\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '375' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:56 GMT + elapsed-time: '37' + etag: W/"0x8D83F2432191C9C" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 4ddab5ec-dd00-11ea-ace6-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search72cd1e61.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search72cd1e61.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search72cd1e61.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D83F2432191C9C\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '381' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:56 GMT + elapsed-time: '27' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 4de7d8a2-dd00-11ea-889a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search72cd1e61.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search72cd1e61.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search72cd1e61.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F2432191C9C\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '375' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:56 GMT + elapsed-time: '7' + etag: W/"0x8D83F2432191C9C" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 4df26691-dd00-11ea-a189-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search72cd1e61.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_datasource_if_unchanged.yaml new file mode 100644 index 0000000000000..29ceb3165b3f1 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_datasource_if_unchanged.yaml @@ -0,0 +1,118 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search520c211e.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search520c211e.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F243A2EEADA\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:10 GMT + elapsed-time: '53' + etag: W/"0x8D83F243A2EEADA" + expires: '-1' + location: https://search520c211e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 55da68e9-dd00-11ea-86df-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search520c211e.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search520c211e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search520c211e.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F243A3F8FB6\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '375' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:10 GMT + elapsed-time: '31' + etag: W/"0x8D83F243A3F8FB6" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 56001e49-dd00-11ea-a071-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search520c211e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +- request: + body: '{"name": "sample-datasource", "description": "changed", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}, "@odata.etag": "\"0x8D83F243A2EEADA\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '385' + Content-Type: + - application/json + If-Match: + - '"0x8D83F243A2EEADA"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search520c211e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:10 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 560d5a3b-dd00-11ea-8383-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://search520c211e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_index.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_index.yaml new file mode 100644 index 0000000000000..467b36d83ffaa --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_index.yaml @@ -0,0 +1,85 @@ +interactions: +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}, {"name": "baseRate", "type": "Edm.Double", + "key": false, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}], "scoringProfiles": [], "corsOptions": + {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '436' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search3b9d19d1.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search3b9d19d1.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9C06DAD591\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '893' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:47:57 GMT + elapsed-time: '658' + etag: W/"0x8D84B9C06DAD591" + expires: '-1' + location: https://search3b9d19d1.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 22216948-e978-11ea-a226-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search3b9d19d1.search.windows.net/indexes('hotels')?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}, {"name": "baseRate", "type": "Edm.Double", + "key": false, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}], "scoringProfiles": [{"name": "MyProfile"}], + "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '457' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search3b9d19d1.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search3b9d19d1.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9C0716FF3E\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '576' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:47:57 GMT + elapsed-time: '260' + etag: W/"0x8D84B9C0716FF3E" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 22ef9039-e978-11ea-829f-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search3b9d19d1.search.windows.net/indexes('hotels')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexer.yaml new file mode 100644 index 0000000000000..5c103397e81d7 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexer.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search707b1aa8.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search707b1aa8.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F247DB2AC4B\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:03 GMT + elapsed-time: '98' + etag: W/"0x8D83F247DB2AC4B" + expires: '-1' + location: https://search707b1aa8.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 995b0bb5-dd00-11ea-b228-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search707b1aa8.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search707b1aa8.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search707b1aa8.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F247E3B2F11\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:04 GMT + elapsed-time: '749' + etag: W/"0x8D83F247E3B2F11" + expires: '-1' + location: https://search707b1aa8.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 9983ace4-dd00-11ea-a9ec-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search707b1aa8.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search707b1aa8.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:04 GMT + elapsed-time: '291' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 9a10695e-dd00-11ea-b93b-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://search707b1aa8.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexer_if_unchanged.yaml new file mode 100644 index 0000000000000..a098b3a132f84 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexer_if_unchanged.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchef9b1fe2.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchef9b1fe2.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F2486E0FB97\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:18 GMT + elapsed-time: '49' + etag: W/"0x8D83F2486E0FB97" + expires: '-1' + location: https://searchef9b1fe2.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a28d484f-dd00-11ea-ae57-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchef9b1fe2.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchef9b1fe2.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchef9b1fe2.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F24877E90D2\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:19 GMT + elapsed-time: '903' + etag: W/"0x8D83F24877E90D2" + expires: '-1' + location: https://searchef9b1fe2.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a2af7466-dd00-11ea-80f0-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchef9b1fe2.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchef9b1fe2.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:20 GMT + elapsed-time: '563' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a353f0eb-dd00-11ea-9e27-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://searchef9b1fe2.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexes_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexes_if_unchanged.yaml new file mode 100644 index 0000000000000..0aee4720e9dd8 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_indexes_if_unchanged.yaml @@ -0,0 +1,121 @@ +interactions: +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [{"name": "MyProfile"}], + "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '302' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchefa91fe3.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchefa91fe3.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9C189FFEAA\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '961' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:48:27 GMT + elapsed-time: '1282' + etag: W/"0x8D84B9C189FFEAA" + expires: '-1' + location: https://searchefa91fe3.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 332dbcc4-e978-11ea-a039-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchefa91fe3.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [], "corsOptions": + {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '281' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchefa91fe3.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchefa91fe3.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9C18EB6D6E\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '544' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:48:27 GMT + elapsed-time: '172' + etag: W/"0x8D84B9C18EB6D6E" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 34b3ef04-e978-11ea-a08a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchefa91fe3.search.windows.net/indexes('hotels')?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [], "corsOptions": + {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}, "@odata.etag": "\"0x8D84B9C189FFEAA\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + If-Match: + - '"0x8D84B9C189FFEAA"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchefa91fe3.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:48:28 GMT + elapsed-time: '33' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 34ff9e28-e978-11ea-9805-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://searchefa91fe3.search.windows.net/indexes('hotels')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset.yaml new file mode 100644 index 0000000000000..703ba5c7beffc --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset.yaml @@ -0,0 +1,142 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search8bf31b24.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8bf31b24.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23E5FDE946\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '609' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:48 GMT + elapsed-time: '50' + etag: W/"0x8D83F23E5FDE946" + expires: '-1' + location: https://search8bf31b24.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 01a92148-dd00-11ea-b9ca-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search8bf31b24.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search8bf31b24.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8bf31b24.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23E60C91F1\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '476' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:48 GMT + elapsed-time: '50' + etag: W/"0x8D83F23E60C91F1" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 01cb8ea1-dd00-11ea-ade3-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8bf31b24.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8bf31b24.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8bf31b24.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D83F23E60C91F1\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '533' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:48 GMT + elapsed-time: '38' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 01da83e7-dd00-11ea-a633-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8bf31b24.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8bf31b24.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8bf31b24.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23E60C91F1\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '531' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:48 GMT + elapsed-time: '28' + etag: W/"0x8D83F23E60C91F1" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 01e77b0a-dd00-11ea-a07d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8bf31b24.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset_if_unchanged.yaml new file mode 100644 index 0000000000000..5dbb5dd117bc9 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset_if_unchanged.yaml @@ -0,0 +1,111 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search116e205e.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search116e205e.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23ED4D35EB\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '609' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:01 GMT + elapsed-time: '65' + etag: W/"0x8D83F23ED4D35EB" + expires: '-1' + location: https://search116e205e.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 08f55bca-dd00-11ea-8d7e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search116e205e.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search116e205e.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search116e205e.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23ED5F1377\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '476' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:01 GMT + elapsed-time: '74' + etag: W/"0x8D83F23ED5F1377" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 091ba2dc-dd00-11ea-9653-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search116e205e.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search116e205e.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search116e205e.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D83F23ED5F1377\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '533' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:01 GMT + elapsed-time: '35' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 092d511e-dd00-11ea-8817-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search116e205e.search.windows.net/skillsets?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset_inplace.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset_inplace.yaml new file mode 100644 index 0000000000000..eb8cb9dec7957 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_skillset_inplace.yaml @@ -0,0 +1,142 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search73bb1e5f.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search73bb1e5f.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23F4446779\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '609' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:12 GMT + elapsed-time: '71' + etag: W/"0x8D83F23F4446779" + expires: '-1' + location: https://search73bb1e5f.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0fed102a-dd00-11ea-9e11-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search73bb1e5f.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search73bb1e5f.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search73bb1e5f.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23F45421CD\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '476' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:12 GMT + elapsed-time: '57' + etag: W/"0x8D83F23F45421CD" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1013325d-dd00-11ea-afae-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search73bb1e5f.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search73bb1e5f.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search73bb1e5f.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D83F23F45421CD\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '533' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:12 GMT + elapsed-time: '41' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 10221b6e-dd00-11ea-9df8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search73bb1e5f.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search73bb1e5f.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search73bb1e5f.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23F45421CD\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '530' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:12 GMT + elapsed-time: '23' + etag: W/"0x8D83F23F45421CD" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 102e599e-dd00-11ea-8783-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search73bb1e5f.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_synonym_map.yaml new file mode 100644 index 0000000000000..0b3bc2b49a775 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_or_update_synonym_map.yaml @@ -0,0 +1,176 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "U\nS\nA\n,\n \nU\nn\ni\nt\ne\nd\n + \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '261' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23B5FD2C9F\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '406' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:28 GMT + elapsed-time: '36' + etag: W/"0x8D83F23B5FD2C9F" + expires: '-1' + location: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d1a989b4-dcff-11ea-8f8f-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D83F23B5FD2C9F\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '385' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:28 GMT + elapsed-time: '8' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d1c98827-dcff-11ea-974c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '125' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23B60E6DD3\"","name":"test-syn-map","format":"solr","synonyms":"W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '335' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:28 GMT + elapsed-time: '15' + etag: W/"0x8D83F23B60E6DD3" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d1d15f92-dcff-11ea-8928-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D83F23B60E6DD3\"","name":"test-syn-map","format":"solr","synonyms":"W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '339' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:28 GMT + elapsed-time: '15' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d1dae9c8-dcff-11ea-9161-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23B60E6DD3\"","name":"test-syn-map","format":"solr","synonyms":"W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '335' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:28 GMT + elapsed-time: '6' + etag: W/"0x8D83F23B60E6DD3" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d1e38818-dcff-11ea-8cd1-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_skillset.yaml new file mode 100644 index 0000000000000..168844e58e7a2 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_skillset.yaml @@ -0,0 +1,68 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search8fce1702.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8fce1702.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F23FC939FAE\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '608' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:25 GMT + elapsed-time: '51' + etag: W/"0x8D83F23FC939FAE" + expires: '-1' + location: https://search8fce1702.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1840e48d-dd00-11ea-93e4-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search8fce1702.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8fce1702.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8fce1702.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D83F23FC939FAE\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '532' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:26 GMT + elapsed-time: '41' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1861a40c-dd00-11ea-9c8d-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8fce1702.search.windows.net/skillsets?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_synonym_map.yaml new file mode 100644 index 0000000000000..deb488580cc9f --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_create_synonym_map.yaml @@ -0,0 +1,41 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "U\nS\nA\n,\n \nU\nn\ni\nt\ne\nd\n + \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '261' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd8241851.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd8241851.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23BE18A142\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '406' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:41 GMT + elapsed-time: '78' + etag: W/"0x8D83F23BE18A142" + expires: '-1' + location: https://searchd8241851.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d9c0c5cd-dcff-11ea-b14c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchd8241851.search.windows.net/synonymmaps?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_datasource_async.yaml new file mode 100644 index 0000000000000..bd8026bd5e1d6 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_datasource_async.yaml @@ -0,0 +1,122 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search55741a3e.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search55741a3e.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F24442234B1\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:25 GMT + elapsed-time: '59' + etag: W/"0x8D83F24442234B1" + expires: '-1' + location: https://search55741a3e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 5fd16b75-dd00-11ea-9283-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search55741a3e.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search55741a3e.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search55741a3e.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D83F24442234B1\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '375' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:26 GMT + elapsed-time: '31' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 5ff1ed2c-dd00-11ea-a76f-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search55741a3e.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search55741a3e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Thu, 13 Aug 2020 01:00:26 GMT + elapsed-time: '34' + expires: '-1' + pragma: no-cache + request-id: 5fff1776-dd00-11ea-b656-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: https://search55741a3e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search55741a3e.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search55741a3e.search.windows.net/$metadata#datasources","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '202' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:27 GMT + elapsed-time: '7' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 600abdaa-dd00-11ea-a881-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search55741a3e.search.windows.net/datasources?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_datasource_if_unchanged.yaml new file mode 100644 index 0000000000000..a14210ede34e7 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_datasource_if_unchanged.yaml @@ -0,0 +1,110 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search17be1cfb.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search17be1cfb.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F244C91F360\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:40 GMT + elapsed-time: '51' + etag: W/"0x8D83F244C91F360" + expires: '-1' + location: https://search17be1cfb.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 683de72f-dd00-11ea-8bc5-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search17be1cfb.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search17be1cfb.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search17be1cfb.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F244C9E0382\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '375' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:40 GMT + elapsed-time: '32' + etag: W/"0x8D83F244C9E0382" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6860153a-dd00-11ea-8ba4-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search17be1cfb.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + If-Match: + - '"0x8D83F244C91F360"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search17be1cfb.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:40 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 686c0e56-dd00-11ea-afbe-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://search17be1cfb.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexer.yaml new file mode 100644 index 0000000000000..b75518ac09895 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexer.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search785d1685.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search785d1685.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F248F250E49\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:32 GMT + elapsed-time: '49' + etag: W/"0x8D83F248F250E49" + expires: '-1' + location: https://search785d1685.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: aad1f12b-dd00-11ea-b826-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search785d1685.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search785d1685.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search785d1685.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F248FADDF49\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:32 GMT + elapsed-time: '741' + etag: W/"0x8D83F248FADDF49" + expires: '-1' + location: https://search785d1685.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: aaf34406-dd00-11ea-8196-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search785d1685.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search785d1685.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:33 GMT + elapsed-time: '160' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: ab7ff5c3-dd00-11ea-8373-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://search785d1685.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexer_if_unchanged.yaml new file mode 100644 index 0000000000000..a4aaa5110e319 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexer_if_unchanged.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchc1b61bbf.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchc1b61bbf.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F2497101B38\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:45 GMT + elapsed-time: '50' + etag: W/"0x8D83F2497101B38" + expires: '-1' + location: https://searchc1b61bbf.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b2bad13f-dd00-11ea-9183-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchc1b61bbf.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchc1b61bbf.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchc1b61bbf.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F24979541F6\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:46 GMT + elapsed-time: '735' + etag: W/"0x8D83F24979541F6" + expires: '-1' + location: https://searchc1b61bbf.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b2de6013-dd00-11ea-9ee5-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchc1b61bbf.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchc1b61bbf.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:02:47 GMT + elapsed-time: '142' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b369c50b-dd00-11ea-a554-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://searchc1b61bbf.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexes.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexes.yaml new file mode 100644 index 0000000000000..ce5a8a83e9418 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexes.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search785e1686.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Fri, 28 Aug 2020 21:48:55 GMT + elapsed-time: '371' + expires: '-1' + pragma: no-cache + request-id: 44586fa7-e978-11ea-99f8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: https://search785e1686.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search785e1686.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search785e1686.search.windows.net/$metadata#indexes","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '200' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:49:00 GMT + elapsed-time: '34' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 485a1109-e978-11ea-97b6-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search785e1686.search.windows.net/indexes?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexes_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexes_if_unchanged.yaml new file mode 100644 index 0000000000000..15f5513fd965d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_indexes_if_unchanged.yaml @@ -0,0 +1,112 @@ +interactions: +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [{"name": "MyProfile"}], + "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '302' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchc1c41bc0.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchc1c41bc0.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9C3FF9E670\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '961' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:49:33 GMT + elapsed-time: '997' + etag: W/"0x8D84B9C3FF9E670" + expires: '-1' + location: https://searchc1c41bc0.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 59e9a8f3-e978-11ea-8954-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchc1c41bc0.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [], "corsOptions": + {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '281' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchc1c41bc0.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchc1c41bc0.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9C401F76B6\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '545' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:49:33 GMT + elapsed-time: '168' + etag: W/"0x8D84B9C401F76B6" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 5c0b9763-e978-11ea-b5ce-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchc1c41bc0.search.windows.net/indexes('hotels')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + If-Match: + - '"0x8D84B9C3FF9E670"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchc1c41bc0.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:49:33 GMT + elapsed-time: '15' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 5c321e65-e978-11ea-aeaa-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://searchc1c41bc0.search.windows.net/indexes('hotels')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_skillset.yaml new file mode 100644 index 0000000000000..2d6604b8037e5 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_skillset.yaml @@ -0,0 +1,122 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search8fb21701.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8fb21701.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F2404EEE839\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '608' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:40 GMT + elapsed-time: '65' + etag: W/"0x8D83F2404EEE839" + expires: '-1' + location: https://search8fb21701.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 209abcab-dd00-11ea-8091-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search8fb21701.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8fb21701.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8fb21701.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D83F2404EEE839\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '532' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:40 GMT + elapsed-time: '38' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 20bd222b-dd00-11ea-9a03-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8fb21701.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search8fb21701.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Thu, 13 Aug 2020 00:58:40 GMT + elapsed-time: '38' + expires: '-1' + pragma: no-cache + request-id: 20c9591d-dd00-11ea-a1bc-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: https://search8fb21701.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8fb21701.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8fb21701.search.windows.net/$metadata#skillsets","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '202' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:46 GMT + elapsed-time: '18' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 23d0932e-dd00-11ea-b0c1-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8fb21701.search.windows.net/skillsets?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_skillset_if_unchanged.yaml new file mode 100644 index 0000000000000..6d42d4bde13fa --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_skillset_if_unchanged.yaml @@ -0,0 +1,111 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchdf571c3b.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchdf571c3b.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F24104BA111\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '608' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:59 GMT + elapsed-time: '65' + etag: W/"0x8D83F24104BA111" + expires: '-1' + location: https://searchdf571c3b.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 2bf4d9a7-dd00-11ea-8393-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchdf571c3b.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: '{"name": "test-ss", "description": "updated", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '255' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchdf571c3b.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchdf571c3b.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F24105D3073\"","name":"test-ss","description":"updated","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '478' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:59 GMT + elapsed-time: '64' + etag: W/"0x8D83F24105D3073" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 2c19bb70-dd00-11ea-a8fd-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchdf571c3b.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + If-Match: + - '"0x8D83F24104BA111"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchdf571c3b.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:58:59 GMT + elapsed-time: '17' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 2c2b65e7-dd00-11ea-8555-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://searchdf571c3b.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_synonym_map.yaml new file mode 100644 index 0000000000000..bccbf3424128d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_synonym_map.yaml @@ -0,0 +1,128 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "U\nS\nA\n,\n \nU\nn\ni\nt\ne\nd\n + \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '261' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd8051850.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd8051850.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23C6013CC7\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '406' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:55 GMT + elapsed-time: '83' + etag: W/"0x8D83F23C6013CC7" + expires: '-1' + location: https://searchd8051850.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e1a81c52-dcff-11ea-b6b8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchd8051850.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchd8051850.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd8051850.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D83F23C6013CC7\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '385' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:55 GMT + elapsed-time: '11' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e1ce2039-dcff-11ea-8d92-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchd8051850.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchd8051850.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Thu, 13 Aug 2020 00:56:55 GMT + elapsed-time: '19' + expires: '-1' + pragma: no-cache + request-id: e1d67cd7-dcff-11ea-b523-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: https://searchd8051850.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchd8051850.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd8051850.search.windows.net/$metadata#synonymmaps","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '204' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:56:55 GMT + elapsed-time: '6' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e1df2d86-dcff-11ea-b381-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchd8051850.search.windows.net/synonymmaps?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_synonym_map_if_unchanged.yaml new file mode 100644 index 0000000000000..7d1ab1d77d8fc --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_delete_synonym_map_if_unchanged.yaml @@ -0,0 +1,113 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "U\nS\nA\n,\n \nU\nn\ni\nt\ne\nd\n + \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '261' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search38bc1d8a.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search38bc1d8a.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23CDE1996D\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '406' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:07 GMT + elapsed-time: '44' + etag: W/"0x8D83F23CDE1996D" + expires: '-1' + location: https://search38bc1d8a.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e98c5d1c-dcff-11ea-a199-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search38bc1d8a.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '125' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search38bc1d8a.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search38bc1d8a.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23CDEE6D02\"","name":"test-syn-map","format":"solr","synonyms":"W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '334' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:07 GMT + elapsed-time: '30' + etag: W/"0x8D83F23CDEE6D02" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e9ae0fe8-dcff-11ea-9b97-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search38bc1d8a.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + If-Match: + - '"0x8D83F23CDE1996D"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search38bc1d8a.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:08 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e9bb255a-dcff-11ea-ac92-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://search38bc1d8a.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_datasource_async.yaml new file mode 100644 index 0000000000000..64db993470241 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_datasource_async.yaml @@ -0,0 +1,69 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search8bb190b.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8bb190b.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F24542C395E\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '390' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:53 GMT + elapsed-time: '33' + etag: W/"0x8D83F24542C395E" + expires: '-1' + location: https://search8bb190b.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6fdbd1f5-dd00-11ea-8f4e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search8bb190b.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search8bb190b.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8bb190b.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F24542C395E\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '368' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:00:53 GMT + elapsed-time: '9' + etag: W/"0x8D83F24542C395E" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6ffa4d3a-dd00-11ea-9b62-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search8bb190b.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_index.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_index.yaml new file mode 100644 index 0000000000000..dd19945f8c737 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_index.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchc3d147b.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchc3d147b.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9C4DB5C20B\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1165' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:50:02 GMT + elapsed-time: '37' + etag: W/"0x8D84B9C4DB5C20B" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6d2c6643-e978-11ea-8441-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchc3d147b.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_index_statistics.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_index_statistics.yaml new file mode 100644 index 0000000000000..f7bb46df62746 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_index_statistics.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search9691925.search.windows.net/indexes('drgqefsg')/search.stats?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9691925.search.windows.net/$metadata#Microsoft.Azure.Search.V2020_06_30.IndexStatistics","documentCount":0,"storageSize":0}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '255' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:50:22 GMT + elapsed-time: '31' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 78b4a61c-e978-11ea-ae59-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search9691925.search.windows.net/indexes('drgqefsg')/search.stats?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_indexer.yaml new file mode 100644 index 0000000000000..81d29a4b0aea1 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_indexer.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search366f1552.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search366f1552.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F249FC5F01D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:00 GMT + elapsed-time: '72' + etag: W/"0x8D83F249FC5F01D" + expires: '-1' + location: https://search366f1552.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: bb6d3e44-dd00-11ea-bb74-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search366f1552.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search366f1552.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search366f1552.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F24A041C667\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:01 GMT + elapsed-time: '663' + etag: W/"0x8D83F24A041C667" + expires: '-1' + location: https://search366f1552.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: bb93f7e3-dd00-11ea-b2a4-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search366f1552.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search366f1552.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:01 GMT + elapsed-time: '171' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: bc143140-dd00-11ea-b41e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://search366f1552.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_indexer_status.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_indexer_status.yaml new file mode 100644 index 0000000000000..e5243e143351d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_indexer_status.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd7791855.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd7791855.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F24A8895C4A\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:15 GMT + elapsed-time: '92' + etag: W/"0x8D83F24A8895C4A" + expires: '-1' + location: https://searchd7791855.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c4324032-dd00-11ea-8031-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchd7791855.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd7791855.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd7791855.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F24A90C38AA\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:16 GMT + elapsed-time: '705' + etag: W/"0x8D83F24A90C38AA" + expires: '-1' + location: https://searchd7791855.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c45942c3-dd00-11ea-b154-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchd7791855.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd7791855.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:16 GMT + elapsed-time: '139' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c4de829e-dd00-11ea-8801-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://searchd7791855.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_service_statistics.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_service_statistics.yaml new file mode 100644 index 0000000000000..75db8d86a74e2 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_service_statistics.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search3d4a19fe.search.windows.net/servicestats?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search3d4a19fe.search.windows.net/$metadata#Microsoft.Azure.Search.V2020_06_30.ServiceStatistics","counters":{"documentCount":{"usage":0,"quota":null},"indexesCount":{"usage":0,"quota":3},"indexersCount":{"usage":0,"quota":3},"dataSourcesCount":{"usage":0,"quota":3},"storageSize":{"usage":0,"quota":52428800},"synonymMaps":{"usage":0,"quota":3},"skillsetCount":{"usage":0,"quota":3}},"limits":{"maxFieldsPerIndex":1000,"maxFieldNestingDepthPerIndex":10,"maxComplexCollectionFieldsPerIndex":40,"maxComplexObjectsInCollectionsPerDocument":3000}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '423' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:50:36 GMT + elapsed-time: '94' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 80e9062d-e978-11ea-bb73-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search3d4a19fe.search.windows.net/servicestats?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_skillset.yaml new file mode 100644 index 0000000000000..b9868a512b8a3 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_skillset.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4c9115ce.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4c9115ce.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F24186A2371\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '608' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:13 GMT + elapsed-time: '98' + etag: W/"0x8D83F24186A2371" + expires: '-1' + location: https://search4c9115ce.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 340f2cfc-dd00-11ea-8f0e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search4c9115ce.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search4c9115ce.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4c9115ce.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D83F24186A2371\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '532' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:13 GMT + elapsed-time: '35' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 34380192-dd00-11ea-aac6-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search4c9115ce.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search4c9115ce.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4c9115ce.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F24186A2371\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '529' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:13 GMT + elapsed-time: '25' + etag: W/"0x8D83F24186A2371" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3443553a-dd00-11ea-baa4-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search4c9115ce.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_skillsets.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_skillsets.yaml new file mode 100644 index 0000000000000..3c9f81d6e1731 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_skillsets.yaml @@ -0,0 +1,106 @@ +interactions: +- request: + body: '{"name": "test-ss-1", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '255' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search62d21641.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search62d21641.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F2420EC82E5\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '611' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:27 GMT + elapsed-time: '57' + etag: W/"0x8D83F2420EC82E5" + expires: '-1' + location: https://search62d21641.search.windows.net/skillsets('test-ss-1')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3c990817-dd00-11ea-8ebe-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search62d21641.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: '{"name": "test-ss-2", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '255' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search62d21641.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search62d21641.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D83F2420FB2B8F\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '611' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:27 GMT + elapsed-time: '52' + etag: W/"0x8D83F2420FB2B8F" + expires: '-1' + location: https://search62d21641.search.windows.net/skillsets('test-ss-2')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3cbabc68-dd00-11ea-8823-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search62d21641.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search62d21641.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search62d21641.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D83F2420EC82E5\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null},{"@odata.etag":"\"0x8D83F2420FB2B8F\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '564' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:59:27 GMT + elapsed-time: '68' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3cca1069-dd00-11ea-82c2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search62d21641.search.windows.net/skillsets?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_synonym_map.yaml new file mode 100644 index 0000000000000..0cf1f292fdaff --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_synonym_map.yaml @@ -0,0 +1,108 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "U\nS\nA\n,\n \nU\nn\ni\nt\ne\nd\n + \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '261' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search914b171d.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search914b171d.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23D5EC904B\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '406' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:21 GMT + elapsed-time: '40' + etag: W/"0x8D83F23D5EC904B" + expires: '-1' + location: https://search914b171d.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f199c54e-dcff-11ea-80e4-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search914b171d.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search914b171d.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search914b171d.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D83F23D5EC904B\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '385' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:21 GMT + elapsed-time: '9' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f1b96779-dcff-11ea-b0d4-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search914b171d.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search914b171d.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search914b171d.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23D5EC904B\"","name":"test-syn-map","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '380' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:21 GMT + elapsed-time: '7' + etag: W/"0x8D83F23D5EC904B" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f1c1817e-dcff-11ea-9486-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search914b171d.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_synonym_maps.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_synonym_maps.yaml new file mode 100644 index 0000000000000..863dfc36803f8 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_get_synonym_maps.yaml @@ -0,0 +1,112 @@ +interactions: +- request: + body: '{"name": "test-syn-map-1", "format": "solr", "synonyms": "U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '263' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searcha8db1790.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8db1790.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23DD96908D\"","name":"test-syn-map-1","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '408' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:34 GMT + elapsed-time: '37' + etag: W/"0x8D83F23DD96908D" + expires: '-1' + location: https://searcha8db1790.search.windows.net/synonymmaps('test-syn-map-1')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f9447a4b-dcff-11ea-8158-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searcha8db1790.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: '{"name": "test-syn-map-2", "format": "solr", "synonyms": "W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searcha8db1790.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8db1790.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D83F23DDA1B624\"","name":"test-syn-map-2","format":"solr","synonyms":"W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '272' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:34 GMT + elapsed-time: '26' + etag: W/"0x8D83F23DDA1B624" + expires: '-1' + location: https://searcha8db1790.search.windows.net/synonymmaps('test-syn-map-2')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f9634c7b-dcff-11ea-bf56-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searcha8db1790.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searcha8db1790.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8db1790.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D83F23DD96908D\"","name":"test-syn-map-1","format":"solr","synonyms":"U\nS\nA\n,\n + \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n,\n \nU\nn\ni\nt\ne\nd\n \nS\nt\na\nt\ne\ns\n + \no\nf\n \nA\nm\ne\nr\ni\nc\na\n\n\nW\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n \nW\na\ns\nh\n.\n + \n=\n>\n \nW\nA","encryptionKey":null},{"@odata.etag":"\"0x8D83F23DDA1B624\"","name":"test-syn-map-2","format":"solr","synonyms":"W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '411' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 00:57:34 GMT + elapsed-time: '37' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f96dcdb3-dcff-11ea-89ce-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searcha8db1790.search.windows.net/synonymmaps?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_datasource_async.yaml new file mode 100644 index 0000000000000..2e211482d7d4d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_datasource_async.yaml @@ -0,0 +1,104 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search238d1987.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search238d1987.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F245C355B2B\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:01:07 GMT + elapsed-time: '78' + etag: W/"0x8D83F245C355B2B" + expires: '-1' + location: https://search238d1987.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 77dd00bd-dd00-11ea-abb3-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search238d1987.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "another-sample", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '316' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search238d1987.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search238d1987.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F245C41B985\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '388' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:01:07 GMT + elapsed-time: '36' + etag: W/"0x8D83F245C41B985" + expires: '-1' + location: https://search238d1987.search.windows.net/datasources('another-sample')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 78031f8b-dd00-11ea-a378-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search238d1987.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search238d1987.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search238d1987.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D83F245C41B985\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null},{"@odata.etag":"\"0x8D83F245C355B2B\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '401' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:01:07 GMT + elapsed-time: '17' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 781016df-dd00-11ea-9497-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search238d1987.search.windows.net/datasources?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexer.yaml new file mode 100644 index 0000000000000..e696b8c5fd57d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexer.yaml @@ -0,0 +1,185 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4ce515ce.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4ce515ce.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F24B088B828\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:28 GMT + elapsed-time: '57' + etag: W/"0x8D83F24B088B828" + expires: '-1' + location: https://search4ce515ce.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cc343c7d-dd00-11ea-9ff8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search4ce515ce.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4ce515ce.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4ce515ce.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F24B1113AFE\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:29 GMT + elapsed-time: '731' + etag: W/"0x8D83F24B1113AFE" + expires: '-1' + location: https://search4ce515ce.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cc57e2d0-dd00-11ea-a064-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search4ce515ce.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: 'b''{"name": "another-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '320' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4ce515ce.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4ce515ce.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F24B132ABC3\"","name":"another-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '392' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:29 GMT + elapsed-time: '57' + etag: W/"0x8D83F24B132ABC3" + expires: '-1' + location: https://search4ce515ce.search.windows.net/datasources('another-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cce30bfd-dd00-11ea-959c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search4ce515ce.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "another-index", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '135' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4ce515ce.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4ce515ce.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F24B1C67B51\"","name":"another-index","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '636' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:30 GMT + elapsed-time: '803' + etag: W/"0x8D83F24B1C67B51" + expires: '-1' + location: https://search4ce515ce.search.windows.net/indexes('another-index')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cd04852f-dd00-11ea-83e2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search4ce515ce.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4ce515ce.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:31 GMT + elapsed-time: '177' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: cd996f6b-dd00-11ea-9a46-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://search4ce515ce.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexes.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexes.yaml new file mode 100644 index 0000000000000..475d4dfe268e7 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexes.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search4ce615cf.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4ce615cf.search.windows.net/$metadata#indexes","value":[{"@odata.etag":"\"0x8D84B9C6FE1A377\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1154' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:50:59 GMT + elapsed-time: '96' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 8e5197b5-e978-11ea-9087-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search4ce615cf.search.windows.net/indexes?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexes_empty.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexes_empty.yaml new file mode 100644 index 0000000000000..b851237400082 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_list_indexes_empty.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchd858185d.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd858185d.search.windows.net/$metadata#indexes","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '200' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:51:19 GMT + elapsed-time: '39' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 99a60bd6-e978-11ea-a055-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchd858185d.search.windows.net/indexes?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_reset_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_reset_indexer.yaml new file mode 100644 index 0000000000000..671a2c874b803 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_reset_indexer.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search63011635.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search63011635.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F24B95A5796\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:42 GMT + elapsed-time: '78' + etag: W/"0x8D83F24B95A5796" + expires: '-1' + location: https://search63011635.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d505292d-dd00-11ea-9495-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search63011635.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search63011635.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search63011635.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F24B9DF3030\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:43 GMT + elapsed-time: '720' + etag: W/"0x8D83F24B9DF3030" + expires: '-1' + location: https://search63011635.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d52942db-dd00-11ea-a8ff-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search63011635.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search63011635.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:44 GMT + elapsed-time: '146' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d5b1e9f8-dd00-11ea-afe8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://search63011635.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_run_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_run_indexer.yaml new file mode 100644 index 0000000000000..bf9a9a7881335 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_live_async.test_run_indexer.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search37521567.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search37521567.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D83F24C1C8DD71\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '391' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:57 GMT + elapsed-time: '58' + etag: W/"0x8D83F24C1C8DD71" + expires: '-1' + location: https://search37521567.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: dd786c38-dd00-11ea-9928-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search37521567.search.windows.net/datasources?api-version=2020-06-30 +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search37521567.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search37521567.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D83F24C24DDD34\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: no-cache + content-length: '629' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:57 GMT + elapsed-time: '704' + etag: W/"0x8D83F24C24DDD34" + expires: '-1' + location: https://search37521567.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: dd98b9cf-dd00-11ea-9b07-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search37521567.search.windows.net/indexes?api-version=2020-06-30 +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search37521567.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"Error with data source: Credentials + provided in the connection string are invalid or have expired.\r\nAs a result + of a one-time maintenance activity, your search service went through a change + of the IP address for its API endpoint. This caused indexers that depend on + network access rules on the data source to stop working. In order to address + this issue, please update the network access rules in your data source to + use the new IP address. We apologize for the inconvenience.\r\nFor more information + on troubleshooting connection issues to Azure Storage accounts, please see + https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source + definition in order to proceed."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '723' + content-type: application/json; odata.metadata=minimal + date: Thu, 13 Aug 2020 01:03:58 GMT + elapsed-time: '157' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: de2006c6-dd00-11ea-89a3-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 400 + message: Bad Request + url: https://search37521567.search.windows.net/indexers?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset.yaml new file mode 100644 index 0000000000000..84d14828466e6 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset.yaml @@ -0,0 +1,142 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search971e1eee.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search971e1eee.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9C9C5F5675\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '609' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:52:08 GMT + elapsed-time: '85' + etag: W/"0x8D84B9C9C5F5675" + expires: '-1' + location: https://search971e1eee.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b83a7798-e978-11ea-a217-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search971e1eee.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search971e1eee.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search971e1eee.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9C9C755384\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '475' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:52:08 GMT + elapsed-time: '78' + etag: W/"0x8D84B9C9C755384" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b86bfb47-e978-11ea-b3f8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search971e1eee.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search971e1eee.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search971e1eee.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B9C9C755384\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '532' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:52:08 GMT + elapsed-time: '48' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b8809760-e978-11ea-bd9a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search971e1eee.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search971e1eee.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search971e1eee.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9C9C755384\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '530' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:52:08 GMT + elapsed-time: '28' + etag: W/"0x8D84B9C9C755384" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b8bb631f-e978-11ea-bcd2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search971e1eee.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset_if_unchanged.yaml new file mode 100644 index 0000000000000..38df76fe660be --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset_if_unchanged.yaml @@ -0,0 +1,111 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search4ddb2428.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4ddb2428.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CAB9F8119\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '609' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:52:33 GMT + elapsed-time: '175' + etag: W/"0x8D84B9CAB9F8119" + expires: '-1' + location: https://search4ddb2428.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c72ded97-e978-11ea-984e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search4ddb2428.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search4ddb2428.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4ddb2428.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CABD7D986\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '476' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:52:33 GMT + elapsed-time: '75' + etag: W/"0x8D84B9CABD7D986" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c7ac23a4-e978-11ea-8c5e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search4ddb2428.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search4ddb2428.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4ddb2428.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B9CABD7D986\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '533' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:52:33 GMT + elapsed-time: '56' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: c7e38e6e-e978-11ea-ad12-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search4ddb2428.search.windows.net/skillsets?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset_inplace.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset_inplace.yaml new file mode 100644 index 0000000000000..6cd9a5ff52a37 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_or_update_skillset_inplace.yaml @@ -0,0 +1,142 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search9d362229.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9d362229.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CBD4C3BB9\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '609' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:03 GMT + elapsed-time: '64' + etag: W/"0x8D84B9CBD4C3BB9" + expires: '-1' + location: https://search9d362229.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d92bf870-e978-11ea-9e61-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search9d362229.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search9d362229.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9d362229.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CBD5FEE63\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '477' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:03 GMT + elapsed-time: '71' + etag: W/"0x8D84B9CBD5FEE63" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d956f427-e978-11ea-9034-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search9d362229.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search9d362229.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9d362229.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B9CBD5FEE63\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '534' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:03 GMT + elapsed-time: '38' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d96c114a-e978-11ea-8ac9-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search9d362229.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search9d362229.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9d362229.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CBD5FEE63\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '531' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:03 GMT + elapsed-time: '25' + etag: W/"0x8D84B9CBD5FEE63" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: d97ce791-e978-11ea-8c4e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search9d362229.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_skillset.yaml new file mode 100644 index 0000000000000..f3a66e3adb5cf --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_skillset.yaml @@ -0,0 +1,68 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search75151acc.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search75151acc.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CC9D292CE\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '608' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:24 GMT + elapsed-time: '88' + etag: W/"0x8D84B9CC9D292CE" + expires: '-1' + location: https://search75151acc.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e4fc22a4-e978-11ea-aea0-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search75151acc.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search75151acc.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search75151acc.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B9CC9D292CE\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '532' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:24 GMT + elapsed-time: '43' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e5e0f889-e978-11ea-901b-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search75151acc.search.windows.net/skillsets?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_delete_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_delete_skillset.yaml new file mode 100644 index 0000000000000..0ea1445801e3e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_delete_skillset.yaml @@ -0,0 +1,122 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search74f91acb.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search74f91acb.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CD6C3A61E\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '608' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:46 GMT + elapsed-time: '66' + etag: W/"0x8D84B9CD6C3A61E" + expires: '-1' + location: https://search74f91acb.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f29ef411-e978-11ea-8e52-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search74f91acb.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search74f91acb.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search74f91acb.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B9CD6C3A61E\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '532' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:46 GMT + elapsed-time: '39' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f2d02958-e978-11ea-8612-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search74f91acb.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search74f91acb.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Fri, 28 Aug 2020 21:53:46 GMT + elapsed-time: '36' + expires: '-1' + pragma: no-cache + request-id: f2ded013-e978-11ea-8278-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: https://search74f91acb.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search74f91acb.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search74f91acb.search.windows.net/$metadata#skillsets","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '201' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:53:51 GMT + elapsed-time: '24' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f5e838f7-e978-11ea-a91c-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search74f91acb.search.windows.net/skillsets?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_delete_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_delete_skillset_if_unchanged.yaml new file mode 100644 index 0000000000000..a095d41dfd8f2 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_delete_skillset_if_unchanged.yaml @@ -0,0 +1,111 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchf5e02005.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf5e02005.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CE7344B6C\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '608' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:54:13 GMT + elapsed-time: '90' + etag: W/"0x8D84B9CE7344B6C" + expires: '-1' + location: https://searchf5e02005.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 030cbe30-e979-11ea-917b-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchf5e02005.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: '{"name": "test-ss", "description": "updated", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '255' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchf5e02005.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf5e02005.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CE7458C9A\"","name":"test-ss","description":"updated","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '478' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:54:13 GMT + elapsed-time: '51' + etag: W/"0x8D84B9CE7458C9A" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0342662c-e979-11ea-a001-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchf5e02005.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + If-Match: + - '"0x8D84B9CE7344B6C"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchf5e02005.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:54:13 GMT + elapsed-time: '23' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0352e188-e979-11ea-9e52-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://searchf5e02005.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_get_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_get_skillset.yaml new file mode 100644 index 0000000000000..8ece25f16a49a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_get_skillset.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search267a1998.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search267a1998.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CF52B3BC7\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '608' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:54:37 GMT + elapsed-time: '67' + etag: W/"0x8D84B9CF52B3BC7" + expires: '-1' + location: https://search267a1998.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 10eb325f-e979-11ea-bb74-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search267a1998.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search267a1998.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search267a1998.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B9CF52B3BC7\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '532' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:54:37 GMT + elapsed-time: '38' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1136168e-e979-11ea-9bd2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search267a1998.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search267a1998.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search267a1998.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9CF52B3BC7\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '530' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:54:37 GMT + elapsed-time: '35' + etag: W/"0x8D84B9CF52B3BC7" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 116fcacf-e979-11ea-b422-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search267a1998.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_get_skillsets.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_get_skillsets.yaml new file mode 100644 index 0000000000000..3f511b650bf28 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_get_skillsets.yaml @@ -0,0 +1,106 @@ +interactions: +- request: + body: '{"name": "test-ss-1", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '255' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search40851a0b.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search40851a0b.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9D03B1F2E9\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '611' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:55:01 GMT + elapsed-time: '237' + etag: W/"0x8D84B9D03B1F2E9" + expires: '-1' + location: https://search40851a0b.search.windows.net/skillsets('test-ss-1')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1f044a90-e979-11ea-a0e2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search40851a0b.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: '{"name": "test-ss-2", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '255' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search40851a0b.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search40851a0b.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B9D03CDE639\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '611' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:55:01 GMT + elapsed-time: '74' + etag: W/"0x8D84B9D03CDE639" + expires: '-1' + location: https://search40851a0b.search.windows.net/skillsets('test-ss-2')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1fbfb2c6-e979-11ea-ada8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search40851a0b.search.windows.net/skillsets?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search40851a0b.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search40851a0b.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B9D03B1F2E9\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null},{"@odata.etag":"\"0x8D84B9D03CDE639\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '563' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:55:01 GMT + elapsed-time: '81' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 1fd89128-e979-11ea-b4c2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search40851a0b.search.windows.net/skillsets?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_or_update_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_or_update_synonym_map.yaml new file mode 100644 index 0000000000000..28c273e584326 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_or_update_synonym_map.yaml @@ -0,0 +1,171 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D1F3CECDF\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '272' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:55:47 GMT + elapsed-time: '90' + etag: W/"0x8D84B9D1F3CECDF" + expires: '-1' + location: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3a20b4b6-e979-11ea-b15b-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B9D1F3CECDF\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '336' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:55:47 GMT + elapsed-time: '24' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3b474d3e-e979-11ea-a541-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. + => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '81' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D1FADF2DD\"","name":"test-syn-map","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '302' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:55:47 GMT + elapsed-time: '41' + etag: W/"0x8D84B9D1FADF2DD" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3b5345e6-e979-11ea-91dc-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B9D1FADF2DD\"","name":"test-syn-map","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '307' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:55:49 GMT + elapsed-time: '10' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3bb9ecd3-e979-11ea-9959-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search5e99218c.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search5e99218c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D1FADF2DD\"","name":"test-syn-map","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '302' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:55:49 GMT + elapsed-time: '8' + etag: W/"0x8D84B9D1FADF2DD" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 3c0b3812-e979-11ea-9ca8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search5e99218c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_or_update_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_or_update_synonym_map_if_unchanged.yaml new file mode 100644 index 0000000000000..29419f5e6bc05 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_or_update_synonym_map_if_unchanged.yaml @@ -0,0 +1,138 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '102' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search2ac1cd3.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search2ac1cd3.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EBFE52E29170\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '246' + content-type: application/json; odata.metadata=minimal + date: Wed, 29 Apr 2020 05:29:43 GMT + elapsed-time: '22' + etag: W/"0x8D7EBFE52E29170" + expires: '-1' + location: https://search2ac1cd3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6e62904c-89da-11ea-8ed2-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search2ac1cd3.search.windows.net + - /synonymmaps + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. + => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '81' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://search2ac1cd3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search2ac1cd3.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EBFE52ED8FE6\"","name":"test-syn-map","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '301' + content-type: application/json; odata.metadata=minimal + date: Wed, 29 Apr 2020 05:29:43 GMT + elapsed-time: '17' + etag: W/"0x8D7EBFE52ED8FE6" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6e9516d8-89da-11ea-af0b-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search2ac1cd3.search.windows.net + - /synonymmaps('test-syn-map') + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "[''USA, United + States, United States of America'']", "@odata.etag": "\"0x8D7EBFE52E29170\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '146' + Content-Type: + - application/json + If-Match: + - '"0x8D7EBFE52E29170"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://search2ac1cd3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Wed, 29 Apr 2020 05:29:43 GMT + elapsed-time: '8' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6ea00d7e-89da-11ea-8cd0-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search2ac1cd3.search.windows.net + - /synonymmaps('test-syn-map') + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_synonym_map.yaml new file mode 100644 index 0000000000000..b70c099b5bc29 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_create_synonym_map.yaml @@ -0,0 +1,69 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search23141d6a.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search23141d6a.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D2F9C6945\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '272' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:56:15 GMT + elapsed-time: '61' + etag: W/"0x8D84B9D2F9C6945" + expires: '-1' + location: https://search23141d6a.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 4b0ad83e-e979-11ea-8cee-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search23141d6a.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search23141d6a.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search23141d6a.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B9D2F9C6945\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '336' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:56:15 GMT + elapsed-time: '9' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 4ba6621d-e979-11ea-b833-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search23141d6a.search.windows.net/synonymmaps?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_delete_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_delete_synonym_map.yaml new file mode 100644 index 0000000000000..e074c662c6dbe --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_delete_synonym_map.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search22f51d69.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search22f51d69.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D47F83EB1\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '272' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:56:56 GMT + elapsed-time: '58' + etag: W/"0x8D84B9D47F83EB1" + expires: '-1' + location: https://search22f51d69.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 639ac4c7-e979-11ea-b07f-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://search22f51d69.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search22f51d69.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search22f51d69.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B9D47F83EB1\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '336' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:56:56 GMT + elapsed-time: '15' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6402224a-e979-11ea-a12e-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search22f51d69.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search22f51d69.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Fri, 28 Aug 2020 21:56:56 GMT + elapsed-time: '15' + expires: '-1' + pragma: no-cache + request-id: 640f1aa0-e979-11ea-bb9b-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: https://search22f51d69.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search22f51d69.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search22f51d69.search.windows.net/$metadata#synonymmaps","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '204' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:56:57 GMT + elapsed-time: '14' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 641b5f8b-e979-11ea-92f8-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://search22f51d69.search.windows.net/synonymmaps?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_delete_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_delete_synonym_map_if_unchanged.yaml new file mode 100644 index 0000000000000..ec0d291445c04 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_delete_synonym_map_if_unchanged.yaml @@ -0,0 +1,110 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchc5e222a3.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchc5e222a3.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D54161FEE\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '272' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:16 GMT + elapsed-time: '35' + etag: W/"0x8D84B9D54161FEE" + expires: '-1' + location: https://searchc5e222a3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6f8ef892-e979-11ea-ab0a-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchc5e222a3.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '125' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchc5e222a3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchc5e222a3.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D542257EE\"","name":"test-syn-map","format":"solr","synonyms":"W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '334' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:16 GMT + elapsed-time: '17' + etag: W/"0x8D84B9D542257EE" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 701fb71c-e979-11ea-b243-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchc5e222a3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + If-Match: + - '"0x8D84B9D54161FEE"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchc5e222a3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:16 GMT + elapsed-time: '10' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 702c007b-e979-11ea-a32f-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: https://searchc5e222a3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_get_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_get_synonym_map.yaml new file mode 100644 index 0000000000000..8cda22806c50c --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_get_synonym_map.yaml @@ -0,0 +1,101 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchcce11c36.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchcce11c36.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D5F4E98FD\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '272' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:35 GMT + elapsed-time: '18' + etag: W/"0x8D84B9D5F4E98FD" + expires: '-1' + location: https://searchcce11c36.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 7b2b393c-e979-11ea-8f55-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchcce11c36.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcce11c36.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchcce11c36.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B9D5F4E98FD\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '336' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:35 GMT + elapsed-time: '9' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 7b5833f6-e979-11ea-8d4b-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchcce11c36.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcce11c36.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchcce11c36.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D5F4E98FD\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '331' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:35 GMT + elapsed-time: '5' + etag: W/"0x8D84B9D5F4E98FD" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 7b6115e2-e979-11ea-a1a2-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchcce11c36.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_get_synonym_maps.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_get_synonym_maps.yaml new file mode 100644 index 0000000000000..9dc99a2b6e95c --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_synonym_map_live_async.test_get_synonym_maps.yaml @@ -0,0 +1,106 @@ +interactions: +- request: + body: '{"name": "test-syn-map-1", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '129' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searche98a1ca9.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche98a1ca9.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D6AA96FCD\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '274' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:54 GMT + elapsed-time: '36' + etag: W/"0x8D84B9D6AA96FCD" + expires: '-1' + location: https://searche98a1ca9.search.windows.net/synonymmaps('test-syn-map-1')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 86473409-e979-11ea-b882-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searche98a1ca9.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: '{"name": "test-syn-map-2", "format": "solr", "synonyms": "Washington, Wash. + => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '83' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searche98a1ca9.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche98a1ca9.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B9D6AF99F49\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '228' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:54 GMT + elapsed-time: '20' + etag: W/"0x8D84B9D6AF99F49" + expires: '-1' + location: https://searche98a1ca9.search.windows.net/synonymmaps('test-syn-map-2')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 86b309fe-e979-11ea-8866-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searche98a1ca9.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche98a1ca9.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche98a1ca9.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B9D6AA96FCD\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null},{"@odata.etag":"\"0x8D84B9D6AF99F49\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '359' + content-type: application/json; odata.metadata=minimal + date: Fri, 28 Aug 2020 21:57:55 GMT + elapsed-time: '13' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 87037ce7-e979-11ea-ad9f-5cf37071153c + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searche98a1ca9.search.windows.net/synonymmaps?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_indexer.yaml new file mode 100644 index 0000000000000..939aa39847ddd --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_indexer.yaml @@ -0,0 +1,128 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha7b8175d.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha7b8175d.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED523B5C3F45\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:02:53 GMT + elapsed-time: '59' + etag: W/"0x8D7ED523B5C3F45" + expires: '-1' + location: https://searcha7b8175d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 57367230-8b2e-11ea-b9d4-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha7b8175d.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha7b8175d.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha7b8175d.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED523C16624C\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:02:54 GMT + elapsed-time: '1067' + etag: W/"0x8D7ED523C16624C" + expires: '-1' + location: https://searcha7b8175d.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 576467a8-8b2e-11ea-9b19-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha7b8175d.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha7b8175d.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha7b8175d.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED523C6B487D\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:02:55 GMT + elapsed-time: '477' + etag: W/"0x8D7ED523C6B487D" + expires: '-1' + location: https://searcha7b8175d.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 5823b39c-8b2e-11ea-8172-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha7b8175d.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_or_update_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_or_update_indexer.yaml new file mode 100644 index 0000000000000..5ba9f3d355101 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_or_update_indexer.yaml @@ -0,0 +1,285 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha8211b7f.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8211b7f.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5245E6B25F\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:11 GMT + elapsed-time: '66' + etag: W/"0x8D7ED5245E6B25F" + expires: '-1' + location: https://searcha8211b7f.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 61c200fe-8b2e-11ea-b14a-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha8211b7f.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha8211b7f.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8211b7f.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5246809D54\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:12 GMT + elapsed-time: '937' + etag: W/"0x8D7ED5246809D54" + expires: '-1' + location: https://searcha8211b7f.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 61ebb4be-8b2e-11ea-b304-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha8211b7f.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha8211b7f.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8211b7f.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5246E0D021\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:12 GMT + elapsed-time: '497' + etag: W/"0x8D7ED5246E0D021" + expires: '-1' + location: https://searcha8211b7f.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6293ddd0-8b2e-11ea-8958-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha8211b7f.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searcha8211b7f.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8211b7f.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5246E0D021\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '367' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:12 GMT + elapsed-time: '10' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 62f77dda-8b2e-11ea-b48f-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha8211b7f.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": + "sample-datasource", "targetIndexName": "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '139' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://searcha8211b7f.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8211b7f.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED524712E5C1\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '366' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:12 GMT + elapsed-time: '117' + etag: W/"0x8D7ED524712E5C1" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 62ff1a62-8b2e-11ea-a0eb-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha8211b7f.search.windows.net + - /indexers('sample-indexer') + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searcha8211b7f.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8211b7f.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED524712E5C1\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:12 GMT + elapsed-time: '9' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 63180ee8-8b2e-11ea-89e7-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha8211b7f.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searcha8211b7f.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha8211b7f.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED524712E5C1\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '366' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:12 GMT + elapsed-time: '8' + etag: W/"0x8D7ED524712E5C1" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 631f84ac-8b2e-11ea-b6f2-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha8211b7f.search.windows.net + - /indexers('sample-indexer') + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_or_update_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_or_update_indexer_if_unchanged.yaml new file mode 100644 index 0000000000000..e2c07f3845e4b --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_create_or_update_indexer_if_unchanged.yaml @@ -0,0 +1,221 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search323b20b9.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search323b20b9.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE17D9DD041D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:30 GMT + elapsed-time: '32' + etag: W/"0x8D7EE17D9DD041D" + expires: '-1' + location: https://search323b20b9.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f6432b12-8bf3-11ea-bd5a-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search323b20b9.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search323b20b9.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search323b20b9.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EE17DA8617D8\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:31 GMT + elapsed-time: '968' + etag: W/"0x8D7EE17DA8617D8" + expires: '-1' + location: https://search323b20b9.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f672a610-8bf3-11ea-8c8c-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search323b20b9.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search323b20b9.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search323b20b9.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17DAB71EF3\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:31 GMT + elapsed-time: '170' + etag: W/"0x8D7EE17DAB71EF3" + expires: '-1' + location: https://search323b20b9.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f71ffb94-8bf3-11ea-a6a4-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search323b20b9.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": + "sample-datasource", "targetIndexName": "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '139' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://search323b20b9.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search323b20b9.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17DAD7A74B\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '366' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:31 GMT + elapsed-time: '109' + etag: W/"0x8D7EE17DAD7A74B" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f7558040-8bf3-11ea-9716-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search323b20b9.search.windows.net + - /indexers('sample-indexer') + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": + "sample-datasource", "targetIndexName": "hotels", "disabled": false, "@odata.etag": + "\"0x8D7EE17DAB71EF3\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '179' + Content-Type: + - application/json + If-Match: + - '"0x8D7EE17DAB71EF3"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://search323b20b9.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:31 GMT + elapsed-time: '8' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: f76d64b6-8bf3-11ea-a29c-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search323b20b9.search.windows.net + - /indexers('sample-indexer') + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_delete_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_delete_indexer.yaml new file mode 100644 index 0000000000000..045eb408ea8d4 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_delete_indexer.yaml @@ -0,0 +1,233 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha79d175c.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha79d175c.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5250DC08AE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:28 GMT + elapsed-time: '25' + etag: W/"0x8D7ED5250DC08AE" + expires: '-1' + location: https://searcha79d175c.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6cc4b0ac-8b2e-11ea-8ee6-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha79d175c.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha79d175c.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha79d175c.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5251897F3E\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:30 GMT + elapsed-time: '1009' + etag: W/"0x8D7ED5251897F3E" + expires: '-1' + location: https://searcha79d175c.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6ce0d926-8b2e-11ea-b21a-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha79d175c.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha79d175c.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha79d175c.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5251C6452B\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:31 GMT + elapsed-time: '191' + etag: W/"0x8D7ED5251C6452B" + expires: '-1' + location: https://searcha79d175c.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6d94440c-8b2e-11ea-811b-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha79d175c.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searcha79d175c.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha79d175c.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5251C6452B\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '367' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:31 GMT + elapsed-time: '12' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6dd3e1dc-8b2e-11ea-bace-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha79d175c.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: DELETE + uri: https://searcha79d175c.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Thu, 30 Apr 2020 22:03:31 GMT + elapsed-time: '35' + expires: '-1' + pragma: no-cache + request-id: 6ddc19d0-8b2e-11ea-b6de-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha79d175c.search.windows.net + - /indexers('sample-indexer') + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searcha79d175c.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha79d175c.search.windows.net/$metadata#indexers","value":[]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '200' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:31 GMT + elapsed-time: '5' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 6de86d64-8b2e-11ea-9060-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha79d175c.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_delete_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_delete_indexer_if_unchanged.yaml new file mode 100644 index 0000000000000..7ea87bfdff0e5 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_delete_indexer_if_unchanged.yaml @@ -0,0 +1,213 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchfbe11c96.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfbe11c96.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE17E46EB769\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:47 GMT + elapsed-time: '29' + etag: W/"0x8D7EE17E46EB769" + expires: '-1' + location: https://searchfbe11c96.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 00db4fa6-8bf4-11ea-a835-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searchfbe11c96.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchfbe11c96.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfbe11c96.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EE17E50DDDD6\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:49 GMT + elapsed-time: '894' + etag: W/"0x8D7EE17E50DDDD6" + expires: '-1' + location: https://searchfbe11c96.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 0104db46-8bf4-11ea-9602-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searchfbe11c96.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchfbe11c96.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfbe11c96.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17E53FF6AF\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:49 GMT + elapsed-time: '178' + etag: W/"0x8D7EE17E53FF6AF" + expires: '-1' + location: https://searchfbe11c96.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 01a84c86-8bf4-11ea-a290-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searchfbe11c96.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": + "sample-datasource", "targetIndexName": "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '139' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://searchfbe11c96.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfbe11c96.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17E55EA9CF\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '367' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:49 GMT + elapsed-time: '102' + etag: W/"0x8D7EE17E55EA9CF" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 01dd8fe8-8bf4-11ea-aa3a-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searchfbe11c96.search.windows.net + - /indexers('sample-indexer') + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + If-Match: + - '"0x8D7EE17E53FF6AF"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: DELETE + uri: https://searchfbe11c96.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: no-cache + content-language: en + content-length: '160' + content-type: application/json; odata.metadata=minimal + date: Fri, 01 May 2020 21:37:49 GMT + elapsed-time: '4' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 01f415cc-8bf4-11ea-a820-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searchfbe11c96.search.windows.net + - /indexers('sample-indexer') + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_indexer.yaml new file mode 100644 index 0000000000000..e596c8fe6d808 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_indexer.yaml @@ -0,0 +1,166 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search632a1629.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search632a1629.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED525B68C640\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:47 GMT + elapsed-time: '33' + etag: W/"0x8D7ED525B68C640" + expires: '-1' + location: https://search632a1629.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 774d90ca-8b2e-11ea-a1d3-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search632a1629.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search632a1629.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search632a1629.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED525C1CCDAF\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:48 GMT + elapsed-time: '1058' + etag: W/"0x8D7ED525C1CCDAF" + expires: '-1' + location: https://search632a1629.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 776e4a3e-8b2e-11ea-ad83-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search632a1629.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search632a1629.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search632a1629.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED525C4AC3DD\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:48 GMT + elapsed-time: '158' + etag: W/"0x8D7ED525C4AC3DD" + expires: '-1' + location: https://search632a1629.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 7827fb64-8b2e-11ea-8ebb-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search632a1629.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search632a1629.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search632a1629.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED525C4AC3DD\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '363' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:03:48 GMT + elapsed-time: '4' + etag: W/"0x8D7ED525C4AC3DD" + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 7856b578-8b2e-11ea-ba8e-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search632a1629.search.windows.net + - /indexers('sample-indexer') + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_indexer_status.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_indexer_status.yaml new file mode 100644 index 0000000000000..d4f660f699796 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_indexer_status.yaml @@ -0,0 +1,165 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha24192c.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha24192c.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5265E79E5F\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:04 GMT + elapsed-time: '80' + etag: W/"0x8D7ED5265E79E5F" + expires: '-1' + location: https://searcha24192c.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 81c2547e-8b2e-11ea-afa8-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha24192c.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha24192c.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha24192c.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5266AB38FF\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:06 GMT + elapsed-time: '1144' + etag: W/"0x8D7ED5266AB38FF" + expires: '-1' + location: https://searcha24192c.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 81f10de4-8b2e-11ea-adc2-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha24192c.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searcha24192c.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha24192c.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5266E0F8C5\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:06 GMT + elapsed-time: '221' + etag: W/"0x8D7ED5266E0F8C5" + expires: '-1' + location: https://searcha24192c.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 82b88f30-8b2e-11ea-bb2a-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha24192c.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searcha24192c.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha24192c.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":null,"executionHistory":[],"limits":{"maxRunTime":"PT0S","maxDocumentExtractionSize":0,"maxDocumentContentCharactersToExtract":0}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '365' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:06 GMT + elapsed-time: '17' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 82f39cec-8b2e-11ea-88bc-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - searcha24192c.search.windows.net + - /indexers('sample-indexer')/search.status + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_synonym_maps.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_synonym_maps.yaml new file mode 100644 index 0000000000000..e4572f57ab647 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_get_synonym_maps.yaml @@ -0,0 +1,106 @@ +interactions: +- request: + body: '{"name": "test-syn-map-1", "format": "solr", "synonyms": "USA, United States, + United States of America"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '104' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Darwin-19.3.0-x86_64-i386-64bit) + method: POST + uri: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchada412b6.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC959CF79C3E\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, + United States, United States of America","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '249' + content-type: application/json; odata.metadata=minimal + date: Wed, 29 Apr 2020 23:32:42 GMT + elapsed-time: '35' + etag: W/"0x8D7EC959CF79C3E" + expires: '-1' + location: https://searchada412b6.search.windows.net/synonymmaps('test-syn-map-1')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b8907658-8a71-11ea-889b-8c8590507855 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: '{"name": "test-syn-map-2", "format": "solr", "synonyms": "Washington, Wash. + => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '83' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Darwin-19.3.0-x86_64-i386-64bit) + method: POST + uri: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchada412b6.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC959CFF17A5\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: no-cache + content-length: '228' + content-type: application/json; odata.metadata=minimal + date: Wed, 29 Apr 2020 23:32:42 GMT + elapsed-time: '24' + etag: W/"0x8D7EC959CFF17A5" + expires: '-1' + location: https://searchada412b6.search.windows.net/synonymmaps('test-syn-map-2')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b8a40fc4-8a71-11ea-889b-8c8590507855 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Darwin-19.3.0-x86_64-i386-64bit) + method: GET + uri: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchada412b6.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC959CF79C3E\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, + United States, United States of America","encryptionKey":null},{"@odata.etag":"\"0x8D7EC959CFF17A5\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '356' + content-type: application/json; odata.metadata=minimal + date: Wed, 29 Apr 2020 23:32:42 GMT + elapsed-time: '13' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: b8abc174-8a71-11ea-889b-8c8590507855 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_list_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_list_indexer.yaml new file mode 100644 index 0000000000000..2bbd9e15b7a09 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_list_indexer.yaml @@ -0,0 +1,291 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search7a7716a5.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7a7716a5.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED52C4646503\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:06:43 GMT + elapsed-time: '29' + etag: W/"0x8D7ED52C4646503" + expires: '-1' + location: https://search7a7716a5.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e04c8094-8b2e-11ea-bc46-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search7a7716a5.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search7a7716a5.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7a7716a5.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED52C4C9C8F3\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:06:43 GMT + elapsed-time: '501' + etag: W/"0x8D7ED52C4C9C8F3" + expires: '-1' + location: https://search7a7716a5.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e069b818-8b2e-11ea-8821-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search7a7716a5.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: 'b''{"name": "another-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '322' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search7a7716a5.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7a7716a5.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED52C4FA097A\"","name":"another-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '371' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:06:44 GMT + elapsed-time: '32' + etag: W/"0x8D7ED52C4FA097A" + expires: '-1' + location: https://search7a7716a5.search.windows.net/datasources('another-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e0d3c8cc-8b2e-11ea-b18a-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search7a7716a5.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "another-index", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '114' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search7a7716a5.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7a7716a5.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED52C57E1E8D\"","name":"another-index","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '565' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:06:45 GMT + elapsed-time: '730' + etag: W/"0x8D7ED52C57E1E8D" + expires: '-1' + location: https://search7a7716a5.search.windows.net/indexes('another-index')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e0ff4b7a-8b2e-11ea-aaf0-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search7a7716a5.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search7a7716a5.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7a7716a5.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED52C5DC2E27\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:06:45 GMT + elapsed-time: '540' + etag: W/"0x8D7ED52C5DC2E27" + expires: '-1' + location: https://search7a7716a5.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e187cd64-8b2e-11ea-814c-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search7a7716a5.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "another-indexer", "dataSourceName": "another-datasource", "targetIndexName": + "another-index", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '122' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search7a7716a5.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7a7716a5.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED52C60A4B66\"","name":"another-indexer","description":null,"dataSourceName":"another-datasource","skillsetName":null,"targetIndexName":"another-index","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '371' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:06:46 GMT + elapsed-time: '191' + etag: W/"0x8D7ED52C60A4B66" + expires: '-1' + location: https://search7a7716a5.search.windows.net/indexers('another-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e1f77fd2-8b2e-11ea-a8c8-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search7a7716a5.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search7a7716a5.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7a7716a5.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED52C60A4B66\"","name":"another-indexer","description":null,"dataSourceName":"another-datasource","skillsetName":null,"targetIndexName":"another-index","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null},{"@odata.etag":"\"0x8D7ED52C5DC2E27\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '405' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:06:46 GMT + elapsed-time: '13' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: e21bb800-8b2e-11ea-af1d-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search7a7716a5.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_reset_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_reset_indexer.yaml new file mode 100644 index 0000000000000..f3c5737cf76d7 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_reset_indexer.yaml @@ -0,0 +1,233 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search916a170c.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search916a170c.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED527A604F84\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:39 GMT + elapsed-time: '28' + etag: W/"0x8D7ED527A604F84" + expires: '-1' + location: https://search916a170c.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 963d594a-8b2e-11ea-82c8-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search916a170c.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search916a170c.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search916a170c.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED527AF1D480\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:40 GMT + elapsed-time: '825' + etag: W/"0x8D7ED527AF1D480" + expires: '-1' + location: https://search916a170c.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 966561ba-8b2e-11ea-b432-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search916a170c.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search916a170c.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search916a170c.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED527B299070\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:40 GMT + elapsed-time: '215' + etag: W/"0x8D7ED527B299070" + expires: '-1' + location: https://search916a170c.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 96fafb58-8b2e-11ea-be95-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search916a170c.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search916a170c.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search916a170c.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED527B299070\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '368' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:40 GMT + elapsed-time: '9' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 9736c8a4-8b2e-11ea-b580-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search916a170c.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search916a170c.search.windows.net/indexers('sample-indexer')/search.reset?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + date: Thu, 30 Apr 2020 22:04:40 GMT + elapsed-time: '138' + expires: '-1' + pragma: no-cache + request-id: 973eb276-8b2e-11ea-9c69-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search916a170c.search.windows.net + - /indexers('sample-indexer')/search.reset + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search916a170c.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search916a170c.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":{"status":"reset","errorMessage":null,"startTime":"2020-04-30T22:04:40.722Z","endTime":"2020-04-30T22:04:40.722Z","itemsProcessed":0,"itemsFailed":0,"initialTrackingState":null,"finalTrackingState":null,"errors":[],"warnings":[],"metrics":null},"executionHistory":[{"status":"reset","errorMessage":null,"startTime":"2020-04-30T22:04:40.722Z","endTime":"2020-04-30T22:04:40.722Z","itemsProcessed":0,"itemsFailed":0,"initialTrackingState":null,"finalTrackingState":null,"errors":[],"warnings":[],"metrics":null}],"limits":null}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '428' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:40 GMT + elapsed-time: '37' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: 97597b24-8b2e-11ea-8ecf-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search916a170c.search.windows.net + - /indexers('sample-indexer')/search.status + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_run_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_run_indexer.yaml new file mode 100644 index 0000000000000..2d0d57b9bef3f --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_indexer_client_live_async.test_run_indexer.yaml @@ -0,0 +1,234 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search640d163e.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search640d163e.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5284CBEA3F\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: no-cache + content-length: '370' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:56 GMT + elapsed-time: '34' + etag: W/"0x8D7ED5284CBEA3F" + expires: '-1' + location: https://search640d163e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a0b44d68-8b2e-11ea-8600-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search640d163e.search.windows.net + - /datasources + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search640d163e.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search640d163e.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5285782812\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: no-cache + content-length: '558' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:57 GMT + elapsed-time: '893' + etag: W/"0x8D7ED5285782812" + expires: '-1' + location: https://search640d163e.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a0d1fa50-8b2e-11ea-b768-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search640d163e.search.windows.net + - /indexes + - api-version=2020-06-30 + - '' +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search640d163e.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search640d163e.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5285A6937E\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: no-cache + content-length: '362' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:58 GMT + elapsed-time: '168' + etag: W/"0x8D7ED5285A6937E" + expires: '-1' + location: https://search640d163e.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a181bf40-8b2e-11ea-a6b1-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search640d163e.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search640d163e.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search640d163e.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5285A6937E\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '368' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:58 GMT + elapsed-time: '8' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a1b2c330-8b2e-11ea-a4d0-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search640d163e.search.windows.net + - /indexers + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search640d163e.search.windows.net/indexers('sample-indexer')/search.run?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 30 Apr 2020 22:04:58 GMT + elapsed-time: '30' + expires: '-1' + pragma: no-cache + request-id: a1bb955e-8b2e-11ea-832b-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search640d163e.search.windows.net + - /indexers('sample-indexer')/search.run + - api-version=2020-06-30 + - '' +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search640d163e.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search640d163e.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":null,"executionHistory":[],"limits":{"maxRunTime":"PT0S","maxDocumentExtractionSize":0,"maxDocumentContentCharactersToExtract":0}}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '365' + content-type: application/json; odata.metadata=minimal + date: Thu, 30 Apr 2020 22:04:58 GMT + elapsed-time: '12' + expires: '-1' + odata-version: '4.0' + pragma: no-cache + preference-applied: odata.include-annotations="*" + request-id: a1c616b4-8b2e-11ea-8513-2816a845e8c6 + strict-transport-security: max-age=15724800; includeSubDomains + vary: Accept-Encoding + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - search640d163e.search.windows.net + - /indexers('sample-indexer')/search.status + - api-version=2020-06-30 + - '' +version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_analyze_text.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_analyze_text.yaml deleted file mode 100644 index afbd22836c9ea..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_analyze_text.yaml +++ /dev/null @@ -1,38 +0,0 @@ -interactions: -- request: - body: '{"text": "One''s ", "analyzer": "standard.lucene"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '55' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F43051603FFFF10DD5382D3E0CEA346A - method: POST - uri: https://search64f01102.search.windows.net/indexes('drgqefsg')/search.analyze?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search64f01102.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.AnalyzeResult","tokens":[{"token":"one''s","startOffset":0,"endOffset":5,"position":0},{"token":"two","startOffset":7,"endOffset":10,"position":1}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '306' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:30:17 GMT - elapsed-time: '58' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 62cb6048-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search64f01102.search.windows.net/indexes('drgqefsg')/search.analyze?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_datasource_async.yaml deleted file mode 100644 index b445497d08659..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_datasource_async.yaml +++ /dev/null @@ -1,40 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - A4A43DF80FCD8A1D7FC1AEE02327E6B9 - method: POST - uri: https://search386b1565.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search386b1565.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95A74EC6BF\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:59 GMT - elapsed-time: '32' - etag: W/"0x8D7EC95A74EC6BF" - expires: '-1' - location: https://search386b1565.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: c2e8e3ec-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search386b1565.search.windows.net/datasources?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_index.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_index.yaml deleted file mode 100644 index 0f27e9d5078ac..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_index.yaml +++ /dev/null @@ -1,41 +0,0 @@ -interactions: -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [{"name": "MyProfile"}], "corsOptions": {"allowedOrigins": - ["*"], "maxAgeInSeconds": 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '260' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 2FAED7B0C4D2327B672209097091112D - method: POST - uri: https://search640f10d5.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search640f10d5.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EC954E6DE3AF\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '890' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:30:30 GMT - elapsed-time: '539' - etag: W/"0x8D7EC954E6DE3AF" - expires: '-1' - location: https://search640f10d5.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 69c62a04-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search640f10d5.search.windows.net/indexes?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_indexer.yaml deleted file mode 100644 index 0ee3da8463663..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_indexer.yaml +++ /dev/null @@ -1,134 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 744FFCF0491F0B26839B316B16315B14 - method: POST - uri: https://search86f511ac.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86f511ac.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED523B5C3F45\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:02:53 GMT - elapsed-time: '59' - etag: W/"0x8D7ED523B5C3F45" - expires: '-1' - location: https://search86f511ac.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 57367230-8b2e-11ea-b9d4-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86f511ac.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 744FFCF0491F0B26839B316B16315B14 - method: POST - uri: https://search86f511ac.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86f511ac.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED523C16624C\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:02:54 GMT - elapsed-time: '1067' - etag: W/"0x8D7ED523C16624C" - expires: '-1' - location: https://search86f511ac.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 576467a8-8b2e-11ea-9b19-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86f511ac.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 744FFCF0491F0B26839B316B16315B14 - method: POST - uri: https://search86f511ac.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86f511ac.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED523C6B487D\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:02:55 GMT - elapsed-time: '477' - etag: W/"0x8D7ED523C6B487D" - expires: '-1' - location: https://search86f511ac.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 5823b39c-8b2e-11ea-8172-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86f511ac.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_datasource_async.yaml deleted file mode 100644 index 47d61b2aeb377..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_datasource_async.yaml +++ /dev/null @@ -1,178 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F19957B5A218B7469E9FA58A5466BFB5 - method: POST - uri: https://search251c1987.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search251c1987.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95AE9030E5\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:11 GMT - elapsed-time: '63' - etag: W/"0x8D7EC95AE9030E5" - expires: '-1' - location: https://search251c1987.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: ca249688-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search251c1987.search.windows.net/datasources?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F19957B5A218B7469E9FA58A5466BFB5 - method: GET - uri: https://search251c1987.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search251c1987.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D7EC95AE9030E5\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '365' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:11 GMT - elapsed-time: '10' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: ca3d3058-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search251c1987.search.windows.net/datasources?api-version=2020-06-30 -- request: - body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '345' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F19957B5A218B7469E9FA58A5466BFB5 - method: PUT - uri: https://search251c1987.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search251c1987.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95AE9F4EDD\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '365' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:11 GMT - elapsed-time: '36' - etag: W/"0x8D7EC95AE9F4EDD" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: ca42a4ac-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search251c1987.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F19957B5A218B7469E9FA58A5466BFB5 - method: GET - uri: https://search251c1987.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search251c1987.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D7EC95AE9F4EDD\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '371' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:11 GMT - elapsed-time: '41' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: ca4c4804-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search251c1987.search.windows.net/datasources?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F19957B5A218B7469E9FA58A5466BFB5 - method: GET - uri: https://search251c1987.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search251c1987.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95AE9F4EDD\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '365' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:11 GMT - elapsed-time: '7' - etag: W/"0x8D7EC95AE9F4EDD" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: ca566f96-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search251c1987.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_datasource_if_unchanged.yaml deleted file mode 100644 index 956b6c5c0649c..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_datasource_if_unchanged.yaml +++ /dev/null @@ -1,145 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EB07460BE71D34ECEB27F2F290910C52 - method: POST - uri: https://searche2561c44.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searche2561c44.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED71E13EFC4E\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:26 GMT - elapsed-time: '69' - etag: W/"0x8D7ED71E13EFC4E" - expires: '-1' - location: https://searche2561c44.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: fd279352-8b4d-11ea-900d-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searche2561c44.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '345' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EB07460BE71D34ECEB27F2F290910C52 - method: PUT - uri: https://searche2561c44.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searche2561c44.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED71E1512811\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '365' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:26 GMT - elapsed-time: '66' - etag: W/"0x8D7ED71E1512811" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: fd59a3da-8b4d-11ea-8749-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searche2561c44.search.windows.net - - /datasources('sample-datasource') - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-datasource", "description": "changed", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}, "@odata.etag": "\"0x8D7ED71E13EFC4E\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '385' - Content-Type: - - application/json - If-Match: - - '"0x8D7ED71E13EFC4E"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EB07460BE71D34ECEB27F2F290910C52 - method: PUT - uri: https://searche2561c44.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:26 GMT - elapsed-time: '5' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: fd6bc01c-8b4d-11ea-a9e1-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searche2561c44.search.windows.net - - /datasources('sample-datasource') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_index.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_index.yaml deleted file mode 100644 index 8a9902a9e7460..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_index.yaml +++ /dev/null @@ -1,85 +0,0 @@ -interactions: -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [], "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": - 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '239' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6CF9D38E0C02AE7CBFF09C124F5A46F5 - method: PUT - uri: https://search234a14f7.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search234a14f7.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EC95562E8036\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '816' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:30:43 GMT - elapsed-time: '988' - etag: W/"0x8D7EC95562E8036" - expires: '-1' - location: https://search234a14f7.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 71388dae-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search234a14f7.search.windows.net/indexes('hotels')?api-version=2020-06-30 -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [{"name": "MyProfile"}], "corsOptions": {"allowedOrigins": - ["*"], "maxAgeInSeconds": 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '260' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6CF9D38E0C02AE7CBFF09C124F5A46F5 - method: PUT - uri: https://search234a14f7.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search234a14f7.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EC9556534D05\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '536' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:30:43 GMT - elapsed-time: '129' - etag: W/"0x8D7EC9556534D05" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 71f053d0-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search234a14f7.search.windows.net/indexes('hotels')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexer.yaml deleted file mode 100644 index 4c492bd9a918b..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexer.yaml +++ /dev/null @@ -1,299 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 33CE7005C1C6B7AD1940F1F955206F0C - method: POST - uri: https://search4e7415ce.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4e7415ce.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5245E6B25F\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:11 GMT - elapsed-time: '66' - etag: W/"0x8D7ED5245E6B25F" - expires: '-1' - location: https://search4e7415ce.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 61c200fe-8b2e-11ea-b14a-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search4e7415ce.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 33CE7005C1C6B7AD1940F1F955206F0C - method: POST - uri: https://search4e7415ce.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4e7415ce.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5246809D54\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:12 GMT - elapsed-time: '937' - etag: W/"0x8D7ED5246809D54" - expires: '-1' - location: https://search4e7415ce.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 61ebb4be-8b2e-11ea-b304-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search4e7415ce.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 33CE7005C1C6B7AD1940F1F955206F0C - method: POST - uri: https://search4e7415ce.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4e7415ce.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5246E0D021\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:12 GMT - elapsed-time: '497' - etag: W/"0x8D7ED5246E0D021" - expires: '-1' - location: https://search4e7415ce.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6293ddd0-8b2e-11ea-8958-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search4e7415ce.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 33CE7005C1C6B7AD1940F1F955206F0C - method: GET - uri: https://search4e7415ce.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4e7415ce.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5246E0D021\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '367' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:12 GMT - elapsed-time: '10' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 62f77dda-8b2e-11ea-b48f-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search4e7415ce.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": - "sample-datasource", "targetIndexName": "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '139' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 33CE7005C1C6B7AD1940F1F955206F0C - method: PUT - uri: https://search4e7415ce.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4e7415ce.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED524712E5C1\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '366' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:12 GMT - elapsed-time: '117' - etag: W/"0x8D7ED524712E5C1" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 62ff1a62-8b2e-11ea-a0eb-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search4e7415ce.search.windows.net - - /indexers('sample-indexer') - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 33CE7005C1C6B7AD1940F1F955206F0C - method: GET - uri: https://search4e7415ce.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4e7415ce.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED524712E5C1\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:12 GMT - elapsed-time: '9' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 63180ee8-8b2e-11ea-89e7-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search4e7415ce.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 33CE7005C1C6B7AD1940F1F955206F0C - method: GET - uri: https://search4e7415ce.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4e7415ce.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED524712E5C1\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '366' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:12 GMT - elapsed-time: '8' - etag: W/"0x8D7ED524712E5C1" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 631f84ac-8b2e-11ea-b6f2-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search4e7415ce.search.windows.net - - /indexers('sample-indexer') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexer_if_unchanged.yaml deleted file mode 100644 index 2bd9741995045..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexer_if_unchanged.yaml +++ /dev/null @@ -1,231 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - CC67BBE5FAC0EC61208F4429C9C01592 - method: POST - uri: https://search8e821b08.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search8e821b08.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE17D9DD041D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:30 GMT - elapsed-time: '32' - etag: W/"0x8D7EE17D9DD041D" - expires: '-1' - location: https://search8e821b08.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f6432b12-8bf3-11ea-bd5a-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search8e821b08.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - CC67BBE5FAC0EC61208F4429C9C01592 - method: POST - uri: https://search8e821b08.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search8e821b08.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EE17DA8617D8\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:31 GMT - elapsed-time: '968' - etag: W/"0x8D7EE17DA8617D8" - expires: '-1' - location: https://search8e821b08.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f672a610-8bf3-11ea-8c8c-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search8e821b08.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - CC67BBE5FAC0EC61208F4429C9C01592 - method: POST - uri: https://search8e821b08.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search8e821b08.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17DAB71EF3\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:31 GMT - elapsed-time: '170' - etag: W/"0x8D7EE17DAB71EF3" - expires: '-1' - location: https://search8e821b08.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f71ffb94-8bf3-11ea-a6a4-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search8e821b08.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": - "sample-datasource", "targetIndexName": "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '139' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - CC67BBE5FAC0EC61208F4429C9C01592 - method: PUT - uri: https://search8e821b08.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search8e821b08.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17DAD7A74B\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '366' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:31 GMT - elapsed-time: '109' - etag: W/"0x8D7EE17DAD7A74B" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f7558040-8bf3-11ea-9716-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search8e821b08.search.windows.net - - /indexers('sample-indexer') - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": - "sample-datasource", "targetIndexName": "hotels", "disabled": false, "@odata.etag": - "\"0x8D7EE17DAB71EF3\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '179' - Content-Type: - - application/json - If-Match: - - '"0x8D7EE17DAB71EF3"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - CC67BBE5FAC0EC61208F4429C9C01592 - method: PUT - uri: https://search8e821b08.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:31 GMT - elapsed-time: '8' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f76d64b6-8bf3-11ea-a29c-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search8e821b08.search.windows.net - - /indexers('sample-indexer') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexes_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexes_if_unchanged.yaml deleted file mode 100644 index a25c904ed403b..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_indexes_if_unchanged.yaml +++ /dev/null @@ -1,148 +0,0 @@ -interactions: -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [{"name": "MyProfile"}], "corsOptions": {"allowedOrigins": - ["*"], "maxAgeInSeconds": 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '260' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 27AABAAAD5E1BA1E8445B009D9CDC8D7 - method: POST - uri: https://search8e901b09.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search8e901b09.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED71A617AE43\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '890' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:47:47 GMT - elapsed-time: '560' - etag: W/"0x8D7ED71A617AE43" - expires: '-1' - location: https://search8e901b09.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: c1c3fbc8-8b4d-11ea-87ee-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search8e901b09.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [], "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": - 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '239' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 27AABAAAD5E1BA1E8445B009D9CDC8D7 - method: PUT - uri: https://search8e901b09.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search8e901b09.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED71A636ADAA\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '506' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:47:47 GMT - elapsed-time: '129' - etag: W/"0x8D7ED71A636ADAA" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: c23832f0-8b4d-11ea-be09-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search8e901b09.search.windows.net - - /indexes('hotels') - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [], "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": - 60}, "@odata.etag": "\"0x8D7ED71A617AE43\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '279' - Content-Type: - - application/json - If-Match: - - '"0x8D7ED71A617AE43"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 27AABAAAD5E1BA1E8445B009D9CDC8D7 - method: PUT - uri: https://search8e901b09.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:47:47 GMT - elapsed-time: '25' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: c2543448-8b4d-11ea-b516-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search8e901b09.search.windows.net - - /indexes('hotels') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset.yaml deleted file mode 100644 index b49475307b76d..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset.yaml +++ /dev/null @@ -1,243 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '253' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B1B1D09F8F6DD926768829455A6A5FD5 - method: PUT - uri: https://search6512164a.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search6512164a.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E24A4BEF9EC0\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '588' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:22 GMT - elapsed-time: '59' - etag: W/"0x8D7E24A4BEF9EC0" - expires: '-1' - location: - - h - - t - - t - - p - - s - - ':' - - / - - / - - s - - e - - a - - r - - c - - h - - '6' - - '5' - - '1' - - '2' - - '1' - - '6' - - '4' - - a - - . - - s - - e - - a - - r - - c - - h - - . - - w - - i - - n - - d - - o - - w - - s - - . - - n - - e - - t - - / - - s - - k - - i - - l - - l - - s - - e - - t - - s - - ( - - '''' - - t - - e - - s - - t - - '-' - - s - - s - - '''' - - ) - - '?' - - a - - p - - i - - '-' - - v - - e - - r - - s - - i - - o - - n - - '=' - - '2' - - '0' - - '1' - - '9' - - '-' - - '0' - - '5' - - '-' - - '0' - - '6' - - '-' - - P - - r - - e - - v - - i - - e - - w - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 66d397be-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search6512164a.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 -- request: - body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '253' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B1B1D09F8F6DD926768829455A6A5FD5 - method: PUT - uri: https://search6512164a.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search6512164a.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E24A4BFDD235\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '465' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:22 GMT - elapsed-time: '67' - etag: W/"0x8D7E24A4BFDD235" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 66ed4ea2-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search6512164a.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B1B1D09F8F6DD926768829455A6A5FD5 - method: GET - uri: https://search6512164a.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search6512164a.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7E24A4BFDD235\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '522' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:22 GMT - elapsed-time: '48' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 66fc4a06-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search6512164a.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B1B1D09F8F6DD926768829455A6A5FD5 - method: GET - uri: https://search6512164a.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search6512164a.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E24A4BFDD235\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '519' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:22 GMT - elapsed-time: '17' - etag: W/"0x8D7E24A4BFDD235" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6707d362-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search6512164a.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset_if_unchanged.yaml deleted file mode 100644 index 6f499a6d98d14..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset_if_unchanged.yaml +++ /dev/null @@ -1,189 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '253' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 44D0AAF55BE852CA16BF1BD860CFB5D1 - method: PUT - uri: https://searchab6c1b84.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchab6c1b84.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7ED71C3B43149\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '588' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:35 GMT - elapsed-time: '63' - etag: W/"0x8D7ED71C3B43149" - expires: '-1' - location: https://searchab6c1b84.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: dfa970b6-8b4d-11ea-aba9-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchab6c1b84.search.windows.net - - /skillsets('test-ss') - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}], "@odata.etag": "\"0x8D7ED71C3B43149\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '293' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 44D0AAF55BE852CA16BF1BD860CFB5D1 - method: PUT - uri: https://searchab6c1b84.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchab6c1b84.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7ED71C3C23D9E\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '464' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:35 GMT - elapsed-time: '39' - etag: W/"0x8D7ED71C3C23D9E" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: dfcf0940-8b4d-11ea-833a-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchab6c1b84.search.windows.net - - /skillsets('test-ss') - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 44D0AAF55BE852CA16BF1BD860CFB5D1 - method: GET - uri: https://searchab6c1b84.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchab6c1b84.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7ED71C3C23D9E\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '521' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:35 GMT - elapsed-time: '22' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: dfdc6bd2-8b4d-11ea-90dd-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchab6c1b84.search.windows.net - - /skillsets - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}], "@odata.etag": "\"0x8D7ED71C3B43149\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '293' - Content-Type: - - application/json - If-Match: - - '"0x8D7ED71C3B43149"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 44D0AAF55BE852CA16BF1BD860CFB5D1 - method: PUT - uri: https://searchab6c1b84.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:35 GMT - elapsed-time: '12' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: dfe78992-8b4d-11ea-beb5-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchab6c1b84.search.windows.net - - /skillsets('test-ss') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset_inplace.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset_inplace.yaml deleted file mode 100644 index d67e063d6ead7..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_skillset_inplace.yaml +++ /dev/null @@ -1,150 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '253' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 949AB1B55EE17FD30AB635C811264965 - method: PUT - uri: https://search260a1985.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search260a1985.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E5707C99B8B7\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '588' - content-type: application/json; odata.metadata=minimal - date: Mon, 20 Apr 2020 21:19:18 GMT - elapsed-time: '52' - etag: W/"0x8D7E5707C99B8B7" - expires: '-1' - location: https://search260a1985.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 9844e3e2-834c-11ea-9be4-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search260a1985.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 -- request: - body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}], "@odata.etag": "\"0x8D7E5707C99B8B7\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '293' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 949AB1B55EE17FD30AB635C811264965 - method: PUT - uri: https://search260a1985.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search260a1985.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E5707CA3CC9F\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '465' - content-type: application/json; odata.metadata=minimal - date: Mon, 20 Apr 2020 21:19:18 GMT - elapsed-time: '40' - etag: W/"0x8D7E5707CA3CC9F" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 985fe3c2-834c-11ea-9be4-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search260a1985.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 949AB1B55EE17FD30AB635C811264965 - method: GET - uri: https://search260a1985.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search260a1985.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7E5707CA3CC9F\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '522' - content-type: application/json; odata.metadata=minimal - date: Mon, 20 Apr 2020 21:19:18 GMT - elapsed-time: '20' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 986a42fe-834c-11ea-9be4-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search260a1985.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 949AB1B55EE17FD30AB635C811264965 - method: GET - uri: https://search260a1985.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search260a1985.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E5707CA3CC9F\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '519' - content-type: application/json; odata.metadata=minimal - date: Mon, 20 Apr 2020 21:19:18 GMT - elapsed-time: '24' - etag: W/"0x8D7E5707CA3CC9F" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 9871506c-834c-11ea-9be4-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search260a1985.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_synonym_map.yaml deleted file mode 100644 index 96ac45935eb17..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_synonym_map.yaml +++ /dev/null @@ -1,181 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '102' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1EB3C43FAD17D88EF8BB4EEA004D98D3 - method: POST - uri: https://searchab401799.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchab401799.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC9580AF6E73\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null}' - headers: - cache-control: no-cache - content-length: '247' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:54 GMT - elapsed-time: '54' - etag: W/"0x8D7EC9580AF6E73" - expires: '-1' - location: https://searchab401799.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 9c465bb6-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://searchab401799.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1EB3C43FAD17D88EF8BB4EEA004D98D3 - method: GET - uri: https://searchab401799.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchab401799.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC9580AF6E73\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '315' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:54 GMT - elapsed-time: '9' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 9c5d47c2-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchab401799.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. - => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '81' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1EB3C43FAD17D88EF8BB4EEA004D98D3 - method: PUT - uri: https://searchab401799.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchab401799.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC9580BBF3DC\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '302' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:54 GMT - elapsed-time: '20' - etag: W/"0x8D7EC9580BBF3DC" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 9c62687e-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchab401799.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1EB3C43FAD17D88EF8BB4EEA004D98D3 - method: GET - uri: https://searchab401799.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchab401799.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC9580BBF3DC\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '307' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:54 GMT - elapsed-time: '10' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 9c69b82c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchab401799.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1EB3C43FAD17D88EF8BB4EEA004D98D3 - method: GET - uri: https://searchab401799.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchab401799.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC9580BBF3DC\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '302' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:54 GMT - elapsed-time: '7' - etag: W/"0x8D7EC9580BBF3DC" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 9c6f0854-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchab401799.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_synonym_map_if_unchanged.yaml deleted file mode 100644 index d14d33baeabed..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_or_update_synonym_map_if_unchanged.yaml +++ /dev/null @@ -1,144 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '102' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 1F470418E60BD2366ACB8D27D1F361CA - method: POST - uri: https://search2ac1cd3.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search2ac1cd3.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EBFE52E29170\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null}' - headers: - cache-control: no-cache - content-length: '246' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 05:29:43 GMT - elapsed-time: '22' - etag: W/"0x8D7EBFE52E29170" - expires: '-1' - location: https://search2ac1cd3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6e62904c-89da-11ea-8ed2-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search2ac1cd3.search.windows.net - - /synonymmaps - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. - => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '81' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 1F470418E60BD2366ACB8D27D1F361CA - method: PUT - uri: https://search2ac1cd3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search2ac1cd3.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EBFE52ED8FE6\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '301' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 05:29:43 GMT - elapsed-time: '17' - etag: W/"0x8D7EBFE52ED8FE6" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6e9516d8-89da-11ea-af0b-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search2ac1cd3.search.windows.net - - /synonymmaps('test-syn-map') - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "[''USA, United - States, United States of America'']", "@odata.etag": "\"0x8D7EBFE52E29170\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '146' - Content-Type: - - application/json - If-Match: - - '"0x8D7EBFE52E29170"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 1F470418E60BD2366ACB8D27D1F361CA - method: PUT - uri: https://search2ac1cd3.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 05:29:43 GMT - elapsed-time: '8' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6ea00d7e-89da-11ea-8cd0-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search2ac1cd3.search.windows.net - - /synonymmaps('test-syn-map') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_skillset.yaml deleted file mode 100644 index 0b7308e47d4dd..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_skillset.yaml +++ /dev/null @@ -1,165 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '252' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 3A944C60AD0CFDB46ACAB43B837B1D1A - method: POST - uri: https://search99711228.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search99711228.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E24A5315AC9C\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '587' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:34 GMT - elapsed-time: '96' - etag: W/"0x8D7E24A5315AC9C" - expires: '-1' - location: - - h - - t - - t - - p - - s - - ':' - - / - - / - - s - - e - - a - - r - - c - - h - - '9' - - '9' - - '7' - - '1' - - '1' - - '2' - - '2' - - '8' - - . - - s - - e - - a - - r - - c - - h - - . - - w - - i - - n - - d - - o - - w - - s - - . - - n - - e - - t - - / - - s - - k - - i - - l - - l - - s - - e - - t - - s - - ( - - '''' - - t - - e - - s - - t - - '-' - - s - - s - - '''' - - ) - - '?' - - a - - p - - i - - '-' - - v - - e - - r - - s - - i - - o - - n - - '=' - - '2' - - '0' - - '1' - - '9' - - '-' - - '0' - - '5' - - '-' - - '0' - - '6' - - '-' - - P - - r - - e - - v - - i - - e - - w - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6decb18e-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search99711228.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 3A944C60AD0CFDB46ACAB43B837B1D1A - method: GET - uri: https://search99711228.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search99711228.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7E24A5315AC9C\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '520' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:34 GMT - elapsed-time: '26' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6e11cbcc-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search99711228.search.windows.net/skillsets?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_synonym_map.yaml deleted file mode 100644 index a49a8debe70b8..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_create_synonym_map.yaml +++ /dev/null @@ -1,73 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America\nWashington, Wash. => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 98706CBE973D216459997E8D1CD455D0 - method: POST - uri: https://searchd3391377.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd3391377.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC95876239BF\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-length: '272' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:06 GMT - elapsed-time: '59' - etag: W/"0x8D7EC95876239BF" - expires: '-1' - location: https://searchd3391377.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: a2f824a8-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://searchd3391377.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 98706CBE973D216459997E8D1CD455D0 - method: GET - uri: https://searchd3391377.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd3391377.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC95876239BF\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '337' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:06 GMT - elapsed-time: '10' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: a30fc6b2-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchd3391377.search.windows.net/synonymmaps?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_datasource_async.yaml deleted file mode 100644 index 65fc5c89e2da3..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_datasource_async.yaml +++ /dev/null @@ -1,130 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 06B8336C26C304192C7B26FC455ACC25 - method: POST - uri: https://search38471564.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search38471564.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95B60E12E6\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:24 GMT - elapsed-time: '54' - etag: W/"0x8D7EC95B60E12E6" - expires: '-1' - location: https://search38471564.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d1a45d3a-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search38471564.search.windows.net/datasources?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 06B8336C26C304192C7B26FC455ACC25 - method: GET - uri: https://search38471564.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search38471564.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D7EC95B60E12E6\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '366' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:24 GMT - elapsed-time: '11' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d1ba8768-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search38471564.search.windows.net/datasources?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 06B8336C26C304192C7B26FC455ACC25 - method: DELETE - uri: https://search38471564.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - date: Wed, 29 Apr 2020 23:33:24 GMT - elapsed-time: '59' - expires: '-1' - pragma: no-cache - request-id: d1c01214-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content - url: https://search38471564.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 06B8336C26C304192C7B26FC455ACC25 - method: GET - uri: https://search38471564.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search38471564.search.windows.net/$metadata#datasources","value":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '202' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:24 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d1cc9e80-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search38471564.search.windows.net/datasources?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_datasource_if_unchanged.yaml deleted file mode 100644 index 6a840a8ea75e3..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_datasource_if_unchanged.yaml +++ /dev/null @@ -1,137 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EAB9451773DF47CC4948501A01AA8C5D - method: POST - uri: https://searchd88c1821.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd88c1821.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED71EDA34383\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:46 GMT - elapsed-time: '52' - etag: W/"0x8D7ED71EDA34383" - expires: '-1' - location: https://searchd88c1821.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 09913646-8b4e-11ea-bf52-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchd88c1821.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '345' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EAB9451773DF47CC4948501A01AA8C5D - method: PUT - uri: https://searchd88c1821.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd88c1821.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED71EDB1C519\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '365' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:46 GMT - elapsed-time: '47' - etag: W/"0x8D7ED71EDB1C519" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 09bdcd08-8b4e-11ea-96c1-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchd88c1821.search.windows.net - - /datasources('sample-datasource') - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - If-Match: - - '"0x8D7ED71EDA34383"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EAB9451773DF47CC4948501A01AA8C5D - method: DELETE - uri: https://searchd88c1821.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:47 GMT - elapsed-time: '5' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 09ccb6c2-8b4e-11ea-974c-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchd88c1821.search.windows.net - - /datasources('sample-datasource') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexer.yaml deleted file mode 100644 index de520083f82d4..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexer.yaml +++ /dev/null @@ -1,245 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - A7E0BDA1BE1FB2465CBEE33F06D595D9 - method: POST - uri: https://search86da11ab.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86da11ab.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5250DC08AE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:28 GMT - elapsed-time: '25' - etag: W/"0x8D7ED5250DC08AE" - expires: '-1' - location: https://search86da11ab.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6cc4b0ac-8b2e-11ea-8ee6-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86da11ab.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - A7E0BDA1BE1FB2465CBEE33F06D595D9 - method: POST - uri: https://search86da11ab.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86da11ab.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5251897F3E\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:30 GMT - elapsed-time: '1009' - etag: W/"0x8D7ED5251897F3E" - expires: '-1' - location: https://search86da11ab.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6ce0d926-8b2e-11ea-b21a-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86da11ab.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - A7E0BDA1BE1FB2465CBEE33F06D595D9 - method: POST - uri: https://search86da11ab.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86da11ab.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5251C6452B\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:31 GMT - elapsed-time: '191' - etag: W/"0x8D7ED5251C6452B" - expires: '-1' - location: https://search86da11ab.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6d94440c-8b2e-11ea-811b-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86da11ab.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - A7E0BDA1BE1FB2465CBEE33F06D595D9 - method: GET - uri: https://search86da11ab.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86da11ab.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5251C6452B\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '367' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:31 GMT - elapsed-time: '12' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6dd3e1dc-8b2e-11ea-bace-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86da11ab.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - A7E0BDA1BE1FB2465CBEE33F06D595D9 - method: DELETE - uri: https://search86da11ab.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - date: Thu, 30 Apr 2020 22:03:31 GMT - elapsed-time: '35' - expires: '-1' - pragma: no-cache - request-id: 6ddc19d0-8b2e-11ea-b6de-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86da11ab.search.windows.net - - /indexers('sample-indexer') - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - A7E0BDA1BE1FB2465CBEE33F06D595D9 - method: GET - uri: https://search86da11ab.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86da11ab.search.windows.net/$metadata#indexers","value":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '200' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:31 GMT - elapsed-time: '5' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 6de86d64-8b2e-11ea-9060-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search86da11ab.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexer_if_unchanged.yaml deleted file mode 100644 index bdd2d4b4cbd56..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexer_if_unchanged.yaml +++ /dev/null @@ -1,223 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 783079AE343B72D1129A6B85CDBDA067 - method: POST - uri: https://search912116e5.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search912116e5.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE17E46EB769\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:47 GMT - elapsed-time: '29' - etag: W/"0x8D7EE17E46EB769" - expires: '-1' - location: https://search912116e5.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 00db4fa6-8bf4-11ea-a835-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search912116e5.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 783079AE343B72D1129A6B85CDBDA067 - method: POST - uri: https://search912116e5.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search912116e5.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EE17E50DDDD6\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:49 GMT - elapsed-time: '894' - etag: W/"0x8D7EE17E50DDDD6" - expires: '-1' - location: https://search912116e5.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 0104db46-8bf4-11ea-9602-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search912116e5.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 783079AE343B72D1129A6B85CDBDA067 - method: POST - uri: https://search912116e5.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search912116e5.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17E53FF6AF\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:49 GMT - elapsed-time: '178' - etag: W/"0x8D7EE17E53FF6AF" - expires: '-1' - location: https://search912116e5.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 01a84c86-8bf4-11ea-a290-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search912116e5.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": - "sample-datasource", "targetIndexName": "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '139' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 783079AE343B72D1129A6B85CDBDA067 - method: PUT - uri: https://search912116e5.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search912116e5.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17E55EA9CF\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '367' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:49 GMT - elapsed-time: '102' - etag: W/"0x8D7EE17E55EA9CF" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 01dd8fe8-8bf4-11ea-aa3a-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search912116e5.search.windows.net - - /indexers('sample-indexer') - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - If-Match: - - '"0x8D7EE17E53FF6AF"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 783079AE343B72D1129A6B85CDBDA067 - method: DELETE - uri: https://search912116e5.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 21:37:49 GMT - elapsed-time: '4' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 01f415cc-8bf4-11ea-a820-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search912116e5.search.windows.net - - /indexers('sample-indexer') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexes.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexes.yaml deleted file mode 100644 index d53f6c73fca59..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexes.yaml +++ /dev/null @@ -1,60 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - A267E470BFF120455C4300D9DF89C73B - method: DELETE - uri: https://search86db11ac.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - date: Wed, 29 Apr 2020 23:30:55 GMT - elapsed-time: '220' - expires: '-1' - pragma: no-cache - request-id: 78b527f4-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content - url: https://search86db11ac.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - A267E470BFF120455C4300D9DF89C73B - method: GET - uri: https://search86db11ac.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86db11ac.search.windows.net/$metadata#indexes","value":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '199' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:00 GMT - elapsed-time: '17' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 7be25078-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search86db11ac.search.windows.net/indexes?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexes_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexes_if_unchanged.yaml deleted file mode 100644 index a95f99b43f1ed..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_indexes_if_unchanged.yaml +++ /dev/null @@ -1,139 +0,0 @@ -interactions: -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [{"name": "MyProfile"}], "corsOptions": {"allowedOrigins": - ["*"], "maxAgeInSeconds": 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '260' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 80AE7802DD95A3AC15F78D806265235E - method: POST - uri: https://search912f16e6.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search912f16e6.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED71B008B075\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '890' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:03 GMT - elapsed-time: '571' - etag: W/"0x8D7ED71B008B075" - expires: '-1' - location: https://search912f16e6.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: cba6183e-8b4d-11ea-9e27-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search912f16e6.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [], "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": - 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '239' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 80AE7802DD95A3AC15F78D806265235E - method: PUT - uri: https://search912f16e6.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search912f16e6.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED71B02BA833\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '506' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:03 GMT - elapsed-time: '129' - etag: W/"0x8D7ED71B02BA833" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: cc2b40f4-8b4d-11ea-aba8-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search912f16e6.search.windows.net - - /indexes('hotels') - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - If-Match: - - '"0x8D7ED71B008B075"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 80AE7802DD95A3AC15F78D806265235E - method: DELETE - uri: https://search912f16e6.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:03 GMT - elapsed-time: '15' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: cc49635c-8b4d-11ea-9b7f-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search912f16e6.search.windows.net - - /indexes('hotels') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_skillset.yaml deleted file mode 100644 index 1c15c2ee3fe2e..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_skillset.yaml +++ /dev/null @@ -1,223 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '252' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - FF7C90F7E91B46FA97FDC79B2C54A4F3 - method: POST - uri: https://search99551227.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search99551227.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E24CB8674E6C\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '587' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:25:43 GMT - elapsed-time: '79' - etag: W/"0x8D7E24CB8674E6C" - expires: '-1' - location: - - h - - t - - t - - p - - s - - ':' - - / - - / - - s - - e - - a - - r - - c - - h - - '9' - - '9' - - '5' - - '5' - - '1' - - '2' - - '2' - - '7' - - . - - s - - e - - a - - r - - c - - h - - . - - w - - i - - n - - d - - o - - w - - s - - . - - n - - e - - t - - / - - s - - k - - i - - l - - l - - s - - e - - t - - s - - ( - - '''' - - t - - e - - s - - t - - '-' - - s - - s - - '''' - - ) - - '?' - - a - - p - - i - - '-' - - v - - e - - r - - s - - i - - o - - n - - '=' - - '2' - - '0' - - '1' - - '9' - - '-' - - '0' - - '5' - - '-' - - '0' - - '6' - - '-' - - P - - r - - e - - v - - i - - e - - w - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d3a2d29a-8028-11ea-9358-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search99551227.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - FF7C90F7E91B46FA97FDC79B2C54A4F3 - method: GET - uri: https://search99551227.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search99551227.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7E24CB8674E6C\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '521' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:25:43 GMT - elapsed-time: '24' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d3c4ebfa-8028-11ea-9358-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search99551227.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - FF7C90F7E91B46FA97FDC79B2C54A4F3 - method: DELETE - uri: https://search99551227.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - date: Thu, 16 Apr 2020 21:25:43 GMT - elapsed-time: '26' - expires: '-1' - pragma: no-cache - request-id: d3ccab60-8028-11ea-9358-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content - url: https://search99551227.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - FF7C90F7E91B46FA97FDC79B2C54A4F3 - method: GET - uri: https://search99551227.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search99551227.search.windows.net/$metadata#skillsets","value":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '202' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:25:48 GMT - elapsed-time: '12' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d6d09380-8028-11ea-9358-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search99551227.search.windows.net/skillsets?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_skillset_if_unchanged.yaml deleted file mode 100644 index 05c260cbac2c7..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_skillset_if_unchanged.yaml +++ /dev/null @@ -1,138 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '252' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 657C58F25F5510BEB3AB19482A2E8DD3 - method: POST - uri: https://searcha9e81761.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searcha9e81761.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7ED71D4C7EB65\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '587' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:05 GMT - elapsed-time: '46' - etag: W/"0x8D7ED71D4C7EB65" - expires: '-1' - location: https://searcha9e81761.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f0c0d15a-8b4d-11ea-a53c-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searcha9e81761.search.windows.net - - /skillsets - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "test-ss", "description": "updated", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '255' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 657C58F25F5510BEB3AB19482A2E8DD3 - method: PUT - uri: https://searcha9e81761.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searcha9e81761.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7ED71D4DADAA4\"","name":"test-ss","description":"updated","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '466' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:05 GMT - elapsed-time: '64' - etag: W/"0x8D7ED71D4DADAA4" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f0e2e652-8b4d-11ea-ad8e-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searcha9e81761.search.windows.net - - /skillsets('test-ss') - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - If-Match: - - '"0x8D7ED71D4C7EB65"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 657C58F25F5510BEB3AB19482A2E8DD3 - method: DELETE - uri: https://searcha9e81761.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:49:05 GMT - elapsed-time: '9' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: f0f5521a-8b4d-11ea-bb06-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searcha9e81761.search.windows.net - - /skillsets('test-ss') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_synonym_map.yaml deleted file mode 100644 index d29956f77ce2f..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_synonym_map.yaml +++ /dev/null @@ -1,131 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America\nWashington, Wash. => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E68F8C2BAE2BDB711153395E8AF5DBA2 - method: POST - uri: https://searchd31a1376.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd31a1376.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC958EB24C8F\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-length: '272' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:17 GMT - elapsed-time: '42' - etag: W/"0x8D7EC958EB24C8F" - expires: '-1' - location: https://searchd31a1376.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: aa49623a-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://searchd31a1376.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E68F8C2BAE2BDB711153395E8AF5DBA2 - method: GET - uri: https://searchd31a1376.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd31a1376.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC958EB24C8F\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '336' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:17 GMT - elapsed-time: '9' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: aa5fb71a-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchd31a1376.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E68F8C2BAE2BDB711153395E8AF5DBA2 - method: DELETE - uri: https://searchd31a1376.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - date: Wed, 29 Apr 2020 23:32:17 GMT - elapsed-time: '16' - expires: '-1' - pragma: no-cache - request-id: aa64bfda-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content - url: https://searchd31a1376.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E68F8C2BAE2BDB711153395E8AF5DBA2 - method: GET - uri: https://searchd31a1376.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd31a1376.search.windows.net/$metadata#synonymmaps","value":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '204' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:17 GMT - elapsed-time: '6' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: aa6b2b86-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchd31a1376.search.windows.net/synonymmaps?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_synonym_map_if_unchanged.yaml deleted file mode 100644 index bdfd7f7f89d1c..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_delete_synonym_map_if_unchanged.yaml +++ /dev/null @@ -1,137 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America\nWashington, Wash. => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 379F6C259E39EFF08F01F8D2429FF657 - method: POST - uri: https://searchf4b018b0.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf4b018b0.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7ED71BA2FE792\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-length: '272' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:20 GMT - elapsed-time: '23' - etag: W/"0x8D7ED71BA2FE792" - expires: '-1' - location: https://searchf4b018b0.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d62a27a6-8b4d-11ea-b123-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchf4b018b0.search.windows.net - - /synonymmaps - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. - => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '81' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 379F6C259E39EFF08F01F8D2429FF657 - method: PUT - uri: https://searchf4b018b0.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf4b018b0.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7ED71BA3AE613\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '302' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:20 GMT - elapsed-time: '17' - etag: W/"0x8D7ED71BA3AE613" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d6493314-8b4d-11ea-90af-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchf4b018b0.search.windows.net - - /synonymmaps('test-syn-map') - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - If-Match: - - '"0x8D7ED71BA2FE792"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 379F6C259E39EFF08F01F8D2429FF657 - method: DELETE - uri: https://searchf4b018b0.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: no-cache - content-language: en - content-length: '160' - content-type: application/json; odata.metadata=minimal - date: Fri, 01 May 2020 01:48:20 GMT - elapsed-time: '140' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d653da30-8b4d-11ea-95d5-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchf4b018b0.search.windows.net - - /synonymmaps('test-syn-map') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_datasource_async.yaml deleted file mode 100644 index 3938e3e300966..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_datasource_async.yaml +++ /dev/null @@ -1,73 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 3C11009E981E0448385CCC14CFCA14D8 - method: POST - uri: https://searchfa0d1431.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchfa0d1431.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95BD275436\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:36 GMT - elapsed-time: '52' - etag: W/"0x8D7EC95BD275436" - expires: '-1' - location: https://searchfa0d1431.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d8bafb42-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://searchfa0d1431.search.windows.net/datasources?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 3C11009E981E0448385CCC14CFCA14D8 - method: GET - uri: https://searchfa0d1431.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchfa0d1431.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95BD275436\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '359' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:36 GMT - elapsed-time: '5' - etag: W/"0x8D7EC95BD275436" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: d8d38216-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchfa0d1431.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_index.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_index.yaml deleted file mode 100644 index e1be7ad466e57..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_index.yaml +++ /dev/null @@ -1,35 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 094C5091C3BFA239AA6E652B4F4BCF9E - method: GET - uri: https://search32fc0fa1.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search32fc0fa1.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EC95653038C1\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '1125' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:12 GMT - elapsed-time: '55' - etag: W/"0x8D7EC95653038C1" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 82e74360-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search32fc0fa1.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_index_statistics.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_index_statistics.yaml deleted file mode 100644 index 6d397e6702a4e..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_index_statistics.yaml +++ /dev/null @@ -1,34 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 3DB2E070C62F5424D11A4BAAE184B3EF - method: GET - uri: https://searchfabb144b.search.windows.net/indexes('drgqefsg')/search.stats?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchfabb144b.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexStatistics","documentCount":0,"storageSize":0}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '263' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:24 GMT - elapsed-time: '31' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 8a5b6cd4-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchfabb144b.search.windows.net/indexes('drgqefsg')/search.stats?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_indexer.yaml deleted file mode 100644 index 277fb96a83695..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_indexer.yaml +++ /dev/null @@ -1,174 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 593462469FF1D719FBE14D57F475C267 - method: POST - uri: https://search537a1078.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search537a1078.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED525B68C640\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:47 GMT - elapsed-time: '33' - etag: W/"0x8D7ED525B68C640" - expires: '-1' - location: https://search537a1078.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 774d90ca-8b2e-11ea-a1d3-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search537a1078.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 593462469FF1D719FBE14D57F475C267 - method: POST - uri: https://search537a1078.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search537a1078.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED525C1CCDAF\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:48 GMT - elapsed-time: '1058' - etag: W/"0x8D7ED525C1CCDAF" - expires: '-1' - location: https://search537a1078.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 776e4a3e-8b2e-11ea-ad83-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search537a1078.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 593462469FF1D719FBE14D57F475C267 - method: POST - uri: https://search537a1078.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search537a1078.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED525C4AC3DD\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:48 GMT - elapsed-time: '158' - etag: W/"0x8D7ED525C4AC3DD" - expires: '-1' - location: https://search537a1078.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 7827fb64-8b2e-11ea-8ebb-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search537a1078.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 593462469FF1D719FBE14D57F475C267 - method: GET - uri: https://search537a1078.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search537a1078.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED525C4AC3DD\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '363' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:03:48 GMT - elapsed-time: '4' - etag: W/"0x8D7ED525C4AC3DD" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 7856b578-8b2e-11ea-ba8e-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search537a1078.search.windows.net - - /indexers('sample-indexer') - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_indexer_status.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_indexer_status.yaml deleted file mode 100644 index 4b657a0e4515a..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_indexer_status.yaml +++ /dev/null @@ -1,173 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 8051098DD96B39E1AD1A3A668AAD41ED - method: POST - uri: https://searchd28e137b.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd28e137b.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5265E79E5F\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:04 GMT - elapsed-time: '80' - etag: W/"0x8D7ED5265E79E5F" - expires: '-1' - location: https://searchd28e137b.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 81c2547e-8b2e-11ea-afa8-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchd28e137b.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 8051098DD96B39E1AD1A3A668AAD41ED - method: POST - uri: https://searchd28e137b.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd28e137b.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5266AB38FF\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:06 GMT - elapsed-time: '1144' - etag: W/"0x8D7ED5266AB38FF" - expires: '-1' - location: https://searchd28e137b.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 81f10de4-8b2e-11ea-adc2-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchd28e137b.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 8051098DD96B39E1AD1A3A668AAD41ED - method: POST - uri: https://searchd28e137b.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd28e137b.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5266E0F8C5\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:06 GMT - elapsed-time: '221' - etag: W/"0x8D7ED5266E0F8C5" - expires: '-1' - location: https://searchd28e137b.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 82b88f30-8b2e-11ea-bb2a-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchd28e137b.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 8051098DD96B39E1AD1A3A668AAD41ED - method: GET - uri: https://searchd28e137b.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd28e137b.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":null,"executionHistory":[],"limits":{"maxRunTime":"PT0S","maxDocumentExtractionSize":0,"maxDocumentContentCharactersToExtract":0}}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '365' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:06 GMT - elapsed-time: '17' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 82f39cec-8b2e-11ea-88bc-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - searchd28e137b.search.windows.net - - /indexers('sample-indexer')/search.status - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_service_statistics.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_service_statistics.yaml deleted file mode 100644 index cb16c9b0d1e51..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_service_statistics.yaml +++ /dev/null @@ -1,34 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - A4B33DCE35FD438DFDF33E31096E8B8A - method: GET - uri: https://search24f71524.search.windows.net/servicestats?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search24f71524.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.ServiceStatistics","counters":{"documentCount":{"usage":0,"quota":null},"indexesCount":{"usage":0,"quota":3},"indexersCount":{"usage":0,"quota":3},"dataSourcesCount":{"usage":0,"quota":3},"storageSize":{"usage":0,"quota":52428800},"synonymMaps":{"usage":0,"quota":3},"skillsetCount":{"usage":0,"quota":3}},"limits":{"maxFieldsPerIndex":1000,"maxFieldNestingDepthPerIndex":10,"maxComplexCollectionFieldsPerIndex":40,"maxComplexObjectsInCollectionsPerDocument":3000}}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '430' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:30:07 GMT - elapsed-time: '36' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 5c1c72a0-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search24f71524.search.windows.net/servicestats?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_skillset.yaml deleted file mode 100644 index b6acc9c8997a8..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_skillset.yaml +++ /dev/null @@ -1,198 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '252' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C91B40DCD141C4903F6BF6DDE5C216B8 - method: POST - uri: https://search64c210f4.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search64c210f4.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E24A617C32B0\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '587' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:58 GMT - elapsed-time: '71' - etag: W/"0x8D7E24A617C32B0" - expires: '-1' - location: - - h - - t - - t - - p - - s - - ':' - - / - - / - - s - - e - - a - - r - - c - - h - - '6' - - '4' - - c - - '2' - - '1' - - '0' - - f - - '4' - - . - - s - - e - - a - - r - - c - - h - - . - - w - - i - - n - - d - - o - - w - - s - - . - - n - - e - - t - - / - - s - - k - - i - - l - - l - - s - - e - - t - - s - - ( - - '''' - - t - - e - - s - - t - - '-' - - s - - s - - '''' - - ) - - '?' - - a - - p - - i - - '-' - - v - - e - - r - - s - - i - - o - - n - - '=' - - '2' - - '0' - - '1' - - '9' - - '-' - - '0' - - '5' - - '-' - - '0' - - '6' - - '-' - - P - - r - - e - - v - - i - - e - - w - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 7c5e0c7c-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search64c210f4.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C91B40DCD141C4903F6BF6DDE5C216B8 - method: GET - uri: https://search64c210f4.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search64c210f4.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7E24A617C32B0\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '520' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:58 GMT - elapsed-time: '35' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 7c7848c6-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search64c210f4.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C91B40DCD141C4903F6BF6DDE5C216B8 - method: GET - uri: https://search64c210f4.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search64c210f4.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E24A617C32B0\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '518' - content-type: application/json; odata.metadata=minimal - date: Thu, 16 Apr 2020 21:08:58 GMT - elapsed-time: '15' - etag: W/"0x8D7E24A617C32B0" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 7c81aa2e-8026-11ea-96cc-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search64c210f4.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_skillsets.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_skillsets.yaml deleted file mode 100644 index 8ad4c29f6196c..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_skillsets.yaml +++ /dev/null @@ -1,112 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss-1", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '255' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E7DFF42D4A68C86549EE3712ACA7DDF9 - method: POST - uri: https://search76291167.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search76291167.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E6369AF5F4FB\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '590' - content-type: application/json; odata.metadata=minimal - date: Tue, 21 Apr 2020 20:57:29 GMT - elapsed-time: '113' - etag: W/"0x8D7E6369AF5F4FB" - expires: '-1' - location: https://search76291167.search.windows.net/skillsets('test-ss-1')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b5c0a93a-8412-11ea-a894-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search76291167.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: '{"name": "test-ss-2", "description": "desc2", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '255' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E7DFF42D4A68C86549EE3712ACA7DDF9 - method: POST - uri: https://search76291167.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search76291167.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7E6369B020510\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: no-cache - content-length: '590' - content-type: application/json; odata.metadata=minimal - date: Tue, 21 Apr 2020 20:57:29 GMT - elapsed-time: '48' - etag: W/"0x8D7E6369B020510" - expires: '-1' - location: https://search76291167.search.windows.net/skillsets('test-ss-2')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b5e29ae0-8412-11ea-a894-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search76291167.search.windows.net/skillsets?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E7DFF42D4A68C86549EE3712ACA7DDF9 - method: GET - uri: https://search76291167.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search76291167.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7E6369AF5F4FB\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null},{"@odata.etag":"\"0x8D7E6369B020510\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '555' - content-type: application/json; odata.metadata=minimal - date: Tue, 21 Apr 2020 20:57:29 GMT - elapsed-time: '39' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b5ee71bc-8412-11ea-a894-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search76291167.search.windows.net/skillsets?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_synonym_map.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_synonym_map.yaml deleted file mode 100644 index 198886875d32a..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_synonym_map.yaml +++ /dev/null @@ -1,107 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America\nWashington, Wash. => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - DDCE707C06F6DE83869CDD960F1756EC - method: POST - uri: https://search9aee1243.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search9aee1243.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC95958C0C98\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-length: '272' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:29 GMT - elapsed-time: '41' - etag: W/"0x8D7EC95958C0C98" - expires: '-1' - location: https://search9aee1243.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b124e6ec-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search9aee1243.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - DDCE707C06F6DE83869CDD960F1756EC - method: GET - uri: https://search9aee1243.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search9aee1243.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC95958C0C98\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '335' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:29 GMT - elapsed-time: '49' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b1391b6c-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search9aee1243.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - DDCE707C06F6DE83869CDD960F1756EC - method: GET - uri: https://search9aee1243.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search9aee1243.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC95958C0C98\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '331' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:29 GMT - elapsed-time: '6' - etag: W/"0x8D7EC95958C0C98" - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b14468aa-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search9aee1243.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_synonym_maps.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_synonym_maps.yaml deleted file mode 100644 index cf813df442a75..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_get_synonym_maps.yaml +++ /dev/null @@ -1,112 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map-1", "format": "solr", "synonyms": "USA, United States, - United States of America"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '104' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 49925E98B4E6A6E7BB8023C66DCE85A0 - method: POST - uri: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchada412b6.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC959CF79C3E\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null}' - headers: - cache-control: no-cache - content-length: '249' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:42 GMT - elapsed-time: '35' - etag: W/"0x8D7EC959CF79C3E" - expires: '-1' - location: https://searchada412b6.search.windows.net/synonymmaps('test-syn-map-1')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b8907658-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: '{"name": "test-syn-map-2", "format": "solr", "synonyms": "Washington, Wash. - => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '83' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 49925E98B4E6A6E7BB8023C66DCE85A0 - method: POST - uri: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchada412b6.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC959CFF17A5\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: no-cache - content-length: '228' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:42 GMT - elapsed-time: '24' - etag: W/"0x8D7EC959CFF17A5" - expires: '-1' - location: https://searchada412b6.search.windows.net/synonymmaps('test-syn-map-2')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b8a40fc4-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 49925E98B4E6A6E7BB8023C66DCE85A0 - method: GET - uri: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchada412b6.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC959CF79C3E\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null},{"@odata.etag":"\"0x8D7EC959CFF17A5\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '356' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:32:42 GMT - elapsed-time: '13' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: b8abc174-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchada412b6.search.windows.net/synonymmaps?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_datasource_async.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_datasource_async.yaml deleted file mode 100644 index f3ddb2c48573b..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_datasource_async.yaml +++ /dev/null @@ -1,110 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EB95AE283A4776332B8DEC0FB9C57ECE - method: POST - uri: https://search101414ad.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search101414ad.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95C3D255DF\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:46 GMT - elapsed-time: '30' - etag: W/"0x8D7EC95C3D255DF" - expires: '-1' - location: https://search101414ad.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: df6b8b96-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search101414ad.search.windows.net/datasources?api-version=2020-06-30 -- request: - body: '{"name": "another-sample", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '316' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EB95AE283A4776332B8DEC0FB9C57ECE - method: POST - uri: https://search101414ad.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search101414ad.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC95C3DB0A09\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '367' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:46 GMT - elapsed-time: '31' - etag: W/"0x8D7EC95C3DB0A09" - expires: '-1' - location: https://search101414ad.search.windows.net/datasources('another-sample')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: df7e60d6-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: https://search101414ad.search.windows.net/datasources?api-version=2020-06-30 -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EB95AE283A4776332B8DEC0FB9C57ECE - method: GET - uri: https://search101414ad.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search101414ad.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D7EC95C3DB0A09\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null},{"@odata.etag":"\"0x8D7EC95C3D255DF\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '389' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:33:46 GMT - elapsed-time: '13' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: df86edd2-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search101414ad.search.windows.net/datasources?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexer.yaml deleted file mode 100644 index f1815a724a2ef..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexer.yaml +++ /dev/null @@ -1,305 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E2F9A0F43525EBB186C916380F592AD1 - method: POST - uri: https://search651610f4.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search651610f4.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED52C4646503\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:06:43 GMT - elapsed-time: '29' - etag: W/"0x8D7ED52C4646503" - expires: '-1' - location: https://search651610f4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e04c8094-8b2e-11ea-bc46-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search651610f4.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E2F9A0F43525EBB186C916380F592AD1 - method: POST - uri: https://search651610f4.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search651610f4.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED52C4C9C8F3\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:06:43 GMT - elapsed-time: '501' - etag: W/"0x8D7ED52C4C9C8F3" - expires: '-1' - location: https://search651610f4.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e069b818-8b2e-11ea-8821-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search651610f4.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: 'b''{"name": "another-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '322' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E2F9A0F43525EBB186C916380F592AD1 - method: POST - uri: https://search651610f4.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search651610f4.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED52C4FA097A\"","name":"another-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '371' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:06:44 GMT - elapsed-time: '32' - etag: W/"0x8D7ED52C4FA097A" - expires: '-1' - location: https://search651610f4.search.windows.net/datasources('another-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e0d3c8cc-8b2e-11ea-b18a-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search651610f4.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "another-index", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '114' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E2F9A0F43525EBB186C916380F592AD1 - method: POST - uri: https://search651610f4.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search651610f4.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED52C57E1E8D\"","name":"another-index","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '565' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:06:45 GMT - elapsed-time: '730' - etag: W/"0x8D7ED52C57E1E8D" - expires: '-1' - location: https://search651610f4.search.windows.net/indexes('another-index')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e0ff4b7a-8b2e-11ea-aaf0-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search651610f4.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E2F9A0F43525EBB186C916380F592AD1 - method: POST - uri: https://search651610f4.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search651610f4.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED52C5DC2E27\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:06:45 GMT - elapsed-time: '540' - etag: W/"0x8D7ED52C5DC2E27" - expires: '-1' - location: https://search651610f4.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e187cd64-8b2e-11ea-814c-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search651610f4.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "another-indexer", "dataSourceName": "another-datasource", "targetIndexName": - "another-index", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '122' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E2F9A0F43525EBB186C916380F592AD1 - method: POST - uri: https://search651610f4.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search651610f4.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED52C60A4B66\"","name":"another-indexer","description":null,"dataSourceName":"another-datasource","skillsetName":null,"targetIndexName":"another-index","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '371' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:06:46 GMT - elapsed-time: '191' - etag: W/"0x8D7ED52C60A4B66" - expires: '-1' - location: https://search651610f4.search.windows.net/indexers('another-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e1f77fd2-8b2e-11ea-a8c8-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search651610f4.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E2F9A0F43525EBB186C916380F592AD1 - method: GET - uri: https://search651610f4.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search651610f4.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED52C60A4B66\"","name":"another-indexer","description":null,"dataSourceName":"another-datasource","skillsetName":null,"targetIndexName":"another-index","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null},{"@odata.etag":"\"0x8D7ED52C5DC2E27\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '405' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:06:46 GMT - elapsed-time: '13' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: e21bb800-8b2e-11ea-af1d-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search651610f4.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexes.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexes.yaml deleted file mode 100644 index 251238e6efed9..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexes.yaml +++ /dev/null @@ -1,34 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 98F882124BE28E7E0EA564B871D89281 - method: GET - uri: https://search651710f5.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search651710f5.search.windows.net/$metadata#indexes","value":[{"@odata.etag":"\"0x8D7EC9573E8092C\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '1114' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:37 GMT - elapsed-time: '80' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 919d4616-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://search651710f5.search.windows.net/indexes?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexes_empty.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexes_empty.yaml deleted file mode 100644 index 2497965fca0a1..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_list_indexes_empty.yaml +++ /dev/null @@ -1,34 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 3047B2B0CC7B88CC2CE6D80B142582F2 - method: GET - uri: https://searchd36d1383.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd36d1383.search.windows.net/$metadata#indexes","value":[]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '200' - content-type: application/json; odata.metadata=minimal - date: Wed, 29 Apr 2020 23:31:42 GMT - elapsed-time: '44' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 958d78d6-8a71-11ea-889b-8c8590507855 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: https://searchd36d1383.search.windows.net/indexes?api-version=2020-06-30 -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_reset_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_reset_indexer.yaml deleted file mode 100644 index 835e6bdae4654..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_reset_indexer.yaml +++ /dev/null @@ -1,245 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - B14D2D6E7CAFAD9A092431020450EC29 - method: POST - uri: https://search7658115b.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search7658115b.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED527A604F84\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:39 GMT - elapsed-time: '28' - etag: W/"0x8D7ED527A604F84" - expires: '-1' - location: https://search7658115b.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 963d594a-8b2e-11ea-82c8-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search7658115b.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - B14D2D6E7CAFAD9A092431020450EC29 - method: POST - uri: https://search7658115b.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search7658115b.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED527AF1D480\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:40 GMT - elapsed-time: '825' - etag: W/"0x8D7ED527AF1D480" - expires: '-1' - location: https://search7658115b.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 966561ba-8b2e-11ea-b432-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search7658115b.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - B14D2D6E7CAFAD9A092431020450EC29 - method: POST - uri: https://search7658115b.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search7658115b.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED527B299070\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:40 GMT - elapsed-time: '215' - etag: W/"0x8D7ED527B299070" - expires: '-1' - location: https://search7658115b.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 96fafb58-8b2e-11ea-be95-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search7658115b.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - B14D2D6E7CAFAD9A092431020450EC29 - method: GET - uri: https://search7658115b.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search7658115b.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED527B299070\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '368' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:40 GMT - elapsed-time: '9' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 9736c8a4-8b2e-11ea-b580-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search7658115b.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - B14D2D6E7CAFAD9A092431020450EC29 - method: POST - uri: https://search7658115b.search.windows.net/indexers('sample-indexer')/search.reset?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - date: Thu, 30 Apr 2020 22:04:40 GMT - elapsed-time: '138' - expires: '-1' - pragma: no-cache - request-id: 973eb276-8b2e-11ea-9c69-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search7658115b.search.windows.net - - /indexers('sample-indexer')/search.reset - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - B14D2D6E7CAFAD9A092431020450EC29 - method: GET - uri: https://search7658115b.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search7658115b.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":{"status":"reset","errorMessage":null,"startTime":"2020-04-30T22:04:40.722Z","endTime":"2020-04-30T22:04:40.722Z","itemsProcessed":0,"itemsFailed":0,"initialTrackingState":null,"finalTrackingState":null,"errors":[],"warnings":[],"metrics":null},"executionHistory":[{"status":"reset","errorMessage":null,"startTime":"2020-04-30T22:04:40.722Z","endTime":"2020-04-30T22:04:40.722Z","itemsProcessed":0,"itemsFailed":0,"initialTrackingState":null,"finalTrackingState":null,"errors":[],"warnings":[],"metrics":null}],"limits":null}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '428' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:40 GMT - elapsed-time: '37' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: 97597b24-8b2e-11ea-8ecf-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search7658115b.search.windows.net - - /indexers('sample-indexer')/search.status - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_run_indexer.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_run_indexer.yaml deleted file mode 100644 index fa3749ad5b9b1..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_service_live_async.test_run_indexer.yaml +++ /dev/null @@ -1,246 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7249924270B36D2B8D2CB30BD19258AA - method: POST - uri: https://search545d108d.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search545d108d.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5284CBEA3F\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: no-cache - content-length: '370' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:56 GMT - elapsed-time: '34' - etag: W/"0x8D7ED5284CBEA3F" - expires: '-1' - location: https://search545d108d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: a0b44d68-8b2e-11ea-8600-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search545d108d.search.windows.net - - /datasources - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7249924270B36D2B8D2CB30BD19258AA - method: POST - uri: https://search545d108d.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search545d108d.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5285782812\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: no-cache - content-length: '558' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:57 GMT - elapsed-time: '893' - etag: W/"0x8D7ED5285782812" - expires: '-1' - location: https://search545d108d.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: a0d1fa50-8b2e-11ea-b768-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search545d108d.search.windows.net - - /indexes - - api-version=2020-06-30 - - '' -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7249924270B36D2B8D2CB30BD19258AA - method: POST - uri: https://search545d108d.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search545d108d.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5285A6937E\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: no-cache - content-length: '362' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:58 GMT - elapsed-time: '168' - etag: W/"0x8D7ED5285A6937E" - expires: '-1' - location: https://search545d108d.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: a181bf40-8b2e-11ea-a6b1-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 201 - message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search545d108d.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7249924270B36D2B8D2CB30BD19258AA - method: GET - uri: https://search545d108d.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search545d108d.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5285A6937E\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '368' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:58 GMT - elapsed-time: '8' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: a1b2c330-8b2e-11ea-a4d0-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search545d108d.search.windows.net - - /indexers - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7249924270B36D2B8D2CB30BD19258AA - method: POST - uri: https://search545d108d.search.windows.net/indexers('sample-indexer')/search.run?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: no-cache - content-length: '0' - date: Thu, 30 Apr 2020 22:04:58 GMT - elapsed-time: '30' - expires: '-1' - pragma: no-cache - request-id: a1bb955e-8b2e-11ea-832b-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - status: - code: 202 - message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search545d108d.search.windows.net - - /indexers('sample-indexer')/search.run - - api-version=2020-06-30 - - '' -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7249924270B36D2B8D2CB30BD19258AA - method: GET - uri: https://search545d108d.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search545d108d.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":null,"executionHistory":[],"limits":{"maxRunTime":"PT0S","maxDocumentExtractionSize":0,"maxDocumentContentCharactersToExtract":0}}' - headers: - cache-control: no-cache - content-encoding: gzip - content-length: '365' - content-type: application/json; odata.metadata=minimal - date: Thu, 30 Apr 2020 22:04:58 GMT - elapsed-time: '12' - expires: '-1' - odata-version: '4.0' - pragma: no-cache - preference-applied: odata.include-annotations="*" - request-id: a1c616b4-8b2e-11ea-8513-2816a845e8c6 - strict-transport-security: max-age=15724800; includeSubDomains - vary: Accept-Encoding - status: - code: 200 - message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - search545d108d.search.windows.net - - /indexers('sample-indexer')/search.status - - api-version=2020-06-30 - - '' -version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_batching_client_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_batching_client_async.py index 06767c082a7ae..9c7a7ae2588f5 100644 --- a/sdk/search/azure-search-documents/tests/async_tests/test_batching_client_async.py +++ b/sdk/search/azure-search-documents/tests/async_tests/test_batching_client_async.py @@ -11,21 +11,22 @@ SearchIndexDocumentBatchingClient, ) from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError CREDENTIAL = AzureKeyCredential(key="test_api_key") class TestSearchBatchingClientAsync(object): async def test_search_index_document_batching_client_kwargs(self): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=100, batch_size=100) + client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=100) - assert client.batch_size == 100 + assert client.batch_size == 1000 assert client._window == 100 assert client._auto_flush await client.close() async def test_batch_queue(self): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL) + client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, auto_flush=False) assert client._index_documents_batch await client.add_upload_actions(["upload1"]) @@ -39,49 +40,37 @@ async def test_batch_queue(self): assert len(client.actions) == 7 - async def test_succeeded_queue(self): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL) - - assert client._index_documents_batch - await client.add_upload_actions(["upload1"]) - await client.add_delete_actions(["delete1", "delete2"]) - await client.add_merge_actions(["merge1", "merge2", "merge3"]) - await client.add_merge_or_upload_actions(["merge_or_upload1"]) - actions = await client._index_documents_batch.dequeue_actions() - await client._index_documents_batch.enqueue_succeeded_actions(actions) - assert len(client.succeeded_actions) == 7 - - - async def test_failed_queue(self): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL) - - assert client._index_documents_batch - await client.add_upload_actions(["upload1"]) - await client.add_delete_actions(["delete1", "delete2"]) - await client.add_merge_actions(["merge1", "merge2", "merge3"]) - await client.add_merge_or_upload_actions(["merge_or_upload1"]) - actions = await client._index_documents_batch.dequeue_actions() - await client._index_documents_batch.enqueue_failed_actions(actions) - assert len(client.failed_actions) == 7 - - @mock.patch( - "azure.search.documents._internal.aio._search_index_document_batching_client_async.SearchIndexDocumentBatchingClient.flush" + "azure.search.documents._internal.aio._search_index_document_batching_client_async.SearchIndexDocumentBatchingClient._process_if_needed" ) - async def test_flush_if_needed(self, mock_flush): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=1000, batch_size=2) + async def test_process_if_needed(self, mock_process_if_needed): + client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=1000, auto_flush=False) await client.add_upload_actions(["upload1"]) await client.add_delete_actions(["delete1", "delete2"]) - assert mock_flush.called - await client.close() + assert mock_process_if_needed.called @mock.patch( "azure.search.documents._internal.aio._search_index_document_batching_client_async.SearchIndexDocumentBatchingClient._cleanup" ) async def test_context_manager(self, mock_cleanup): - async with SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL) as client: + async with SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, auto_flush=False) as client: await client.add_upload_actions(["upload1"]) await client.add_delete_actions(["delete1", "delete2"]) assert mock_cleanup.called + + async def test_flush(self): + DOCUMENT = { + 'Category': 'Hotel', + 'HotelId': '1000', + 'Rating': 4.0, + 'Rooms': [], + 'HotelName': 'Azure Inn', + } + with mock.patch.object(SearchIndexDocumentBatchingClient, "_index_documents_actions", side_effect=HttpResponseError("Error")): + async with SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, auto_flush=False) as client: + client._index_key = "HotelId" + await client.add_upload_actions([DOCUMENT]) + await client.flush() + assert len(client.actions) == 0 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_index_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_index_live_async.py deleted file mode 100644 index c2c674baf673b..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/test_index_live_async.py +++ /dev/null @@ -1,397 +0,0 @@ -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -import asyncio -import functools -import json -from os.path import dirname, join, realpath -import time - -import pytest - -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - -from search_service_preparer import SearchServicePreparer - -from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function - -CWD = dirname(realpath(__file__)) - -SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() -BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) - -from azure.core.exceptions import HttpResponseError -from azure.core.credentials import AzureKeyCredential -from azure.search.documents.aio import SearchClient - -TIME_TO_SLEEP = 3 - -def await_prepared_test(test_fn): - """Synchronous wrapper for async test methods. Used to avoid making changes - upstream to AbstractPreparer (which doesn't await the functions it wraps) - """ - - @functools.wraps(test_fn) - def run(test_class_instance, *args, **kwargs): - trim_kwargs_from_test_function(test_fn, kwargs) - loop = asyncio.get_event_loop() - return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) - - return run - - -class SearchClientTestAsync(AzureMgmtTestCase): - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_async_get_document_count( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - assert await client.get_document_count() == 10 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_document(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - for hotel_id in range(1, 11): - result = await client.get_document(key=str(hotel_id)) - expected = BATCH["value"][hotel_id - 1] - assert result.get("hotelId") == expected.get("hotelId") - assert result.get("hotelName") == expected.get("hotelName") - assert result.get("description") == expected.get("description") - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_document_missing(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - with pytest.raises(HttpResponseError): - await client.get_document(key="1000") - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_search_simple(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - results = [] - async for x in await client.search(search_text="hotel"): - results.append(x) - assert len(results) == 7 - - results = [] - async for x in await client.search(search_text="motel"): - results.append(x) - assert len(results) == 2 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_search_filter(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - async with client: - results = [] - select = ("hotelName", "category", "description") - async for x in await client.search( - search_text="WiFi", - filter="category eq 'Budget'", - select=",".join(select), - order_by="hotelName desc" - ): - results.append(x) - assert [x["hotelName"] for x in results] == sorted( - [x["hotelName"] for x in results], reverse=True - ) - expected = { - "category", - "hotelName", - "description", - "@search.score", - "@search.highlights", - } - assert all(set(x) == expected for x in results) - assert all(x["category"] == "Budget" for x in results) - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_search_counts(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - results = await client.search(search_text="hotel") - assert await results.get_count() is None - - results = await client.search(search_text="hotel", include_total_count=True) - assert await results.get_count() == 7 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_search_coverage(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - results = await client.search(search_text="hotel") - assert await results.get_coverage() is None - - results = await client.search(search_text="hotel", minimum_coverage=50.0) - cov = await results.get_coverage() - assert isinstance(cov, float) - assert cov >= 50.0 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_search_facets_none( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - async with client: - select = ("hotelName", "category", "description") - results = await client.search( - search_text="WiFi", - select=",".join(select) - ) - assert await results.get_facets() is None - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_search_facets_result( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - async with client: - select = ("hotelName", "category", "description") - results = await client.search( - search_text="WiFi", - facets=["category"], - select=",".join(select) - ) - assert await results.get_facets() == { - "category": [ - {"value": "Budget", "count": 4}, - {"value": "Luxury", "count": 1}, - ] - } - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_autocomplete(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - results = await client.autocomplete(search_text="mot", suggester_name="sg") - assert results == [{"text": "motel", "query_plus_text": "motel"}] - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_suggest(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - results = await client.suggest(search_text="mot", suggester_name="sg") - assert results == [ - {"hotelId": "2", "text": "Cheapest hotel in town. Infact, a motel."}, - {"hotelId": "9", "text": "Secret Point Motel"}, - ] - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_upload_documents_new(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - DOCUMENTS = [ - {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, - {"hotelId": "1001", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, - ] - - async with client: - results = await client.upload_documents(DOCUMENTS) - assert len(results) == 2 - assert set(x.status_code for x in results) == {201} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert await client.get_document_count() == 12 - for doc in DOCUMENTS: - result = await client.get_document(key=doc["hotelId"]) - assert result["hotelId"] == doc["hotelId"] - assert result["hotelName"] == doc["hotelName"] - assert result["rating"] == doc["rating"] - assert result["rooms"] == doc["rooms"] - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_upload_documents_existing( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - DOCUMENTS = [ - {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, - {"hotelId": "3", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, - ] - async with client: - results = await client.upload_documents(DOCUMENTS) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200, 201} - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_documents_existing( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - results = await client.delete_documents( - [{"hotelId": "3"}, {"hotelId": "4"}] - ) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert await client.get_document_count() == 8 - - with pytest.raises(HttpResponseError): - await client.get_document(key="3") - - with pytest.raises(HttpResponseError): - await client.get_document(key="4") - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_documents_missing( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - results = await client.delete_documents( - [{"hotelId": "1000"}, {"hotelId": "4"}] - ) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert await client.get_document_count() == 9 - - with pytest.raises(HttpResponseError): - await client.get_document(key="1000") - - with pytest.raises(HttpResponseError): - await client.get_document(key="4") - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_merge_documents_existing( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - results = await client.merge_documents( - [{"hotelId": "3", "rating": 1}, {"hotelId": "4", "rating": 2}] - ) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert await client.get_document_count() == 10 - - result = await client.get_document(key="3") - assert result["rating"] == 1 - - result = await client.get_document(key="4") - assert result["rating"] == 2 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_merge_documents_missing( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - results = await client.merge_documents( - [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] - ) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200, 404} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert await client.get_document_count() == 10 - - with pytest.raises(HttpResponseError): - await client.get_document(key="1000") - - result = await client.get_document(key="4") - assert result["rating"] == 2 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_merge_or_upload_documents( - self, api_key, endpoint, index_name, **kwargs - ): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - async with client: - results = await client.merge_or_upload_documents( - [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] - ) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200, 201} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert await client.get_document_count() == 11 - - result = await client.get_document(key="1000") - assert result["rating"] == 1 - - result = await client.get_document(key="4") - assert result["rating"] == 2 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_client_basic_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_client_basic_live_async.py new file mode 100644 index 0000000000000..993adeabca7c5 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_client_basic_live_async.py @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath + +import pytest + +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure_devtools.scenario_tests import ReplayableTest + +from search_service_preparer import SearchServicePreparer + +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function + +CWD = dirname(realpath(__file__)) + +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) + +from azure.core.exceptions import HttpResponseError +from azure.core.credentials import AzureKeyCredential +from azure.search.documents.aio import SearchClient + +TIME_TO_SLEEP = 3 + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + + +class SearchClientTestAsync(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_async_get_document_count( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + assert await client.get_document_count() == 10 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_document(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + for hotel_id in range(1, 11): + result = await client.get_document(key=str(hotel_id)) + expected = BATCH["value"][hotel_id - 1] + assert result.get("hotelId") == expected.get("hotelId") + assert result.get("hotelName") == expected.get("hotelName") + assert result.get("description") == expected.get("description") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_document_missing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + with pytest.raises(HttpResponseError): + await client.get_document(key="1000") diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_client_batching_client_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_client_batching_client_live_async.py new file mode 100644 index 0000000000000..623a6872dfcbb --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_client_batching_client_live_async.py @@ -0,0 +1,253 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath +import time + +import pytest + +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure_devtools.scenario_tests import ReplayableTest +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function + +from search_service_preparer import SearchServicePreparer + +CWD = dirname(realpath(__file__)) + +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) + +from azure.core.exceptions import HttpResponseError +from azure.core.credentials import AzureKeyCredential +from azure.search.documents.aio import SearchClient, SearchIndexDocumentBatchingClient + +TIME_TO_SLEEP = 3 + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + + +class SearchClientTestAsync(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_upload_documents_new(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + DOCUMENTS = [ + {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, + {"hotelId": "1001", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, + ] + + async with batch_client: + await batch_client.add_upload_actions(DOCUMENTS) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + async with client: + assert await client.get_document_count() == 12 + for doc in DOCUMENTS: + result = await client.get_document(key=doc["hotelId"]) + assert result["hotelId"] == doc["hotelId"] + assert result["hotelName"] == doc["hotelName"] + assert result["rating"] == doc["rating"] + assert result["rooms"] == doc["rooms"] + + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_upload_documents_existing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + DOCUMENTS = [ + {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, + {"hotelId": "3", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, + ] + async with batch_client: + await batch_client.add_upload_actions(DOCUMENTS) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + async with client: + assert await client.get_document_count() == 11 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_documents_existing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + async with batch_client: + await batch_client.add_delete_actions( + [{"hotelId": "3"}, {"hotelId": "4"}] + ) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + async with client: + assert await client.get_document_count() == 8 + + with pytest.raises(HttpResponseError): + await client.get_document(key="3") + + with pytest.raises(HttpResponseError): + await client.get_document(key="4") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_documents_missing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + async with batch_client: + await batch_client.add_delete_actions( + [{"hotelId": "1000"}, {"hotelId": "4"}] + ) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + async with client: + assert await client.get_document_count() == 9 + + with pytest.raises(HttpResponseError): + await client.get_document(key="1000") + + with pytest.raises(HttpResponseError): + await client.get_document(key="4") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_merge_documents_existing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + async with batch_client: + await batch_client.add_merge_actions( + [{"hotelId": "3", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + async with client: + assert await client.get_document_count() == 10 + + result = await client.get_document(key="3") + assert result["rating"] == 1 + + result = await client.get_document(key="4") + assert result["rating"] == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_merge_documents_missing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + async with batch_client: + await batch_client.add_merge_actions( + [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + async with client: + assert await client.get_document_count() == 10 + + with pytest.raises(HttpResponseError): + await client.get_document(key="1000") + + result = await client.get_document(key="4") + assert result["rating"] == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_merge_or_upload_documents( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + async with batch_client: + await batch_client.add_merge_or_upload_actions( + [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + async with client: + assert await client.get_document_count() == 11 + + result = await client.get_document(key="1000") + assert result["rating"] == 1 + + result = await client.get_document(key="4") + assert result["rating"] == 2 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_client_index_document_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_client_index_document_live_async.py new file mode 100644 index 0000000000000..71bb591f65d7f --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_client_index_document_live_async.py @@ -0,0 +1,226 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath +import time + +import pytest + +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure_devtools.scenario_tests import ReplayableTest +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function + +from search_service_preparer import SearchServicePreparer + +CWD = dirname(realpath(__file__)) + +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) + +from azure.core.exceptions import HttpResponseError +from azure.core.credentials import AzureKeyCredential +from azure.search.documents.aio import SearchClient + +TIME_TO_SLEEP = 3 + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + + +class SearchClientTestAsync(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_upload_documents_new(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + DOCUMENTS = [ + {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, + {"hotelId": "1001", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, + ] + + async with client: + results = await client.upload_documents(DOCUMENTS) + assert len(results) == 2 + assert set(x.status_code for x in results) == {201} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert await client.get_document_count() == 12 + for doc in DOCUMENTS: + result = await client.get_document(key=doc["hotelId"]) + assert result["hotelId"] == doc["hotelId"] + assert result["hotelName"] == doc["hotelName"] + assert result["rating"] == doc["rating"] + assert result["rooms"] == doc["rooms"] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_upload_documents_existing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + DOCUMENTS = [ + {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, + {"hotelId": "3", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, + ] + async with client: + results = await client.upload_documents(DOCUMENTS) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200, 201} + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_documents_existing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + results = await client.delete_documents( + [{"hotelId": "3"}, {"hotelId": "4"}] + ) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert await client.get_document_count() == 8 + + with pytest.raises(HttpResponseError): + await client.get_document(key="3") + + with pytest.raises(HttpResponseError): + await client.get_document(key="4") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_documents_missing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + results = await client.delete_documents( + [{"hotelId": "1000"}, {"hotelId": "4"}] + ) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert await client.get_document_count() == 9 + + with pytest.raises(HttpResponseError): + await client.get_document(key="1000") + + with pytest.raises(HttpResponseError): + await client.get_document(key="4") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_merge_documents_existing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + results = await client.merge_documents( + [{"hotelId": "3", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert await client.get_document_count() == 10 + + result = await client.get_document(key="3") + assert result["rating"] == 1 + + result = await client.get_document(key="4") + assert result["rating"] == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_merge_documents_missing( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + results = await client.merge_documents( + [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200, 404} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert await client.get_document_count() == 10 + + with pytest.raises(HttpResponseError): + await client.get_document(key="1000") + + result = await client.get_document(key="4") + assert result["rating"] == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_merge_or_upload_documents( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + results = await client.merge_or_upload_documents( + [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200, 201} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert await client.get_document_count() == 11 + + result = await client.get_document(key="1000") + assert result["rating"] == 1 + + result = await client.get_document(key="4") + assert result["rating"] == 2 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_client_search_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_client_search_live_async.py new file mode 100644 index 0000000000000..8536b8ad77c02 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_client_search_live_async.py @@ -0,0 +1,180 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath + +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function +from azure_devtools.scenario_tests import ReplayableTest + +from search_service_preparer import SearchServicePreparer + +CWD = dirname(realpath(__file__)) + +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) + +from azure.core.credentials import AzureKeyCredential +from azure.search.documents.aio import SearchClient + +TIME_TO_SLEEP = 3 + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + + +class SearchClientTestAsync(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_search_simple(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + results = [] + async for x in await client.search(search_text="hotel"): + results.append(x) + assert len(results) == 7 + + results = [] + async for x in await client.search(search_text="motel"): + results.append(x) + assert len(results) == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_search_filter(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + async with client: + results = [] + select = ("hotelName", "category", "description") + async for x in await client.search( + search_text="WiFi", + filter="category eq 'Budget'", + select=",".join(select), + order_by="hotelName desc" + ): + results.append(x) + assert [x["hotelName"] for x in results] == sorted( + [x["hotelName"] for x in results], reverse=True + ) + expected = { + "category", + "hotelName", + "description", + "@search.score", + "@search.highlights", + } + assert all(set(x) == expected for x in results) + assert all(x["category"] == "Budget" for x in results) + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_search_counts(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + results = await client.search(search_text="hotel") + assert await results.get_count() is None + + results = await client.search(search_text="hotel", include_total_count=True) + assert await results.get_count() == 7 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_search_coverage(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + results = await client.search(search_text="hotel") + assert await results.get_coverage() is None + + results = await client.search(search_text="hotel", minimum_coverage=50.0) + cov = await results.get_coverage() + assert isinstance(cov, float) + assert cov >= 50.0 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_search_facets_none( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + async with client: + select = ("hotelName", "category", "description") + results = await client.search( + search_text="WiFi", + select=",".join(select) + ) + assert await results.get_facets() is None + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_search_facets_result( + self, api_key, endpoint, index_name, **kwargs + ): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + async with client: + select = ("hotelName", "category", "description") + results = await client.search( + search_text="WiFi", + facets=["category"], + select=",".join(select) + ) + assert await results.get_facets() == { + "category": [ + {"value": "Budget", "count": 4}, + {"value": "Luxury", "count": 1}, + ] + } + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_autocomplete(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + results = await client.autocomplete(search_text="mot", suggester_name="sg") + assert results == [{"text": "motel", "query_plus_text": "motel"}] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_suggest(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + async with client: + results = await client.suggest(search_text="mot", suggester_name="sg") + assert results == [ + {"hotelId": "2", "text": "Cheapest hotel in town. Infact, a motel."}, + {"hotelId": "9", "text": "Secret Point Motel"}, + ] diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_service_client_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_async.py similarity index 100% rename from sdk/search/azure-search-documents/tests/async_tests/test_search_service_client_async.py rename to sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_async.py diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_data_source_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_data_source_live_async.py new file mode 100644 index 0000000000000..05304b660c9e6 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_data_source_live_async.py @@ -0,0 +1,149 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath + +import pytest +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from devtools_testutils import AzureMgmtTestCase + +from azure_devtools.scenario_tests import ReplayableTest +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function + +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + SearchIndexerDataSourceConnection, + SearchIndexerDataContainer, +) +from azure.search.documents.indexes.aio import SearchIndexerClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + +class SearchDataSourcesClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + def _create_data_source_connection(self, name="sample-datasource"): + container = SearchIndexerDataContainer(name='searchcontainer') + data_source_connection = SearchIndexerDataSourceConnection( + name=name, + type="azureblob", + connection_string=CONNECTION_STRING, + container=container + ) + return data_source_connection + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_datasource_async(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + result = await client.create_data_source_connection(data_source_connection) + assert result.name == "sample-datasource" + assert result.type == "azureblob" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_datasource_async(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + result = await client.create_data_source_connection(data_source_connection) + assert len(await client.get_data_source_connections()) == 1 + await client.delete_data_source_connection("sample-datasource") + assert len(await client.get_data_source_connections()) == 0 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_datasource_async(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = await client.create_data_source_connection(data_source_connection) + result = await client.get_data_source_connection("sample-datasource") + assert result.name == "sample-datasource" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_list_datasource_async(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection1 = self._create_data_source_connection() + data_source_connection2 = self._create_data_source_connection(name="another-sample") + created1 = await client.create_data_source_connection(data_source_connection1) + created2 = await client.create_data_source_connection(data_source_connection2) + result = await client.get_data_source_connections() + assert isinstance(result, list) + assert set(x.name for x in result) == {"sample-datasource", "another-sample"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_datasource_async(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = await client.create_data_source_connection(data_source_connection) + assert len(await client.get_data_source_connections()) == 1 + data_source_connection.description = "updated" + await client.create_or_update_data_source_connection(data_source_connection) + assert len(await client.get_data_source_connections()) == 1 + result = await client.get_data_source_connection("sample-datasource") + assert result.name == "sample-datasource" + assert result.description == "updated" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_datasource_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = await client.create_data_source_connection(data_source_connection) + etag = created.e_tag + + # Now update the data source connection + data_source_connection.description = "updated" + await client.create_or_update_data_source_connection(data_source_connection) + + # prepare data source connection + data_source_connection.e_tag = etag # reset to the original data source connection + data_source_connection.description = "changed" + with pytest.raises(HttpResponseError): + await client.create_or_update_data_source_connection(data_source_connection, match_condition=MatchConditions.IfNotModified) + assert len(await client.get_data_source_connections()) == 1 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_datasource_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = await client.create_data_source_connection(data_source_connection) + etag = created.e_tag + + # Now update the data source connection + data_source_connection.description = "updated" + await client.create_or_update_data_source_connection(data_source_connection) + + # prepare data source connection + data_source_connection.e_tag = etag # reset to the original data source connection + with pytest.raises(HttpResponseError): + await client.delete_data_source_connection(data_source_connection, match_condition=MatchConditions.IfNotModified) + assert len(await client.get_data_source_connections()) == 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_live_async.py new file mode 100644 index 0000000000000..9b6627ceb09e9 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_live_async.py @@ -0,0 +1,256 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath + +import pytest +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from devtools_testutils import AzureMgmtTestCase + +from azure_devtools.scenario_tests import ReplayableTest +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function + +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + AnalyzeTextOptions, + CorsOptions, + SearchIndex, + ScoringProfile, + SimpleField, + SearchFieldDataType +) +from azure.search.documents.indexes.aio import SearchIndexClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + +class SearchIndexClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer() + async def test_get_service_statistics(self, api_key, endpoint, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = await client.get_service_statistics() + assert isinstance(result, dict) + assert set(result.keys()) == {"counters", "limits"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer() + async def test_list_indexes_empty(self, api_key, endpoint, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.list_indexes() + + with pytest.raises(StopAsyncIteration): + await result.__anext__() + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_list_indexes(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.list_indexes() + + first = await result.__anext__() + assert first.name == index_name + + with pytest.raises(StopAsyncIteration): + await result.__anext__() + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_index(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = await client.get_index(index_name) + assert result.name == index_name + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_index_statistics(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = await client.get_index_statistics(index_name) + assert set(result.keys()) == {'document_count', 'storage_size'} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_indexes(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + await client.delete_index(index_name) + import time + if self.is_live: + time.sleep(TIME_TO_SLEEP) + result = client.list_indexes() + with pytest.raises(StopAsyncIteration): + await result.__anext__() + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_indexes_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + + # First create an index + name = "hotels" + fields = [ + { + "name": "hotelId", + "type": "Edm.String", + "key": True, + "searchable": False + }, + { + "name": "baseRate", + "type": "Edm.Double" + }] + scoring_profile = ScoringProfile( + name="MyProfile" + ) + scoring_profiles = [] + scoring_profiles.append(scoring_profile) + cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + result = await client.create_index(index) + etag = result.e_tag + # get e tag nd update + index.scoring_profiles = [] + await client.create_or_update_index(index) + + index.e_tag = etag + with pytest.raises(HttpResponseError): + await client.delete_index(index, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_index(self, api_key, endpoint, index_name, **kwargs): + name = "hotels" + fields = fields = [ + SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), + SimpleField(name="baseRate", type=SearchFieldDataType.Double) + ] + + scoring_profile = ScoringProfile( + name="MyProfile" + ) + scoring_profiles = [] + scoring_profiles.append(scoring_profile) + cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = await client.create_index(index) + assert result.name == "hotels" + assert result.scoring_profiles[0].name == scoring_profile.name + assert result.cors_options.allowed_origins == cors_options.allowed_origins + assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_index(self, api_key, endpoint, index_name, **kwargs): + name = "hotels" + fields = fields = [ + SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), + SimpleField(name="baseRate", type=SearchFieldDataType.Double) + ] + + cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) + scoring_profiles = [] + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = await client.create_or_update_index(index=index) + assert len(result.scoring_profiles) == 0 + assert result.cors_options.allowed_origins == cors_options.allowed_origins + assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds + scoring_profile = ScoringProfile( + name="MyProfile" + ) + scoring_profiles = [] + scoring_profiles.append(scoring_profile) + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + result = await client.create_or_update_index(index=index) + assert result.scoring_profiles[0].name == scoring_profile.name + assert result.cors_options.allowed_origins == cors_options.allowed_origins + assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_indexes_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + + # First create an index + name = "hotels" + fields = [ + { + "name": "hotelId", + "type": "Edm.String", + "key": True, + "searchable": False + }, + { + "name": "baseRate", + "type": "Edm.Double" + }] + scoring_profile = ScoringProfile( + name="MyProfile" + ) + scoring_profiles = [] + scoring_profiles.append(scoring_profile) + cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + result = await client.create_index(index) + etag = result.e_tag + # get e tag nd update + index.scoring_profiles = [] + await client.create_or_update_index(index) + + index.e_tag = etag + with pytest.raises(HttpResponseError): + await client.create_or_update_index(index, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_analyze_text(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + analyze_request = AnalyzeTextOptions(text="One's ", analyzer_name="standard.lucene") + result = await client.analyze_text(index_name, analyze_request) + assert len(result.tokens) == 2 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py new file mode 100644 index 0000000000000..17089fc01430d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py @@ -0,0 +1,190 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath +import time + +import pytest +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from devtools_testutils import AzureMgmtTestCase + +from azure_devtools.scenario_tests import ReplayableTest +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function + +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + EntityRecognitionSkill, + InputFieldMappingEntry, + OutputFieldMappingEntry, + SearchIndexerSkillset, +) +from azure.search.documents.indexes.aio import SearchIndexerClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + +class SearchSkillsetClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_skillset(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") + result = await client.create_skillset(skillset) + assert isinstance(result, SearchIndexerSkillset) + assert result.name == "test-ss" + assert result.description == "desc" + assert result.e_tag + assert len(result.skills) == 1 + assert isinstance(result.skills[0], EntityRecognitionSkill) + + assert len(await client.get_skillsets()) == 1 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_skillset(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") + result = await client.create_skillset(skillset) + assert len(await client.get_skillsets()) == 1 + + await client.delete_skillset("test-ss") + if self.is_live: + time.sleep(TIME_TO_SLEEP) + assert len(await client.get_skillsets()) == 0 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_skillset_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") + result = await client.create_skillset(skillset) + etag = result.e_tag + + skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="updated") + updated = await client.create_or_update_skillset(skillset1) + updated.e_tag = etag + + with pytest.raises(HttpResponseError): + await client.delete_skillset(updated, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_skillset(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") + await client.create_skillset(skillset) + assert len(await client.get_skillsets()) == 1 + + result = await client.get_skillset("test-ss") + assert isinstance(result, SearchIndexerSkillset) + assert result.name == "test-ss" + assert result.description == "desc" + assert result.e_tag + assert len(result.skills) == 1 + assert isinstance(result.skills[0], EntityRecognitionSkill) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_skillsets(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset1 = SearchIndexerSkillset(name='test-ss-1', skills=list([s]), description="desc1") + await client.create_skillset(skillset1) + skillset2 = SearchIndexerSkillset(name='test-ss-2', skills=list([s]), description="desc2") + await client.create_skillset(skillset2) + result = await client.get_skillsets() + assert isinstance(result, list) + assert all(isinstance(x, SearchIndexerSkillset) for x in result) + assert set(x.name for x in result) == {"test-ss-1", "test-ss-2"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_skillset(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") + await client.create_or_update_skillset(skillset1) + skillset2 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc2") + await client.create_or_update_skillset(skillset2) + assert len(await client.get_skillsets()) == 1 + + result = await client.get_skillset("test-ss") + assert isinstance(result, SearchIndexerSkillset) + assert result.name == "test-ss" + assert result.description == "desc2" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_skillset_inplace(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") + ss = await client.create_or_update_skillset(skillset1) + skillset2 = SearchIndexerSkillset(name='test-ss', skills=[s], description="desc2", skillset=ss) + await client.create_or_update_skillset(skillset2) + assert len(await client.get_skillsets()) == 1 + + result = await client.get_skillset("test-ss") + assert isinstance(result, SearchIndexerSkillset) + assert result.name == "test-ss" + assert result.description == "desc2" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_skillset_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") + ss = await client.create_or_update_skillset(skillset1) + etag = ss.e_tag + + skillset2 = SearchIndexerSkillset(name='test-ss', skills=[s], description="desc2", skillset=ss) + await client.create_or_update_skillset(skillset2) + assert len(await client.get_skillsets()) == 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_synonym_map_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_synonym_map_live_async.py new file mode 100644 index 0000000000000..e44c613733687 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_synonym_map_live_async.py @@ -0,0 +1,163 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath + +import pytest +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from devtools_testutils import AzureMgmtTestCase + +from azure_devtools.scenario_tests import ReplayableTest +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function + +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + SynonymMap, +) +from azure.search.documents.indexes.aio import SearchIndexClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + +class SearchSynonymMapsClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_synonym_map(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + result = await client.create_synonym_map(synonym_map) + assert isinstance(result, SynonymMap) + assert result.name == "test-syn-map" + assert result.synonyms == [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + assert len(await client.get_synonym_maps()) == 1 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_synonym_map(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + result = await client.create_synonym_map(synonym_map) + assert len(await client.get_synonym_maps()) == 1 + await client.delete_synonym_map("test-syn-map") + assert len(await client.get_synonym_maps()) == 0 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_synonym_map_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + result = await client.create_synonym_map(synonym_map) + etag = result.e_tag + + synonym_map.synonyms = "\n".join([ + "Washington, Wash. => WA", + ]) + await client.create_or_update_synonym_map(synonym_map) + + result.e_tag = etag + with pytest.raises(HttpResponseError): + await client.delete_synonym_map(result, match_condition=MatchConditions.IfNotModified) + assert len(client.get_synonym_maps()) == 1 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_synonym_map(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + await client.create_synonym_map(synonym_map) + assert len(await client.get_synonym_maps()) == 1 + result = await client.get_synonym_map("test-syn-map") + assert isinstance(result, SynonymMap) + assert result.name == "test-syn-map" + assert result.synonyms == [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_synonym_maps(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map_1 = SynonymMap(name="test-syn-map-1", synonyms=synonyms) + await client.create_synonym_map(synonym_map_1) + synonyms = [ + "Washington, Wash. => WA", + ] + synonym_map_2 = SynonymMap(name="test-syn-map-2", synonyms=synonyms) + await client.create_synonym_map(synonym_map_2) + result = await client.get_synonym_maps() + assert isinstance(result, list) + assert all(isinstance(x, SynonymMap) for x in result) + assert set(x.name for x in result) == {"test-syn-map-1", "test-syn-map-2"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_synonym_map(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + await client.create_synonym_map(synonym_map) + assert len(await client.get_synonym_maps()) == 1 + synonym_map.synonyms = [ + "Washington, Wash. => WA", + ] + await client.create_or_update_synonym_map(synonym_map) + assert len(await client.get_synonym_maps()) == 1 + result = await client.get_synonym_map("test-syn-map") + assert isinstance(result, SynonymMap) + assert result.name == "test-syn-map" + assert result.synonyms == [ + "Washington, Wash. => WA", + ] diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_indexer_client_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_indexer_client_live_async.py new file mode 100644 index 0000000000000..32053bdd3a67e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_indexer_client_live_async.py @@ -0,0 +1,193 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import asyncio +import functools +import json +from os.path import dirname, join, realpath +import time + +import pytest +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from devtools_testutils import AzureMgmtTestCase + +from azure_devtools.scenario_tests import ReplayableTest +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function + +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + SearchIndex, + SearchIndexerDataSourceConnection, + SearchIndexerDataContainer, + SearchIndexer, +) +from azure.search.documents.indexes.aio import SearchIndexClient, SearchIndexerClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() +BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run + +class SearchIndexersClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + async def _prepare_indexer(self, endpoint, api_key, name="sample-indexer", ds_name="sample-datasource", id_name="hotels"): + con_str = self.settings.AZURE_STORAGE_CONNECTION_STRING + self.scrubber.register_name_pair(con_str, 'connection_string') + container = SearchIndexerDataContainer(name='searchcontainer') + data_source_connection = SearchIndexerDataSourceConnection( + name=ds_name, + type="azureblob", + connection_string=con_str, + container=container + ) + ds_client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + ds = await ds_client.create_data_source_connection(data_source_connection) + + index_name = id_name + fields = [ + { + "name": "hotelId", + "type": "Edm.String", + "key": True, + "searchable": False + }] + index = SearchIndex(name=index_name, fields=fields) + ind_client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + ind = await ind_client.create_index(index) + return SearchIndexer(name=name, data_source_name=ds.name, target_index_name=ind.name) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + result = await client.create_indexer(indexer) + assert result.name == "sample-indexer" + assert result.target_index_name == "hotels" + assert result.data_source_name == "sample-datasource" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + result = await client.create_indexer(indexer) + assert len(await client.get_indexers()) == 1 + await client.delete_indexer("sample-indexer") + assert len(await client.get_indexers()) == 0 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + created = await client.create_indexer(indexer) + result = await client.get_indexer("sample-indexer") + assert result.name == "sample-indexer" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_list_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer1 = await self._prepare_indexer(endpoint, api_key) + indexer2 = await self._prepare_indexer(endpoint, api_key, name="another-indexer", ds_name="another-datasource", id_name="another-index") + created1 = await client.create_indexer(indexer1) + created2 = await client.create_indexer(indexer2) + result = await client.get_indexers() + assert isinstance(result, list) + assert set(x.name for x in result) == {"sample-indexer", "another-indexer"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + created = await client.create_indexer(indexer) + assert len(await client.get_indexers()) == 1 + indexer.description = "updated" + await client.create_or_update_indexer(indexer) + assert len(await client.get_indexers()) == 1 + result = await client.get_indexer("sample-indexer") + assert result.name == "sample-indexer" + assert result.description == "updated" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_reset_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + result = await client.create_indexer(indexer) + assert len(await client.get_indexers()) == 1 + await client.reset_indexer("sample-indexer") + assert (await client.get_indexer_status("sample-indexer")).last_result.status in ('InProgress', 'reset') + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_run_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + result = await client.create_indexer(indexer) + assert len(await client.get_indexers()) == 1 + start = time.time() + await client.run_indexer("sample-indexer") + assert (await client.get_indexer_status("sample-indexer")).status == 'running' + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_get_indexer_status(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + result = await client.create_indexer(indexer) + status = await client.get_indexer_status("sample-indexer") + assert status.status is not None + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_create_or_update_indexer_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + created = await client.create_indexer(indexer) + etag = created.e_tag + + + indexer.description = "updated" + await client.create_or_update_indexer(indexer) + + indexer.e_tag = etag + with pytest.raises(HttpResponseError): + await client.create_or_update_indexer(indexer, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + async def test_delete_indexer_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = await self._prepare_indexer(endpoint, api_key) + result = await client.create_indexer(indexer) + etag = result.e_tag + + indexer.description = "updated" + await client.create_or_update_indexer(indexer) + + indexer.e_tag = etag + with pytest.raises(HttpResponseError): + await client.delete_indexer(indexer, match_condition=MatchConditions.IfNotModified) diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_service_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_service_live_async.py deleted file mode 100644 index 6ffa76fa12f0e..0000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/test_service_live_async.py +++ /dev/null @@ -1,771 +0,0 @@ -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -import asyncio -import functools -import json -from os.path import dirname, join, realpath -import time - -import pytest -from azure.core import MatchConditions -from azure.core.credentials import AzureKeyCredential -from devtools_testutils import AzureMgmtTestCase - -from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer - -from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function - -from azure.core.exceptions import HttpResponseError -from azure.search.documents.indexes.models import( - AnalyzeTextOptions, - AnalyzeResult, - CorsOptions, - EntityRecognitionSkill, - SearchIndex, - InputFieldMappingEntry, - OutputFieldMappingEntry, - ScoringProfile, - SearchIndexerSkillset, - SearchIndexerDataSourceConnection, - SearchIndexerDataContainer, - SearchIndexer, - SynonymMap, - SimpleField, - SearchFieldDataType -) -from azure.search.documents.indexes.aio import SearchIndexClient, SearchIndexerClient - -CWD = dirname(realpath(__file__)) -SCHEMA = open(join(CWD, "..", "hotel_schema.json")).read() -BATCH = json.load(open(join(CWD, "..", "hotel_small.json"), encoding='utf-8')) -TIME_TO_SLEEP = 5 -CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' - -def await_prepared_test(test_fn): - """Synchronous wrapper for async test methods. Used to avoid making changes - upstream to AbstractPreparer (which doesn't await the functions it wraps) - """ - - @functools.wraps(test_fn) - def run(test_class_instance, *args, **kwargs): - trim_kwargs_from_test_function(test_fn, kwargs) - loop = asyncio.get_event_loop() - return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) - - return run - -class SearchClientTest(AzureMgmtTestCase): - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer() - async def test_get_service_statistics(self, api_key, endpoint, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = await client.get_service_statistics() - assert isinstance(result, dict) - assert set(result.keys()) == {"counters", "limits"} - -class SearchIndexesClientTest(AzureMgmtTestCase): - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer() - async def test_list_indexes_empty(self, api_key, endpoint, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.list_indexes() - - with pytest.raises(StopAsyncIteration): - await result.__anext__() - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_list_indexes(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.list_indexes() - - first = await result.__anext__() - assert first.name == index_name - - with pytest.raises(StopAsyncIteration): - await result.__anext__() - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_index(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = await client.get_index(index_name) - assert result.name == index_name - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_index_statistics(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = await client.get_index_statistics(index_name) - assert set(result.keys()) == {'document_count', 'storage_size'} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_indexes(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - await client.delete_index(index_name) - import time - if self.is_live: - time.sleep(TIME_TO_SLEEP) - result = client.list_indexes() - with pytest.raises(StopAsyncIteration): - await result.__anext__() - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_indexes_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - - # First create an index - name = "hotels" - fields = [ - { - "name": "hotelId", - "type": "Edm.String", - "key": True, - "searchable": False - }, - { - "name": "baseRate", - "type": "Edm.Double" - }] - scoring_profile = ScoringProfile( - name="MyProfile" - ) - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - result = await client.create_index(index) - etag = result.e_tag - # get e tag nd update - index.scoring_profiles = [] - await client.create_or_update_index(index) - - index.e_tag = etag - with pytest.raises(HttpResponseError): - await client.delete_index(index, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_index(self, api_key, endpoint, index_name, **kwargs): - name = "hotels" - fields = fields = [ - SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), - SimpleField(name="baseRate", type=SearchFieldDataType.Double) - ] - - scoring_profile = ScoringProfile( - name="MyProfile" - ) - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = await client.create_index(index) - assert result.name == "hotels" - assert result.scoring_profiles[0].name == scoring_profile.name - assert result.cors_options.allowed_origins == cors_options.allowed_origins - assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_index(self, api_key, endpoint, index_name, **kwargs): - name = "hotels" - fields = fields = [ - SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), - SimpleField(name="baseRate", type=SearchFieldDataType.Double) - ] - - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - scoring_profiles = [] - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = await client.create_or_update_index(index=index) - assert len(result.scoring_profiles) == 0 - assert result.cors_options.allowed_origins == cors_options.allowed_origins - assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds - scoring_profile = ScoringProfile( - name="MyProfile" - ) - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - result = await client.create_or_update_index(index=index) - assert result.scoring_profiles[0].name == scoring_profile.name - assert result.cors_options.allowed_origins == cors_options.allowed_origins - assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_indexes_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - - # First create an index - name = "hotels" - fields = [ - { - "name": "hotelId", - "type": "Edm.String", - "key": True, - "searchable": False - }, - { - "name": "baseRate", - "type": "Edm.Double" - }] - scoring_profile = ScoringProfile( - name="MyProfile" - ) - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - result = await client.create_index(index) - etag = result.e_tag - # get e tag nd update - index.scoring_profiles = [] - await client.create_or_update_index(index) - - index.e_tag = etag - with pytest.raises(HttpResponseError): - await client.create_or_update_index(index, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_analyze_text(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - analyze_request = AnalyzeTextOptions(text="One's ", analyzer_name="standard.lucene") - result = await client.analyze_text(index_name, analyze_request) - assert len(result.tokens) == 2 - -class SearchSynonymMapsClientTest(AzureMgmtTestCase): - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_synonym_map(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - result = await client.create_synonym_map(synonym_map) - assert isinstance(result, SynonymMap) - assert result.name == "test-syn-map" - assert result.synonyms == [ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ] - assert len(await client.get_synonym_maps()) == 1 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_synonym_map(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - result = await client.create_synonym_map(synonym_map) - assert len(await client.get_synonym_maps()) == 1 - await client.delete_synonym_map("test-syn-map") - assert len(await client.get_synonym_maps()) == 0 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_synonym_map_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - result = await client.create_synonym_map(synonym_map) - etag = result.e_tag - - synonym_map.synonyms = "\n".join([ - "Washington, Wash. => WA", - ]) - await client.create_or_update_synonym_map(synonym_map) - - result.e_tag = etag - with pytest.raises(HttpResponseError): - await client.delete_synonym_map(result, match_condition=MatchConditions.IfNotModified) - assert len(client.get_synonym_maps()) == 1 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_synonym_map(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - await client.create_synonym_map(synonym_map) - assert len(await client.get_synonym_maps()) == 1 - result = await client.get_synonym_map("test-syn-map") - assert isinstance(result, SynonymMap) - assert result.name == "test-syn-map" - assert result.synonyms == [ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ] - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_synonym_maps(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map_1 = SynonymMap(name="test-syn-map-1", synonyms=solr_format_synonyms) - await client.create_synonym_map(synonym_map_1) - solr_format_synonyms = "\n".join([ - "Washington, Wash. => WA", - ]) - synonym_map_2 = SynonymMap(name="test-syn-map-2", synonyms=solr_format_synonyms) - await client.create_synonym_map(synonym_map_2) - result = await client.get_synonym_maps() - assert isinstance(result, list) - assert all(isinstance(x, SynonymMap) for x in result) - assert set(x.name for x in result) == {"test-syn-map-1", "test-syn-map-2"} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_synonym_map(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - await client.create_synonym_map(synonym_map) - assert len(await client.get_synonym_maps()) == 1 - synonym_map.synonyms = "\n".join([ - "Washington, Wash. => WA", - ]) - await client.create_or_update_synonym_map(synonym_map) - assert len(await client.get_synonym_maps()) == 1 - result = await client.get_synonym_map("test-syn-map") - assert isinstance(result, SynonymMap) - assert result.name == "test-syn-map" - assert result.synonyms == [ - "Washington, Wash. => WA", - ] - -class SearchSkillsetClientTest(AzureMgmtTestCase): - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_skillset(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") - result = await client.create_skillset(skillset) - assert isinstance(result, SearchIndexerSkillset) - assert result.name == "test-ss" - assert result.description == "desc" - assert result.e_tag - assert len(result.skills) == 1 - assert isinstance(result.skills[0], EntityRecognitionSkill) - - assert len(await client.get_skillsets()) == 1 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_skillset(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") - result = await client.create_skillset(skillset) - assert len(await client.get_skillsets()) == 1 - - await client.delete_skillset("test-ss") - if self.is_live: - time.sleep(TIME_TO_SLEEP) - assert len(await client.get_skillsets()) == 0 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_skillset_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") - result = await client.create_skillset(skillset) - etag = result.e_tag - - skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="updated") - updated = await client.create_or_update_skillset(skillset1) - updated.e_tag = etag - - with pytest.raises(HttpResponseError): - await client.delete_skillset(updated, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_skillset(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") - await client.create_skillset(skillset) - assert len(await client.get_skillsets()) == 1 - - result = await client.get_skillset("test-ss") - assert isinstance(result, SearchIndexerSkillset) - assert result.name == "test-ss" - assert result.description == "desc" - assert result.e_tag - assert len(result.skills) == 1 - assert isinstance(result.skills[0], EntityRecognitionSkill) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_skillsets(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset1 = SearchIndexerSkillset(name='test-ss-1', skills=list([s]), description="desc1") - await client.create_skillset(skillset1) - skillset2 = SearchIndexerSkillset(name='test-ss-2', skills=list([s]), description="desc2") - await client.create_skillset(skillset2) - result = await client.get_skillsets() - assert isinstance(result, list) - assert all(isinstance(x, SearchIndexerSkillset) for x in result) - assert set(x.name for x in result) == {"test-ss-1", "test-ss-2"} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_skillset(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") - await client.create_or_update_skillset(skillset1) - skillset2 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc2") - await client.create_or_update_skillset(skillset2) - assert len(await client.get_skillsets()) == 1 - - result = await client.get_skillset("test-ss") - assert isinstance(result, SearchIndexerSkillset) - assert result.name == "test-ss" - assert result.description == "desc2" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_skillset_inplace(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") - ss = await client.create_or_update_skillset(skillset1) - skillset2 = SearchIndexerSkillset(name='test-ss', skills=[s], description="desc2", skillset=ss) - await client.create_or_update_skillset(skillset2) - assert len(await client.get_skillsets()) == 1 - - result = await client.get_skillset("test-ss") - assert isinstance(result, SearchIndexerSkillset) - assert result.name == "test-ss" - assert result.description == "desc2" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_skillset_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") - ss = await client.create_or_update_skillset(skillset1) - etag = ss.e_tag - - skillset2 = SearchIndexerSkillset(name='test-ss', skills=[s], description="desc2", skillset=ss) - await client.create_or_update_skillset(skillset2) - assert len(await client.get_skillsets()) == 1 - - -class SearchDataSourcesClientTest(AzureMgmtTestCase): - - def _create_data_source_connection(self, name="sample-datasource"): - container = SearchIndexerDataContainer(name='searchcontainer') - data_source_connection = SearchIndexerDataSourceConnection( - name=name, - type="azureblob", - connection_string=CONNECTION_STRING, - container=container - ) - return data_source_connection - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_datasource_async(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - result = await client.create_data_source_connection(data_source_connection) - assert result.name == "sample-datasource" - assert result.type == "azureblob" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_datasource_async(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - result = await client.create_data_source_connection(data_source_connection) - assert len(await client.get_data_source_connections()) == 1 - await client.delete_data_source_connection("sample-datasource") - assert len(await client.get_data_source_connections()) == 0 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_datasource_async(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = await client.create_data_source_connection(data_source_connection) - result = await client.get_data_source_connection("sample-datasource") - assert result.name == "sample-datasource" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_list_datasource_async(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection1 = self._create_data_source_connection() - data_source_connection2 = self._create_data_source_connection(name="another-sample") - created1 = await client.create_data_source_connection(data_source_connection1) - created2 = await client.create_data_source_connection(data_source_connection2) - result = await client.get_data_source_connections() - assert isinstance(result, list) - assert set(x.name for x in result) == {"sample-datasource", "another-sample"} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_datasource_async(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = await client.create_data_source_connection(data_source_connection) - assert len(await client.get_data_source_connections()) == 1 - data_source_connection.description = "updated" - await client.create_or_update_data_source_connection(data_source_connection) - assert len(await client.get_data_source_connections()) == 1 - result = await client.get_data_source_connection("sample-datasource") - assert result.name == "sample-datasource" - assert result.description == "updated" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_datasource_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = await client.create_data_source_connection(data_source_connection) - etag = created.e_tag - - # Now update the data source connection - data_source_connection.description = "updated" - await client.create_or_update_data_source_connection(data_source_connection) - - # prepare data source connection - data_source_connection.e_tag = etag # reset to the original data source connection - data_source_connection.description = "changed" - with pytest.raises(HttpResponseError): - await client.create_or_update_data_source_connection(data_source_connection, match_condition=MatchConditions.IfNotModified) - assert len(await client.get_data_source_connections()) == 1 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_datasource_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = await client.create_data_source_connection(data_source_connection) - etag = created.e_tag - - # Now update the data source connection - data_source_connection.description = "updated" - await client.create_or_update_data_source_connection(data_source_connection) - - # prepare data source connection - data_source_connection.e_tag = etag # reset to the original data source connection - with pytest.raises(HttpResponseError): - await client.delete_data_source_connection(data_source_connection, match_condition=MatchConditions.IfNotModified) - assert len(await client.get_data_source_connections()) == 1 - -class SearchIndexersClientTest(AzureMgmtTestCase): - - async def _prepare_indexer(self, endpoint, api_key, name="sample-indexer", ds_name="sample-datasource", id_name="hotels"): - con_str = self.settings.AZURE_STORAGE_CONNECTION_STRING - self.scrubber.register_name_pair(con_str, 'connection_string') - container = SearchIndexerDataContainer(name='searchcontainer') - data_source_connection = SearchIndexerDataSourceConnection( - name=ds_name, - type="azureblob", - connection_string=con_str, - container=container - ) - ds_client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - ds = await ds_client.create_data_source_connection(data_source_connection) - - index_name = id_name - fields = [ - { - "name": "hotelId", - "type": "Edm.String", - "key": True, - "searchable": False - }] - index = SearchIndex(name=index_name, fields=fields) - ind_client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - ind = await ind_client.create_index(index) - return SearchIndexer(name=name, data_source_name=ds.name, target_index_name=ind.name) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - result = await client.create_indexer(indexer) - assert result.name == "sample-indexer" - assert result.target_index_name == "hotels" - assert result.data_source_name == "sample-datasource" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - result = await client.create_indexer(indexer) - assert len(await client.get_indexers()) == 1 - await client.delete_indexer("sample-indexer") - assert len(await client.get_indexers()) == 0 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - created = await client.create_indexer(indexer) - result = await client.get_indexer("sample-indexer") - assert result.name == "sample-indexer" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_list_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer1 = await self._prepare_indexer(endpoint, api_key) - indexer2 = await self._prepare_indexer(endpoint, api_key, name="another-indexer", ds_name="another-datasource", id_name="another-index") - created1 = await client.create_indexer(indexer1) - created2 = await client.create_indexer(indexer2) - result = await client.get_indexers() - assert isinstance(result, list) - assert set(x.name for x in result) == {"sample-indexer", "another-indexer"} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - created = await client.create_indexer(indexer) - assert len(await client.get_indexers()) == 1 - indexer.description = "updated" - await client.create_or_update_indexer(indexer) - assert len(await client.get_indexers()) == 1 - result = await client.get_indexer("sample-indexer") - assert result.name == "sample-indexer" - assert result.description == "updated" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_reset_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - result = await client.create_indexer(indexer) - assert len(await client.get_indexers()) == 1 - await client.reset_indexer("sample-indexer") - assert (await client.get_indexer_status("sample-indexer")).last_result.status in ('InProgress', 'reset') - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_run_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - result = await client.create_indexer(indexer) - assert len(await client.get_indexers()) == 1 - start = time.time() - await client.run_indexer("sample-indexer") - assert (await client.get_indexer_status("sample-indexer")).status == 'running' - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_get_indexer_status(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - result = await client.create_indexer(indexer) - status = await client.get_indexer_status("sample-indexer") - assert status.status is not None - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_create_or_update_indexer_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - created = await client.create_indexer(indexer) - etag = created.e_tag - - - indexer.description = "updated" - await client.create_or_update_indexer(indexer) - - indexer.e_tag = etag - with pytest.raises(HttpResponseError): - await client.create_or_update_indexer(indexer, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - async def test_delete_indexer_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = await self._prepare_indexer(endpoint, api_key) - result = await client.create_indexer(indexer) - etag = result.e_tag - - indexer.description = "updated" - await client.create_or_update_indexer(indexer) - - indexer.e_tag = etag - with pytest.raises(HttpResponseError): - await client.delete_indexer(indexer, match_condition=MatchConditions.IfNotModified) diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_autocomplete.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_autocomplete.yaml deleted file mode 100644 index cc2d67bd2cd4a..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_autocomplete.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"search": "mot", "suggesterName": "sg"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '40' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - AE8D684F8B07A67E43EB160C1A508354 - method: POST - uri: https://searche7b20da6.search.windows.net/indexes('drgqefsg')/docs/search.post.autocomplete?api-version=2020-06-30 - response: - body: - string: '{"value":[{"text":"motel","queryPlusText":"motel"}]}' - headers: - cache-control: - - no-cache - content-length: - - '52' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:16:50 GMT - elapsed-time: - - '184' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 810b2018-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_delete_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_delete_documents_existing.yaml deleted file mode 100644 index b3f653b1df3ab..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_delete_documents_existing.yaml +++ /dev/null @@ -1,175 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "3", "@search.action": "delete"}, {"hotelId": "4", - "@search.action": "delete"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7F7F23DF951321BB6EC0497B61BBBF99 - method: POST - uri: https://searchbc401302.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: - - no-cache - content-length: - - '137' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:02 GMT - elapsed-time: - - '93' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 88810b64-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7F7F23DF951321BB6EC0497B61BBBF99 - method: GET - uri: https://searchbc401302.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF8" - headers: - cache-control: - - no-cache - content-length: - - '4' - content-type: - - text/plain - date: - - Wed, 29 Apr 2020 23:17:05 GMT - elapsed-time: - - '5' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 8a720f5e-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7F7F23DF951321BB6EC0497B61BBBF99 - method: GET - uri: https://searchbc401302.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 29 Apr 2020 23:17:05 GMT - elapsed-time: - - '3' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 8a79c410-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7F7F23DF951321BB6EC0497B61BBBF99 - method: GET - uri: https://searchbc401302.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 29 Apr 2020 23:17:05 GMT - elapsed-time: - - '4' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 8a80ab2c-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_delete_documents_missing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_delete_documents_missing.yaml deleted file mode 100644 index 56b895c00f9cb..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_delete_documents_missing.yaml +++ /dev/null @@ -1,175 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "@search.action": "delete"}, {"hotelId": - "4", "@search.action": "delete"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '106' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EF93A352FBEA8C4306E72E9FA5DE1C21 - method: POST - uri: https://searcha9301291.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: - - no-cache - content-length: - - '140' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:17 GMT - elapsed-time: - - '83' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 919491ee-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EF93A352FBEA8C4306E72E9FA5DE1C21 - method: GET - uri: https://searcha9301291.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF9" - headers: - cache-control: - - no-cache - content-length: - - '4' - content-type: - - text/plain - date: - - Wed, 29 Apr 2020 23:17:20 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 93888cc6-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EF93A352FBEA8C4306E72E9FA5DE1C21 - method: GET - uri: https://searcha9301291.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 29 Apr 2020 23:17:20 GMT - elapsed-time: - - '6' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 938fe08e-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EF93A352FBEA8C4306E72E9FA5DE1C21 - method: GET - uri: https://searcha9301291.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 29 Apr 2020 23:17:20 GMT - elapsed-time: - - '6' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 93986740-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document.yaml deleted file mode 100644 index b0f0ee3413aa4..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document.yaml +++ /dev/null @@ -1,510 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('1')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"1","hotelName":"Fancy Stay","description":"Best hotel in - town if you like luxury hotels. They have an amazing infinity pool, a spa, - and a really helpful concierge. The location is perfect -- right downtown, - close to all the tourist attractions. We highly recommend this hotel.","descriptionFr":"Meilleur - h\u00f4tel en ville si vous aimez les h\u00f4tels de luxe. Ils ont une magnifique - piscine \u00e0 d\u00e9bordement, un spa et un concierge tr\u00e8s utile. L''emplacement - est parfait \u2013 en plein centre, \u00e0 proximit\u00e9 de toutes les attractions - touristiques. Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '940' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '95' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a18aa26-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('2')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"2","hotelName":"Roach Motel","description":"Cheapest hotel - in town. Infact, a motel.","descriptionFr":"H\u00f4tel le moins cher en ville. - Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '463' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '5' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a3d397c-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular - hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '432' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a447598-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good - hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '410' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a4b0106-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('5')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"5","hotelName":"Comfy Place","description":"Another good - hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '412' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a51e21e-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('6')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"6","hotelName":null,"description":"Surprisingly expensive. - Model suites have an ocean-view.","descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '279' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '3' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a585a90-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('7')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"7","hotelName":"Modern Stay","description":"Modern architecture, - very polite staff and very clean. Also very affordable.","descriptionFr":"Architecture - moderne, personnel poli et tr\u00e8s propre. Aussi tr\u00e8s abordable.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '390' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '3' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a5ebf48-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('8')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"8","hotelName":null,"description":"Has some road noise - and is next to the very police station. Bathrooms had morel coverings.","descriptionFr":"Il - y a du bruit de la route et se trouve \u00e0 c\u00f4t\u00e9 de la station - de police. Les salles de bain avaient des rev\u00eatements de morilles.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '459' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a654728-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('9')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"9","hotelName":"Secret Point Motel","description":"The - hotel is ideally located on the main commercial artery of the city in the - heart of New York. A few minutes away is Time''s Square and the historic centre - of the city, as well as other places of interest that make New York one of - America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}' - headers: - cache-control: - - no-cache - content-length: - - '1664' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '6' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a6bd598-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 52988C94E83C6EFD6D6B57723CC909C2 - method: GET - uri: https://searche6a60d92.search.windows.net/indexes('drgqefsg')/docs('10')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"10","hotelName":"Countryside Hotel","description":"Save - up to 50% off traditional hotels. Free WiFi, great location near downtown, - full kitchen, washer & dryer, 24/7 support, bowling alley, fitness center - and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 50% sur les h\u00f4tels - traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 pr\u00e8s du centre-ville, - cuisine compl\u00e8te, laveuse & s\u00e9cheuse, support 24/7, bowling, centre - de fitness et plus encore.","category":"Budget","tags":["24-hour front desk - service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]}' - headers: - cache-control: - - no-cache - content-length: - - '1406' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:17:32 GMT - elapsed-time: - - '9' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9a732154-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document_count.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document_count.yaml deleted file mode 100644 index 4c33d22dceee0..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document_count.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 4E1885551AC6A7AC5096353C8E0B706B - method: GET - uri: https://search40b5101a.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF10" - headers: - cache-control: - - no-cache - content-length: - - '5' - content-type: - - text/plain - date: - - Wed, 29 Apr 2020 23:17:44 GMT - elapsed-time: - - '59' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - a16eab9a-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document_missing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document_missing.yaml deleted file mode 100644 index db895803a728d..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_document_missing.yaml +++ /dev/null @@ -1,40 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1BBE70CA8604EF05ACBB2DE58FEBFA85 - method: GET - uri: https://search623710eb.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 29 Apr 2020 23:17:55 GMT - elapsed-time: - - '65' - expires: - - '-1' - pragma: - - no-cache - request-id: - - a8260c94-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_counts.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_counts.yaml deleted file mode 100644 index 03b1fd40c2050..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_counts.yaml +++ /dev/null @@ -1,188 +0,0 @@ -interactions: -- request: - body: '{"search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6A55B07F42EFB9E6E03089F3F9A7220F - method: POST - uri: https://search30390fa4.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: - - no-cache - content-length: - - '5935' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:18:07 GMT - elapsed-time: - - '96' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - aefb60a0-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"count": true, "search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '34' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6A55B07F42EFB9E6E03089F3F9A7220F - method: POST - uri: https://search30390fa4.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"@odata.count":7,"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: - - no-cache - content-length: - - '5952' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:18:07 GMT - elapsed-time: - - '9' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - af20c37c-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_coverage.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_coverage.yaml deleted file mode 100644 index c533b53d2b0c1..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_coverage.yaml +++ /dev/null @@ -1,188 +0,0 @@ -interactions: -- request: - body: '{"search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 2012A83AD519035A878754DF20535EC1 - method: POST - uri: https://search504f1054.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: - - no-cache - content-length: - - '5935' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:18:18 GMT - elapsed-time: - - '80' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - b5d9445a-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"minimumCoverage": 50.0, "search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '44' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 2012A83AD519035A878754DF20535EC1 - method: POST - uri: https://search504f1054.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"@search.coverage":100.0,"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: - - no-cache - content-length: - - '5960' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:18:18 GMT - elapsed-time: - - '7' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - b5fd6af6-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_facets_none.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_facets_none.yaml deleted file mode 100644 index aabdde1b36d5a..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_facets_none.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: '{"search": "WiFi", "select": "hotelName,category,description"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '62' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E708C0D55BDFCED551EEEFA491DAAF80 - method: POST - uri: https://search8339118d.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.2423066,"hotelName":"Countryside Hotel","description":"Save - up to 50% off traditional hotels. Free WiFi, great location near downtown, - full kitchen, washer & dryer, 24/7 support, bowling alley, fitness center - and more.","category":"Budget"},{"@search.score":0.19169211,"hotelName":"EconoStay","description":"Very - popular hotel in town","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Express - Rooms","description":"Pretty good hotel","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Comfy - Place","description":"Another good hotel","category":"Budget"},{"@search.score":0.15335369,"hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","category":"Luxury"}]}' - headers: - cache-control: - - no-cache - content-length: - - '933' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:18:30 GMT - elapsed-time: - - '176' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - bc94fb86-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_facets_result.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_facets_result.yaml deleted file mode 100644 index c043dbbb0f72a..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_facets_result.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: '{"facets": ["category"], "search": "WiFi", "select": "hotelName,category,description"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '86' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 3264E611B72761B1DD80EA3277F4EE84 - method: POST - uri: https://searcha7c9127c.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"@search.facets":{"category":[{"count":4,"value":"Budget"},{"count":1,"value":"Luxury"}]},"value":[{"@search.score":0.2423066,"hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","category":"Budget"},{"@search.score":0.19169211,"hotelName":"EconoStay","description":"Very - popular hotel in town","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Express - Rooms","description":"Pretty good hotel","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Comfy - Place","description":"Another good hotel","category":"Budget"},{"@search.score":0.15335369,"hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","category":"Luxury"}]}' - headers: - cache-control: - - no-cache - content-length: - - '1023' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:18:40 GMT - elapsed-time: - - '193' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - c2f827aa-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_filter.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_filter.yaml deleted file mode 100644 index 62b1a894b6ba3..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_filter.yaml +++ /dev/null @@ -1,59 +0,0 @@ -interactions: -- request: - body: '{"filter": "category eq ''Budget''", "orderby": "hotelName desc", "search": - "WiFi", "select": "hotelName,category,description"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '125' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B583478EFB4C1DBC374E331DA859BE86 - method: POST - uri: https://search2ffc0f8e.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.19169211,"hotelName":"Express Rooms","description":"Pretty - good hotel","category":"Budget"},{"@search.score":0.19169211,"hotelName":"EconoStay","description":"Very - popular hotel in town","category":"Budget"},{"@search.score":0.2423066,"hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","category":"Budget"},{"@search.score":0.19169211,"hotelName":"Comfy - Place","description":"Another good hotel","category":"Budget"}]}' - headers: - cache-control: - - no-cache - content-length: - - '609' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:18:52 GMT - elapsed-time: - - '103' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - c9e16d92-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_simple.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_simple.yaml deleted file mode 100644 index 93d2a076f08b8..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_get_search_simple.yaml +++ /dev/null @@ -1,164 +0,0 @@ -interactions: -- request: - body: '{"search": "hotel"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 61C29831B328077CA7F9271631F6FACD - method: POST - uri: https://search30430f92.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":0.48248714,"hotelId":"10","hotelName":"Countryside - Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great - location near downtown, full kitchen, washer & dryer, 24/7 support, bowling - alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 - 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 - pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, - support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour - front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 - Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, - 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget - Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":0.18522348,"hotelId":"3","hotelName":"EconoStay","description":"Very - popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"4","hotelName":"Express - Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.18522348,"hotelId":"5","hotelName":"Comfy - Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.15049407,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.12030617,"hotelId":"1","hotelName":"Fancy - Stay","description":"Best hotel in town if you like luxury hotels. They have - an amazing infinity pool, a spa, and a really helpful concierge. The location - is perfect -- right downtown, close to all the tourist attractions. We highly - recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous - aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, - un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 - en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. - Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.057882335,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: - - no-cache - content-length: - - '5935' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:03 GMT - elapsed-time: - - '84' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d065abc4-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"search": "motel"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 61C29831B328077CA7F9271631F6FACD - method: POST - uri: https://search30430f92.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.score":1.2368374,"hotelId":"2","hotelName":"Roach - Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel - le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.24176063,"hotelId":"9","hotelName":"Secret - Point Motel","description":"The hotel is ideally located on the main commercial - artery of the city in the heart of New York. A few minutes away is Time''s - Square and the historic centre of the city, as well as other places of interest - that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel - est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de - la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place - du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat - qui font de New York l''une des villes les plus attractives et cosmopolites - de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 - 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget - Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 - grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 - Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget - Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, - 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 - King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi - tub"]}]}]}' - headers: - cache-control: - - no-cache - content-length: - - '2193' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:03 GMT - elapsed-time: - - '6' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d088cbea-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_documents_existing.yaml deleted file mode 100644 index a0276ad45b7b7..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_documents_existing.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "3", "rating": 1, "@search.action": "merge"}, {"hotelId": - "4", "rating": 2, "@search.action": "merge"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F8DD003FC5552C963171F79B1E2FBCFF - method: POST - uri: https://searchaa14129f.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: - - no-cache - content-length: - - '137' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:14 GMT - elapsed-time: - - '76' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d6da9f5a-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F8DD003FC5552C963171F79B1E2FBCFF - method: GET - uri: https://searchaa14129f.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF10" - headers: - cache-control: - - no-cache - content-length: - - '5' - content-type: - - text/plain - date: - - Wed, 29 Apr 2020 23:19:16 GMT - elapsed-time: - - '3' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d8c6f052-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F8DD003FC5552C963171F79B1E2FBCFF - method: GET - uri: https://searchaa14129f.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular - hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '432' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:17 GMT - elapsed-time: - - '7' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d8cde47a-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F8DD003FC5552C963171F79B1E2FBCFF - method: GET - uri: https://searchaa14129f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good - hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '410' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:17 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d8d53608-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_documents_missing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_documents_missing.yaml deleted file mode 100644 index 88cf15aa97487..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_documents_missing.yaml +++ /dev/null @@ -1,185 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "merge"}, - {"hotelId": "4", "rating": 2, "@search.action": "merge"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '130' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C2268A70B7F246FB2B96488EBCFCEA29 - method: POST - uri: https://search9767122e.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":false,"errorMessage":"Document not - found.","statusCode":404},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: - - no-cache - content-length: - - '158' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:28 GMT - elapsed-time: - - '344' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - df7dcb6e-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 207 - message: Multi-Status -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C2268A70B7F246FB2B96488EBCFCEA29 - method: GET - uri: https://search9767122e.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF10" - headers: - cache-control: - - no-cache - content-length: - - '5' - content-type: - - text/plain - date: - - Wed, 29 Apr 2020 23:19:31 GMT - elapsed-time: - - '3' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - e19ea206-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C2268A70B7F246FB2B96488EBCFCEA29 - method: GET - uri: https://search9767122e.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 29 Apr 2020 23:19:31 GMT - elapsed-time: - - '6' - expires: - - '-1' - pragma: - - no-cache - request-id: - - e1a5a1b4-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C2268A70B7F246FB2B96488EBCFCEA29 - method: GET - uri: https://search9767122e.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good - hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '410' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:31 GMT - elapsed-time: - - '10' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - e1aca52c-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_or_upload_documents.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_or_upload_documents.yaml deleted file mode 100644 index a2f99cbae4a1d..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_merge_or_upload_documents.yaml +++ /dev/null @@ -1,192 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "mergeOrUpload"}, - {"hotelId": "4", "rating": 2, "@search.action": "mergeOrUpload"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '146' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 8AAFBCAFAC7EBBE2BEB172384549698B - method: POST - uri: https://searchbc7412f9.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: - - no-cache - content-length: - - '140' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:45 GMT - elapsed-time: - - '441' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - e9daa5aa-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 8AAFBCAFAC7EBBE2BEB172384549698B - method: GET - uri: https://searchbc7412f9.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF11" - headers: - cache-control: - - no-cache - content-length: - - '5' - content-type: - - text/plain - date: - - Wed, 29 Apr 2020 23:19:48 GMT - elapsed-time: - - '5' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ec0db7a4-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 8AAFBCAFAC7EBBE2BEB172384549698B - method: GET - uri: https://searchbc7412f9.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"1000","hotelName":null,"description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":1,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '225' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:48 GMT - elapsed-time: - - '7' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ec14df8e-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 8AAFBCAFAC7EBBE2BEB172384549698B - method: GET - uri: https://searchbc7412f9.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good - hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '410' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:19:48 GMT - elapsed-time: - - '5' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ec1c06ba-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_suggest.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_suggest.yaml deleted file mode 100644 index 476b450221dfd..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_suggest.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: '{"search": "mot", "suggesterName": "sg"}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '40' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 695188929E18C58655D330646534780F - method: POST - uri: https://searcha7cc0b96.search.windows.net/indexes('drgqefsg')/docs/search.post.suggest?api-version=2020-06-30 - response: - body: - string: '{"value":[{"@search.text":"Cheapest hotel in town. Infact, a motel.","hotelId":"2"},{"@search.text":"Secret - Point Motel","hotelId":"9"}]}' - headers: - cache-control: - - no-cache - content-length: - - '137' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:20:00 GMT - elapsed-time: - - '260' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - f2a7b18c-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_upload_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_upload_documents_existing.yaml deleted file mode 100644 index 7b65eb4b1e8ee..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_upload_documents_existing.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure - Inn", "@search.action": "upload"}, {"hotelId": "3", "rating": 4, "rooms": [], - "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '214' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 614F11610EB5311453B55AFF2AE5B215 - method: POST - uri: https://searchbe2a1314.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"3","status":true,"errorMessage":null,"statusCode":200}]}' - headers: - cache-control: - - no-cache - content-length: - - '140' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:20:12 GMT - elapsed-time: - - '93' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - f9d863c0-8a6f-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_upload_documents_new.yaml b/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_upload_documents_new.yaml deleted file mode 100644 index 5b45291f26afa..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_index_live.test_upload_documents_new.yaml +++ /dev/null @@ -1,192 +0,0 @@ -interactions: -- request: - body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure - Inn", "@search.action": "upload"}, {"hotelId": "1001", "rating": 4, "rooms": - [], "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '217' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 21A4500B93DEC39E920E11ED8C2B1C48 - method: POST - uri: https://search62f510f3.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 - response: - body: - string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"1001","status":true,"errorMessage":null,"statusCode":201}]}' - headers: - cache-control: - - no-cache - content-length: - - '143' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:20:23 GMT - elapsed-time: - - '98' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 0042c9da-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 21A4500B93DEC39E920E11ED8C2B1C48 - method: GET - uri: https://search62f510f3.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 - response: - body: - string: "\uFEFF12" - headers: - cache-control: - - no-cache - content-length: - - '5' - content-type: - - text/plain - date: - - Wed, 29 Apr 2020 23:20:26 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 0234a56a-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 21A4500B93DEC39E920E11ED8C2B1C48 - method: GET - uri: https://search62f510f3.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"1000","hotelName":"Azure Inn","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":5,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '232' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:20:26 GMT - elapsed-time: - - '8' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 023bd038-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=none - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 21A4500B93DEC39E920E11ED8C2B1C48 - method: GET - uri: https://search62f510f3.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 - response: - body: - string: '{"hotelId":"1001","hotelName":"Redmond Hotel","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":4,"location":null,"address":null,"rooms":[]}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; odata.metadata=none - date: - - Wed, 29 Apr 2020 23:20:26 GMT - elapsed-time: - - '8' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 02438ad0-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document.yaml new file mode 100644 index 0000000000000..4a3db7b7a6ac8 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document.yaml @@ -0,0 +1,490 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('1')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1","hotelName":"Fancy Stay","description":"Best hotel in + town if you like luxury hotels. They have an amazing infinity pool, a spa, + and a really helpful concierge. The location is perfect -- right downtown, + close to all the tourist attractions. We highly recommend this hotel.","descriptionFr":"Meilleur + h\u00f4tel en ville si vous aimez les h\u00f4tels de luxe. Ils ont une magnifique + piscine \u00e0 d\u00e9bordement, un spa et un concierge tr\u00e8s utile. L''emplacement + est parfait \u2013 en plein centre, \u00e0 proximit\u00e9 de toutes les attractions + touristiques. Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '940' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:01 GMT + elapsed-time: + - '208' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7d988a4b-e962-11ea-b8ad-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('2')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"2","hotelName":"Roach Motel","description":"Cheapest hotel + in town. Infact, a motel.","descriptionFr":"H\u00f4tel le moins cher en ville. + Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '463' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:01 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7e3772ab-e962-11ea-969b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular + hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '432' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:01 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7e5bb3ed-e962-11ea-a858-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:01 GMT + elapsed-time: + - '4' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7e7b2d1b-e962-11ea-89f0-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('5')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"5","hotelName":"Comfy Place","description":"Another good + hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '412' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:01 GMT + elapsed-time: + - '6' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7e931706-e962-11ea-b27a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('6')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"6","hotelName":null,"description":"Surprisingly expensive. + Model suites have an ocean-view.","descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '279' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:01 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7eaedc36-e962-11ea-a56d-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('7')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"7","hotelName":"Modern Stay","description":"Modern architecture, + very polite staff and very clean. Also very affordable.","descriptionFr":"Architecture + moderne, personnel poli et tr\u00e8s propre. Aussi tr\u00e8s abordable.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '390' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:02 GMT + elapsed-time: + - '4' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7ecdd47a-e962-11ea-85c5-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('8')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"8","hotelName":null,"description":"Has some road noise + and is next to the very police station. Bathrooms had morel coverings.","descriptionFr":"Il + y a du bruit de la route et se trouve \u00e0 c\u00f4t\u00e9 de la station + de police. Les salles de bain avaient des rev\u00eatements de morilles.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '459' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:02 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7eeff50f-e962-11ea-8899-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('9')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"9","hotelName":"Secret Point Motel","description":"The + hotel is ideally located on the main commercial artery of the city in the + heart of New York. A few minutes away is Time''s Square and the historic centre + of the city, as well as other places of interest that make New York one of + America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}' + headers: + cache-control: + - no-cache + content-length: + - '1664' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:02 GMT + elapsed-time: + - '12' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7f1141cc-e962-11ea-a5d3-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcca2132f.search.windows.net/indexes('drgqefsg')/docs('10')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"10","hotelName":"Countryside Hotel","description":"Save + up to 50% off traditional hotels. Free WiFi, great location near downtown, + full kitchen, washer & dryer, 24/7 support, bowling alley, fitness center + and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 50% sur les h\u00f4tels + traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 pr\u00e8s du centre-ville, + cuisine compl\u00e8te, laveuse & s\u00e9cheuse, support 24/7, bowling, centre + de fitness et plus encore.","category":"Budget","tags":["24-hour front desk + service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]}' + headers: + cache-control: + - no-cache + content-length: + - '1406' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:13:02 GMT + elapsed-time: + - '4' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7f3679bc-e962-11ea-938d-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document_count.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document_count.yaml new file mode 100644 index 0000000000000..4f0442cfd2740 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document_count.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search485f15b7.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Fri, 28 Aug 2020 19:13:22 GMT + elapsed-time: + - '98' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 89f16692-e962-11ea-b421-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document_missing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document_missing.yaml new file mode 100644 index 0000000000000..ae751f0fbc4f9 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.test_get_document_missing.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search751b1688.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 28 Aug 2020 19:13:40 GMT + elapsed-time: + - '82' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 95396864-e962-11ea-a90a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_delete_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_delete_documents_existing.yaml new file mode 100644 index 0000000000000..08552c5224ad7 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_delete_documents_existing.yaml @@ -0,0 +1,213 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf7dc1cbb.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf7dc1cbb.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B92C9EBB1D5\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '6227' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 20:41:58 GMT + elapsed-time: + - '2176' + etag: + - W/"0x8D84B92C9EBB1D5" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - e8effd63-e96e-11ea-9300-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"value": [{"hotelId": "3", "@search.action": "delete"}, {"hotelId": "4", + "@search.action": "delete"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '103' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchf7dc1cbb.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '137' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:42:00 GMT + elapsed-time: + - '25' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - eb19fdbf-e96e-11ea-b3b9-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf7dc1cbb.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF8" + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - text/plain + date: + - Fri, 28 Aug 2020 20:42:04 GMT + elapsed-time: + - '62' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - edfeb4b8-e96e-11ea-b383-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf7dc1cbb.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 28 Aug 2020 20:42:04 GMT + elapsed-time: + - '12' + expires: + - '-1' + pragma: + - no-cache + request-id: + - ee86cbc8-e96e-11ea-8152-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf7dc1cbb.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 28 Aug 2020 20:42:04 GMT + elapsed-time: + - '4' + expires: + - '-1' + pragma: + - no-cache + request-id: + - ee9a27fe-e96e-11ea-9ed4-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_delete_documents_missing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_delete_documents_missing.yaml new file mode 100644 index 0000000000000..b42f6a473add8 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_delete_documents_missing.yaml @@ -0,0 +1,213 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchdb131c4a.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchdb131c4a.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B92DEF5046F\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '6227' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 20:42:31 GMT + elapsed-time: + - '39' + etag: + - W/"0x8D84B92DEF5046F" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - fda539e7-e96e-11ea-8fab-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"value": [{"hotelId": "1000", "@search.action": "delete"}, {"hotelId": + "4", "@search.action": "delete"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '106' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchdb131c4a.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '140' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:42:32 GMT + elapsed-time: + - '17' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ff300b1b-e96e-11ea-94f3-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchdb131c4a.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF9" + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - text/plain + date: + - Fri, 28 Aug 2020 20:42:36 GMT + elapsed-time: + - '69' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 017533a8-e96f-11ea-a4c3-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchdb131c4a.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 28 Aug 2020 20:42:37 GMT + elapsed-time: + - '11' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 0230feba-e96f-11ea-909b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchdb131c4a.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 28 Aug 2020 20:42:37 GMT + elapsed-time: + - '4' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 027898fb-e96f-11ea-9509-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_documents_existing.yaml new file mode 100644 index 0000000000000..909ec984a51ba --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_documents_existing.yaml @@ -0,0 +1,231 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchdbf71c58.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchdbf71c58.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B92F07E293F\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '6227' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 20:42:58 GMT + elapsed-time: + - '69' + etag: + - W/"0x8D84B92F07E293F" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 0ea42fe8-e96f-11ea-8c56-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"value": [{"hotelId": "3", "rating": 1, "@search.action": "merge"}, {"hotelId": + "4", "rating": 2, "@search.action": "merge"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchdbf71c58.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '137' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:43:00 GMT + elapsed-time: + - '155' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 0f25e80f-e96f-11ea-9cf2-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchdbf71c58.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Fri, 28 Aug 2020 20:43:04 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 12284916-e96f-11ea-a99a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchdbf71c58.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular + hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '432' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:43:04 GMT + elapsed-time: + - '11' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 1292785e-e96f-11ea-b82b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchdbf71c58.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:43:04 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 12ac19ee-e96f-11ea-b6e9-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_documents_missing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_documents_missing.yaml new file mode 100644 index 0000000000000..941069d38e89c --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_documents_missing.yaml @@ -0,0 +1,223 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchbf911be7.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchbf911be7.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B92FF77ED9C\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '6227' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 20:43:25 GMT + elapsed-time: + - '1216' + etag: + - W/"0x8D84B92FF77ED9C" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 1da8fcc8-e96f-11ea-b4c1-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "merge"}, + {"hotelId": "4", "rating": 2, "@search.action": "merge"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchbf911be7.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":false,"errorMessage":"Document not + found.","statusCode":404},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '158' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:43:26 GMT + elapsed-time: + - '74' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 1f01302b-e96f-11ea-975b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 207 + message: Multi-Status +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchbf911be7.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Fri, 28 Aug 2020 20:43:31 GMT + elapsed-time: + - '84' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 217311c2-e96f-11ea-8cbd-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchbf911be7.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 28 Aug 2020 20:43:31 GMT + elapsed-time: + - '3' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 226c2217-e96f-11ea-8e61-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchbf911be7.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:43:31 GMT + elapsed-time: + - '8' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 22889e4c-e96f-11ea-9cf6-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_or_upload_documents.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_or_upload_documents.yaml new file mode 100644 index 0000000000000..74b47a5a5c45e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_merge_or_upload_documents.yaml @@ -0,0 +1,230 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf8101cb2.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf8101cb2.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B931167FD48\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '6227' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 20:43:54 GMT + elapsed-time: + - '52' + etag: + - W/"0x8D84B931167FD48" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 2fdb0882-e96f-11ea-9e11-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "mergeOrUpload"}, + {"hotelId": "4", "rating": 2, "@search.action": "mergeOrUpload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '146' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchf8101cb2.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '140' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:43:54 GMT + elapsed-time: + - '155' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 304c67bb-e96f-11ea-9b98-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf8101cb2.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF11" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Fri, 28 Aug 2020 20:43:58 GMT + elapsed-time: + - '4' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 32738141-e96f-11ea-b25c-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf8101cb2.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1000","hotelName":null,"description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":1,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '225' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:43:58 GMT + elapsed-time: + - '21' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 32b755b6-e96f-11ea-943c-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf8101cb2.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:43:58 GMT + elapsed-time: + - '7' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 32c9d397-e96f-11ea-9254-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_upload_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_upload_documents_existing.yaml new file mode 100644 index 0000000000000..adf35f4767684 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_upload_documents_existing.yaml @@ -0,0 +1,142 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf9c61ccd.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf9c61ccd.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B9326EE10B7\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '6227' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 20:44:31 GMT + elapsed-time: + - '21' + etag: + - W/"0x8D84B9326EE10B7" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 45952eb4-e96f-11ea-895b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure + Inn", "@search.action": "upload"}, {"hotelId": "3", "rating": 4, "rooms": [], + "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '214' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchf9c61ccd.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"3","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '140' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:44:32 GMT + elapsed-time: + - '22' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 465b18ff-e96f-11ea-9270-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf9c61ccd.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF11" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Fri, 28 Aug 2020 20:44:37 GMT + elapsed-time: + - '94' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 4931f02e-e96f-11ea-9e49-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_upload_documents_new.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_upload_documents_new.yaml new file mode 100644 index 0000000000000..b1f09c582082a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_batching_client_live.test_upload_documents_new.yaml @@ -0,0 +1,230 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search6df41aac.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search6df41aac.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B933AB5F608\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '6227' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 20:45:03 GMT + elapsed-time: + - '25' + etag: + - W/"0x8D84B933AB5F608" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 58f60193-e96f-11ea-afa0-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure + Inn", "@search.action": "upload"}, {"hotelId": "1001", "rating": 4, "rooms": + [], "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '217' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search6df41aac.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"1001","status":true,"errorMessage":null,"statusCode":201}]}' + headers: + cache-control: + - no-cache + content-length: + - '143' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:45:04 GMT + elapsed-time: + - '113' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 59611a4c-e96f-11ea-bcff-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search6df41aac.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF12" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Fri, 28 Aug 2020 20:45:10 GMT + elapsed-time: + - '8' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 5bd43036-e96f-11ea-a4ff-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search6df41aac.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1000","hotelName":"Azure Inn","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":5,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '232' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:45:10 GMT + elapsed-time: + - '21' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 5d97484a-e96f-11ea-93b4-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search6df41aac.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1001","hotelName":"Redmond Hotel","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":4,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '236' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 20:45:11 GMT + elapsed-time: + - '77' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 5df13bd2-e96f-11ea-b407-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_delete_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_delete_documents_existing.yaml new file mode 100644 index 0000000000000..0350ef18971fa --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_delete_documents_existing.yaml @@ -0,0 +1,167 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "3", "@search.action": "delete"}, {"hotelId": "4", + "@search.action": "delete"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '103' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searche0dc1c73.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '137' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:55:47 GMT + elapsed-time: + - '145' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 5755e359-dcf7-11ea-9211-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche0dc1c73.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF8" + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - text/plain + date: + - Wed, 12 Aug 2020 23:55:50 GMT + elapsed-time: + - '21' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 5976a3e4-dcf7-11ea-a56a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche0dc1c73.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 12 Aug 2020 23:55:50 GMT + elapsed-time: + - '25' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 5989a4f3-dcf7-11ea-bacd-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche0dc1c73.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 12 Aug 2020 23:55:50 GMT + elapsed-time: + - '4' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 599c4650-dcf7-11ea-b655-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_delete_documents_missing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_delete_documents_missing.yaml new file mode 100644 index 0000000000000..5b0425ff1b735 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_delete_documents_missing.yaml @@ -0,0 +1,167 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "@search.action": "delete"}, {"hotelId": + "4", "@search.action": "delete"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '106' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchc45b1c02.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '140' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:01 GMT + elapsed-time: + - '81' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 603af76b-dcf7-11ea-b81b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchc45b1c02.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF9" + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - text/plain + date: + - Wed, 12 Aug 2020 23:56:04 GMT + elapsed-time: + - '17' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 6247c1e6-dcf7-11ea-a6d6-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchc45b1c02.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 12 Aug 2020 23:56:04 GMT + elapsed-time: + - '22' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 62582570-dcf7-11ea-89fe-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchc45b1c02.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 12 Aug 2020 23:56:04 GMT + elapsed-time: + - '4' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 6269d480-dcf7-11ea-ab32-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_documents_existing.yaml new file mode 100644 index 0000000000000..57aa6813f6e65 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_documents_existing.yaml @@ -0,0 +1,185 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "3", "rating": 1, "@search.action": "merge"}, {"hotelId": + "4", "rating": 2, "@search.action": "merge"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchc53f1c10.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"3","status":true,"errorMessage":null,"statusCode":200},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '137' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:18 GMT + elapsed-time: + - '177' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 6a07aceb-dcf7-11ea-8e83-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchc53f1c10.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Wed, 12 Aug 2020 23:56:21 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 6c18f9ab-dcf7-11ea-a192-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchc53f1c10.search.windows.net/indexes('drgqefsg')/docs('3')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"3","hotelName":"EconoStay","description":"Very popular + hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '432' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:21 GMT + elapsed-time: + - '15' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 6c28c6ec-dcf7-11ea-b1ba-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchc53f1c10.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:21 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 6c3b6d0f-dcf7-11ea-b6e6-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_documents_missing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_documents_missing.yaml new file mode 100644 index 0000000000000..dc7289c466997 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_documents_missing.yaml @@ -0,0 +1,177 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "merge"}, + {"hotelId": "4", "rating": 2, "@search.action": "merge"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searcha9211b9f.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":false,"errorMessage":"Document not + found.","statusCode":404},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '158' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:34 GMT + elapsed-time: + - '30' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 73e0a912-dcf7-11ea-bfac-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 207 + message: Multi-Status +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searcha9211b9f.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF10" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Wed, 12 Aug 2020 23:56:38 GMT + elapsed-time: + - '19' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 75db144b-dcf7-11ea-a560-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searcha9211b9f.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 12 Aug 2020 23:56:38 GMT + elapsed-time: + - '4' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 75f02207-dcf7-11ea-8e9b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searcha9211b9f.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:38 GMT + elapsed-time: + - '14' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 75fc1d3b-dcf7-11ea-b7a2-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_or_upload_documents.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_or_upload_documents.yaml new file mode 100644 index 0000000000000..fb8d1f5dbfab0 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_merge_or_upload_documents.yaml @@ -0,0 +1,184 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "rating": 1, "@search.action": "mergeOrUpload"}, + {"hotelId": "4", "rating": 2, "@search.action": "mergeOrUpload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '146' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searche1101c6a.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"4","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '140' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:50 GMT + elapsed-time: + - '157' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7d46247e-dcf7-11ea-9730-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche1101c6a.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF11" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Wed, 12 Aug 2020 23:56:53 GMT + elapsed-time: + - '4' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7f59fc6a-dcf7-11ea-82f1-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche1101c6a.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1000","hotelName":null,"description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":1,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '225' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:54 GMT + elapsed-time: + - '7' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7f6b4987-dcf7-11ea-9bc2-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche1101c6a.search.windows.net/indexes('drgqefsg')/docs('4')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"4","hotelName":"Express Rooms","description":"Pretty good + hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":2,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:56:54 GMT + elapsed-time: + - '6' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7f7660b7-dcf7-11ea-bc96-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_upload_documents_existing.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_upload_documents_existing.yaml new file mode 100644 index 0000000000000..23b9db33f8828 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_upload_documents_existing.yaml @@ -0,0 +1,52 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure + Inn", "@search.action": "upload"}, {"hotelId": "3", "rating": 4, "rooms": [], + "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '214' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searche2c61c85.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"3","status":true,"errorMessage":null,"statusCode":200}]}' + headers: + cache-control: + - no-cache + content-length: + - '140' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:57:09 GMT + elapsed-time: + - '114' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 885e579b-dcf7-11ea-8868-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_upload_documents_new.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_upload_documents_new.yaml new file mode 100644 index 0000000000000..e8f76df327e7d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.test_upload_documents_new.yaml @@ -0,0 +1,184 @@ +interactions: +- request: + body: '{"value": [{"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure + Inn", "@search.action": "upload"}, {"hotelId": "1001", "rating": 4, "rooms": + [], "hotelName": "Redmond Hotel", "@search.action": "upload"}]}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '217' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search585c1a64.search.windows.net/indexes('drgqefsg')/docs/search.index?api-version=2020-06-30 + response: + body: + string: '{"value":[{"key":"1000","status":true,"errorMessage":null,"statusCode":201},{"key":"1001","status":true,"errorMessage":null,"statusCode":201}]}' + headers: + cache-control: + - no-cache + content-length: + - '143' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:57:21 GMT + elapsed-time: + - '85' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 8ff71425-dcf7-11ea-a2b8-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search585c1a64.search.windows.net/indexes('drgqefsg')/docs/$count?api-version=2020-06-30 + response: + body: + string: "\uFEFF12" + headers: + cache-control: + - no-cache + content-length: + - '5' + content-type: + - text/plain + date: + - Wed, 12 Aug 2020 23:57:25 GMT + elapsed-time: + - '4' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 91f8f6ac-dcf7-11ea-a652-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search585c1a64.search.windows.net/indexes('drgqefsg')/docs('1000')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1000","hotelName":"Azure Inn","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":5,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '232' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:57:25 GMT + elapsed-time: + - '14' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 920c831a-dcf7-11ea-a4eb-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search585c1a64.search.windows.net/indexes('drgqefsg')/docs('1001')?api-version=2020-06-30 + response: + body: + string: '{"hotelId":"1001","hotelName":"Redmond Hotel","description":null,"descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":4,"location":null,"address":null,"rooms":[]}' + headers: + cache-control: + - no-cache + content-length: + - '236' + content-type: + - application/json; odata.metadata=none + date: + - Wed, 12 Aug 2020 23:57:25 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 921be5a0-dcf7-11ea-bdb1-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_autocomplete.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_autocomplete.yaml new file mode 100644 index 0000000000000..06b6e94ccfcfc --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_autocomplete.yaml @@ -0,0 +1,50 @@ +interactions: +- request: + body: '{"search": "mot", "suggesterName": "sg"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '40' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searche2a413b7.search.windows.net/indexes('drgqefsg')/docs/search.post.autocomplete?api-version=2020-06-30 + response: + body: + string: '{"value":[{"text":"motel","queryPlusText":"motel"}]}' + headers: + cache-control: + - no-cache + content-length: + - '52' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:25:09 GMT + elapsed-time: + - '131' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 2faa6e2b-e964-11ea-8be1-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_counts.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_counts.yaml new file mode 100644 index 0000000000000..5c00995047c1c --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_counts.yaml @@ -0,0 +1,184 @@ +interactions: +- request: + body: '{"search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search498015b5.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: + - no-cache + content-length: + - '5923' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:25:26 GMT + elapsed-time: + - '119' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 3a320e18-e964-11ea-8510-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"count": true, "search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '34' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search498015b5.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"@odata.count":7,"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: + - no-cache + content-length: + - '5940' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:25:26 GMT + elapsed-time: + - '20' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 3a725111-e964-11ea-9fb6-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_coverage.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_coverage.yaml new file mode 100644 index 0000000000000..8c7a0975dc64a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_coverage.yaml @@ -0,0 +1,184 @@ +interactions: +- request: + body: '{"search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search75b81665.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: + - no-cache + content-length: + - '5923' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:25:44 GMT + elapsed-time: + - '140' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 448c76f4-e964-11ea-9b72-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"minimumCoverage": 50.0, "search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '44' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search75b81665.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"@search.coverage":100.0,"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: + - no-cache + content-length: + - '5948' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:25:44 GMT + elapsed-time: + - '7' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 44db5396-e964-11ea-af6a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_facets_none.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_facets_none.yaml new file mode 100644 index 0000000000000..d23554d1196a9 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_facets_none.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: '{"search": "WiFi", "select": "hotelName,category,description"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '62' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchbad5179e.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":2.3832736,"hotelName":"Countryside Hotel","description":"Save + up to 50% off traditional hotels. Free WiFi, great location near downtown, + full kitchen, washer & dryer, 24/7 support, bowling alley, fitness center + and more.","category":"Budget"},{"@search.score":1.0225849,"hotelName":"EconoStay","description":"Very + popular hotel in town","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Express + Rooms","description":"Pretty good hotel","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Comfy + Place","description":"Another good hotel","category":"Budget"},{"@search.score":0.7987757,"hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","category":"Luxury"}]}' + headers: + cache-control: + - no-cache + content-length: + - '929' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:26:03 GMT + elapsed-time: + - '91' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 508c5e04-e964-11ea-82ec-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_facets_result.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_facets_result.yaml new file mode 100644 index 0000000000000..6325d2aafbf89 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_facets_result.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: '{"facets": ["category"], "search": "WiFi", "select": "hotelName,category,description"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '86' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searcheb87188d.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"@search.facets":{"category":[{"count":4,"value":"Budget"},{"count":1,"value":"Luxury"}]},"value":[{"@search.score":2.3832736,"hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","category":"Budget"},{"@search.score":1.0225849,"hotelName":"EconoStay","description":"Very + popular hotel in town","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Express + Rooms","description":"Pretty good hotel","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Comfy + Place","description":"Another good hotel","category":"Budget"},{"@search.score":0.7987757,"hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","category":"Luxury"}]}' + headers: + cache-control: + - no-cache + content-length: + - '1019' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:26:21 GMT + elapsed-time: + - '187' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 5a79f51d-e964-11ea-b7f0-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_filter.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_filter.yaml new file mode 100644 index 0000000000000..50c752f357ff1 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_filter.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: '{"filter": "category eq ''Budget''", "orderby": "hotelName desc", "search": + "WiFi", "select": "hotelName,category,description"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '125' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search4943159f.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":1.0225849,"hotelName":"Express Rooms","description":"Pretty + good hotel","category":"Budget"},{"@search.score":1.0225849,"hotelName":"EconoStay","description":"Very + popular hotel in town","category":"Budget"},{"@search.score":2.3832736,"hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","category":"Budget"},{"@search.score":1.0225849,"hotelName":"Comfy + Place","description":"Another good hotel","category":"Budget"}]}' + headers: + cache-control: + - no-cache + content-length: + - '606' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:26:38 GMT + elapsed-time: + - '134' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 6569e0ee-e964-11ea-88e5-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_simple.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_simple.yaml new file mode 100644 index 0000000000000..7c12806cfbe95 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_get_search_simple.yaml @@ -0,0 +1,160 @@ +interactions: +- request: + body: '{"search": "hotel"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search498a15a3.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":2.245087,"hotelId":"10","hotelName":"Countryside + Hotel","description":"Save up to 50% off traditional hotels. Free WiFi, great + location near downtown, full kitchen, washer & dryer, 24/7 support, bowling + alley, fitness center and more.","descriptionFr":"\u00c9conomisez jusqu''\u00e0 + 50% sur les h\u00f4tels traditionnels. WiFi gratuit, tr\u00e8s bien situ\u00e9 + pr\u00e8s du centre-ville, cuisine compl\u00e8te, laveuse & s\u00e9cheuse, + support 24/7, bowling, centre de fitness et plus encore.","category":"Budget","tags":["24-hour + front desk service","coffee in lobby","restaurant"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1999-09-06T00:00:00Z","rating":3,"location":{"type":"Point","coordinates":[-78.940483,35.90416],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"6910 + Fayetteville Rd","city":"Durham","stateProvince":"NC","country":"USA","postalCode":"27713"},"rooms":[{"description":"Suite, + 1 King Bed (Amenities)","descriptionFr":"Suite, 1 tr\u00e8s grand lit (Services)","type":"Suite","baseRate":2.44,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["coffee maker"]},{"description":"Budget + Room, 1 Queen Bed (Amenities)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (Services)","type":"Budget Room","baseRate":7.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":false,"tags":["coffee maker"]}]},{"@search.score":1.778081,"hotelId":"3","hotelName":"EconoStay","description":"Very + popular hotel in town","descriptionFr":"H\u00f4tel le plus populaire en ville","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,46.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"4","hotelName":"Express + Rooms","description":"Pretty good hotel","descriptionFr":"Assez bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"1995-07-01T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.778081,"hotelId":"5","hotelName":"Comfy + Place","description":"Another good hotel","descriptionFr":"Un autre bon h\u00f4tel","category":"Budget","tags":["wifi","budget"],"parkingIncluded":true,"smokingAllowed":false,"lastRenovationDate":"2012-08-12T00:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-122.131577,48.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.5749159,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":1.4634744,"hotelId":"1","hotelName":"Fancy + Stay","description":"Best hotel in town if you like luxury hotels. They have + an amazing infinity pool, a spa, and a really helpful concierge. The location + is perfect -- right downtown, close to all the tourist attractions. We highly + recommend this hotel.","descriptionFr":"Meilleur h\u00f4tel en ville si vous + aimez les h\u00f4tels de luxe. Ils ont une magnifique piscine \u00e0 d\u00e9bordement, + un spa et un concierge tr\u00e8s utile. L''emplacement est parfait \u2013 + en plein centre, \u00e0 proximit\u00e9 de toutes les attractions touristiques. + Nous recommandons fortement cet h\u00f4tel.","category":"Luxury","tags":["pool","view","wifi","concierge"],"parkingIncluded":false,"smokingAllowed":false,"lastRenovationDate":"2010-06-27T00:00:00Z","rating":5,"location":{"type":"Point","coordinates":[-122.131577,47.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.5496142,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: + - no-cache + content-length: + - '5923' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:26:58 GMT + elapsed-time: + - '98' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 704d6f1b-e964-11ea-b133-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"search": "motel"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search498a15a3.search.windows.net/indexes('drgqefsg')/docs/search.post.search?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.score":8.376183,"hotelId":"2","hotelName":"Roach + Motel","description":"Cheapest hotel in town. Infact, a motel.","descriptionFr":"H\u00f4tel + le moins cher en ville. Infact, un motel.","category":"Budget","tags":["motel","budget"],"parkingIncluded":true,"smokingAllowed":true,"lastRenovationDate":"1982-04-28T00:00:00Z","rating":1,"location":{"type":"Point","coordinates":[-122.131577,49.678581],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":null,"rooms":[]},{"@search.score":0.8858137,"hotelId":"9","hotelName":"Secret + Point Motel","description":"The hotel is ideally located on the main commercial + artery of the city in the heart of New York. A few minutes away is Time''s + Square and the historic centre of the city, as well as other places of interest + that make New York one of America''s most attractive and cosmopolitan cities.","descriptionFr":"L''h\u00f4tel + est id\u00e9alement situ\u00e9 sur la principale art\u00e8re commerciale de + la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place + du temps et le centre historique de la ville, ainsi que d''autres lieux d''int\u00e9r\u00eat + qui font de New York l''une des villes les plus attractives et cosmopolites + de l''Am\u00e9rique.","category":"Boutique","tags":["pool","air conditioning","concierge"],"parkingIncluded":false,"smokingAllowed":true,"lastRenovationDate":"1970-01-18T05:00:00Z","rating":4,"location":{"type":"Point","coordinates":[-73.975403,40.760586],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"address":{"streetAddress":"677 + 5th Ave","city":"New York","stateProvince":"NY","country":"USA","postalCode":"10022"},"rooms":[{"description":"Budget + Room, 1 Queen Bed (Cityside)","descriptionFr":"Chambre \u00c9conomique, 1 + grand lit (c\u00f4t\u00e9 ville)","type":"Budget Room","baseRate":9.69,"bedOptions":"1 + Queen Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd"]},{"description":"Budget + Room, 1 King Bed (Mountain View)","descriptionFr":"Chambre \u00c9conomique, + 1 tr\u00e8s grand lit (Mountain View)","type":"Budget Room","baseRate":8.09,"bedOptions":"1 + King Bed","sleepsCount":2,"smokingAllowed":true,"tags":["vcr/dvd","jacuzzi + tub"]}]}]}' + headers: + cache-control: + - no-cache + content-length: + - '2191' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:26:58 GMT + elapsed-time: + - '11' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 70d09553-e964-11ea-8ff7-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_suggest.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_suggest.yaml new file mode 100644 index 0000000000000..d1193dd63436b --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.test_suggest.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{"search": "mot", "suggesterName": "sg"}' + headers: + Accept: + - application/json;odata.metadata=none + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '40' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search846911a7.search.windows.net/indexes('drgqefsg')/docs/search.post.suggest?api-version=2020-06-30 + response: + body: + string: '{"value":[{"@search.text":"Cheapest hotel in town. Infact, a motel.","hotelId":"2"},{"@search.text":"Secret + Point Motel","hotelId":"9"}]}' + headers: + cache-control: + - no-cache + content-length: + - '137' + content-type: + - application/json; odata.metadata=none + date: + - Fri, 28 Aug 2020 19:27:14 GMT + elapsed-time: + - '151' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7a06c269-e964-11ea-aa71-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_datasource.yaml new file mode 100644 index 0000000000000..b208bc815f61a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_datasource.yaml @@ -0,0 +1,54 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search54bc1a2e.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search54bc1a2e.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B8876DED987\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:27:55 GMT + elapsed-time: + - '97' + etag: + - W/"0x8D84B8876DED987" + expires: + - '-1' + location: + - https://search54bc1a2e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 92a2084f-e964-11ea-b328-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_or_update_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_or_update_datasource.yaml new file mode 100644 index 0000000000000..bd9a95234b27b --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_or_update_datasource.yaml @@ -0,0 +1,242 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search715d1e50.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search715d1e50.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88817CDC31\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:13 GMT + elapsed-time: + - '32' + etag: + - W/"0x8D84B88817CDC31" + expires: + - '-1' + location: + - https://search715d1e50.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 9d4657e7-e964-11ea-9be9-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search715d1e50.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search715d1e50.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D84B88817CDC31\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '395' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:13 GMT + elapsed-time: + - '55' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 9d8808ca-e964-11ea-8d15-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search715d1e50.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search715d1e50.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B8881ACA785\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '396' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:13 GMT + elapsed-time: + - '37' + etag: + - W/"0x8D84B8881ACA785" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 9da5ce92-e964-11ea-aeac-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search715d1e50.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search715d1e50.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D84B8881ACA785\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '400' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:13 GMT + elapsed-time: + - '12' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 9db77796-e964-11ea-942f-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search715d1e50.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search715d1e50.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B8881ACA785\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '396' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:13 GMT + elapsed-time: + - '9' + etag: + - W/"0x8D84B8881ACA785" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 9dcaa928-e964-11ea-964a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_or_update_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_or_update_datasource_if_unchanged.yaml new file mode 100644 index 0000000000000..ab52f76cd2322 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_create_or_update_datasource_if_unchanged.yaml @@ -0,0 +1,164 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search2014238a.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search2014238a.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B888B19BAAD\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:29 GMT + elapsed-time: + - '124' + etag: + - W/"0x8D84B888B19BAAD" + expires: + - '-1' + location: + - https://search2014238a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - a6e4b794-e964-11ea-a7d4-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search2014238a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search2014238a.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B888B2B22FF\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '396' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:29 GMT + elapsed-time: + - '32' + etag: + - W/"0x8D84B888B2B22FF" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - a72469f9-e964-11ea-9da1-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"name": "sample-datasource", "description": "changed", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}, "@odata.etag": "\"0x8D84B888B19BAAD\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '385' + Content-Type: + - application/json + If-Match: + - '"0x8D84B888B19BAAD"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search2014238a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:29 GMT + elapsed-time: + - '8' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - a735d62a-e964-11ea-bffa-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource.yaml new file mode 100644 index 0000000000000..f510795dabc2b --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource.yaml @@ -0,0 +1,178 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search549e1a2d.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search549e1a2d.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B8895A20E7D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:46 GMT + elapsed-time: + - '97' + etag: + - W/"0x8D84B8895A20E7D" + expires: + - '-1' + location: + - https://search549e1a2d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - b1692ea0-e964-11ea-bfef-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search549e1a2d.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search549e1a2d.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D84B8895A20E7D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '395' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:46 GMT + elapsed-time: + - '26' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - b1ad828b-e964-11ea-86c4-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search549e1a2d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Fri, 28 Aug 2020 19:28:46 GMT + elapsed-time: + - '21' + expires: + - '-1' + pragma: + - no-cache + request-id: + - b1c348d3-e964-11ea-8df0-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search549e1a2d.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search549e1a2d.search.windows.net/$metadata#datasources","value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '95' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:28:46 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - b1d9e7d4-e964-11ea-803b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource_if_unchanged.yaml new file mode 100644 index 0000000000000..0e4603b23e93a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource_if_unchanged.yaml @@ -0,0 +1,158 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchcd7f1f67.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchcd7f1f67.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88A1F11DDE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:29:07 GMT + elapsed-time: + - '52' + etag: + - W/"0x8D84B88A1F11DDE" + expires: + - '-1' + location: + - https://searchcd7f1f67.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - bdad1a69-e964-11ea-a651-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchcd7f1f67.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchcd7f1f67.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88A20E4824\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '396' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:29:07 GMT + elapsed-time: + - '57' + etag: + - W/"0x8D84B88A20E4824" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - bdfc3647-e964-11ea-9372-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D84B88A1F11DDE"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchcd7f1f67.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:29:07 GMT + elapsed-time: + - '9' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - be19d00f-e964-11ea-9e53-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource_string_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource_string_if_unchanged.yaml new file mode 100644 index 0000000000000..e60daf083be62 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_delete_datasource_string_if_unchanged.yaml @@ -0,0 +1,108 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchb71c225d.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchb71c225d.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88AC866C9F\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:29:25 GMT + elapsed-time: + - '118' + etag: + - W/"0x8D84B88AC866C9F" + expires: + - '-1' + location: + - https://searchb71c225d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - c834fd69-e964-11ea-a76a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", + "credentials": {"connectionString": "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '345' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchb71c225d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchb71c225d.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88ACA12572\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '396' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:29:25 GMT + elapsed-time: + - '53' + etag: + - W/"0x8D84B88ACA12572" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - c896e762-e964-11ea-9119-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_get_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_get_datasource.yaml new file mode 100644 index 0000000000000..a47f3ea45fe1c --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_get_datasource.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search7d318fa.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7d318fa.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88BA035DEF\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '390' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:29:48 GMT + elapsed-time: + - '48' + etag: + - W/"0x8D84B88BA035DEF" + expires: + - '-1' + location: + - https://search7d318fa.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d5a2c7e3-e964-11ea-b2da-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search7d318fa.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search7d318fa.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88BA035DEF\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '390' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:29:48 GMT + elapsed-time: + - '36' + etag: + - W/"0x8D84B88BA035DEF" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d60dc29b-e964-11ea-ba38-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_list_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_list_datasource.yaml new file mode 100644 index 0000000000000..9ea90adaf23fc --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.test_list_datasource.yaml @@ -0,0 +1,150 @@ +interactions: +- request: + body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search22291976.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search22291976.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88C66906AD\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:30:08 GMT + elapsed-time: + - '32' + etag: + - W/"0x8D84B88C66906AD" + expires: + - '-1' + location: + - https://search22291976.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - e1f688ff-e964-11ea-b49c-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "another-sample", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, + "container": {"name": "searchcontainer"}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '316' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search22291976.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search22291976.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D84B88C689B410\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '388' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:30:09 GMT + elapsed-time: + - '34' + etag: + - W/"0x8D84B88C689B410" + expires: + - '-1' + location: + - https://search22291976.search.windows.net/datasources('another-sample')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - e2749f8a-e964-11ea-8e73-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search22291976.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search22291976.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D84B88C689B410\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null},{"@odata.etag":"\"0x8D84B88C66906AD\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '693' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:30:09 GMT + elapsed-time: + - '18' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - e294a766-e964-11ea-895f-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_analyze_text.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_analyze_text.yaml new file mode 100644 index 0000000000000..ff9515db63d19 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_analyze_text.yaml @@ -0,0 +1,50 @@ +interactions: +- request: + body: '{"text": "One''s ", "analyzer": "standard.lucene"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '55' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchcf75135f.search.windows.net/indexes('drgqefsg')/search.analyze?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchcf75135f.search.windows.net/$metadata#Microsoft.Azure.Search.V2020_06_30.AnalyzeResult","tokens":[{"token":"one''s","startOffset":0,"endOffset":5,"position":0},{"token":"two","startOffset":7,"endOffset":10,"position":1}]}' + headers: + cache-control: + - no-cache + content-length: + - '253' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:30:54 GMT + elapsed-time: + - '63' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - fd3894ad-e964-11ea-be66-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_index.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_index.yaml new file mode 100644 index 0000000000000..8fe0d247a58f6 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_index.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}, {"name": "baseRate", "type": "Edm.Double", + "key": false, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}], "scoringProfiles": [{"name": "MyProfile"}], + "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '457' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchce941332.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchce941332.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B88EFD144B7\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '967' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:31:17 GMT + elapsed-time: + - '941' + etag: + - W/"0x8D84B88EFD144B7" + expires: + - '-1' + location: + - https://searchce941332.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 0affa669-e965-11ea-b28b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_or_update_index.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_or_update_index.yaml new file mode 100644 index 0000000000000..e8702242fdae1 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_or_update_index.yaml @@ -0,0 +1,116 @@ +interactions: +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}, {"name": "baseRate", "type": "Edm.Double", + "key": false, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}], "scoringProfiles": [], "corsOptions": + {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '436' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searcha5711754.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha5711754.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B88FBE4789D\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '893' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:31:38 GMT + elapsed-time: + - '860' + etag: + - W/"0x8D84B88FBE4789D" + expires: + - '-1' + location: + - https://searcha5711754.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 16e95f89-e965-11ea-947a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}, {"name": "baseRate", "type": "Edm.Double", + "key": false, "retrievable": true, "searchable": false, "filterable": false, + "sortable": false, "facetable": false}], "scoringProfiles": [{"name": "MyProfile"}], + "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '457' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searcha5711754.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha5711754.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B88FC2D4EC9\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '967' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:31:38 GMT + elapsed-time: + - '148' + etag: + - W/"0x8D84B88FC2D4EC9" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 17f53a78-e965-11ea-a635-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_or_update_indexes_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_or_update_indexes_if_unchanged.yaml new file mode 100644 index 0000000000000..f7e273d34528e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_create_or_update_indexes_if_unchanged.yaml @@ -0,0 +1,167 @@ +interactions: +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [{"name": "MyProfile"}], + "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '302' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search34391d66.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search34391d66.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B890C218005\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '961' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:32:05 GMT + elapsed-time: + - '505' + etag: + - W/"0x8D84B890C218005" + expires: + - '-1' + location: + - https://search34391d66.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 277f5b69-e965-11ea-a881-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [], "corsOptions": + {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '281' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search34391d66.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search34391d66.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B890C58C6C9\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '887' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:32:05 GMT + elapsed-time: + - '142' + etag: + - W/"0x8D84B890C58C6C9" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 2834e6d6-e965-11ea-9c18-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [], "corsOptions": + {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}, "@odata.etag": "\"0x8D84B890C218005\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + If-Match: + - '"0x8D84B890C218005"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search34391d66.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:32:05 GMT + elapsed-time: + - '20' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 2869406d-e965-11ea-8de0-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_delete_indexes.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_delete_indexes.yaml new file mode 100644 index 0000000000000..e8565c55cc735 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_delete_indexes.yaml @@ -0,0 +1,82 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchf61a1409.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Fri, 28 Aug 2020 19:32:26 GMT + elapsed-time: + - '233' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 340274a2-e965-11ea-aa4a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchf61a1409.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf61a1409.search.windows.net/$metadata#indexes","value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '91' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:32:31 GMT + elapsed-time: + - '26' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 377e8065-e965-11ea-846d-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_delete_indexes_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_delete_indexes_if_unchanged.yaml new file mode 100644 index 0000000000000..00bca7a6f2eb0 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_delete_indexes_if_unchanged.yaml @@ -0,0 +1,160 @@ +interactions: +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [{"name": "MyProfile"}], + "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '302' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search1f361943.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search1f361943.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B8927D51380\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '961' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:32:52 GMT + elapsed-time: + - '945' + etag: + - W/"0x8D84B8927D51380" + expires: + - '-1' + location: + - https://search1f361943.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 42c76908-e965-11ea-8779-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "retrievable": true, "searchable": false}, {"name": "baseRate", + "type": "Edm.Double", "retrievable": true}], "scoringProfiles": [], "corsOptions": + {"allowedOrigins": ["*"], "maxAgeInSeconds": 60}}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '281' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search1f361943.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search1f361943.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B892819F149\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '887' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:32:52 GMT + elapsed-time: + - '171' + etag: + - W/"0x8D84B892819F149" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 43e897d6-e965-11ea-8f03-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D84B8927D51380"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search1f361943.search.windows.net/indexes('hotels')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:32:52 GMT + elapsed-time: + - '51' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 442b14d0-e965-11ea-807a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_index.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_index.yaml new file mode 100644 index 0000000000000..1b12027e4af6a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_index.yaml @@ -0,0 +1,48 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search966a11fe.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search966a11fe.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D84B89307E3D31\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}' + headers: + cache-control: + - no-cache + content-length: + - '6227' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:33:11 GMT + elapsed-time: + - '41' + etag: + - W/"0x8D84B89307E3D31" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 4ebd6b05-e965-11ea-8c70-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_index_statistics.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_index_statistics.yaml new file mode 100644 index 0000000000000..ece2ae4206ac1 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_index_statistics.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search783716a8.search.windows.net/indexes('drgqefsg')/search.stats?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search783716a8.search.windows.net/$metadata#Microsoft.Azure.Search.V2020_06_30.IndexStatistics","documentCount":0,"storageSize":0}' + headers: + cache-control: + - no-cache + content-length: + - '157' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:33:36 GMT + elapsed-time: + - '52' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 5d8a83b8-e965-11ea-8e38-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_service_statistics.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_service_statistics.yaml new file mode 100644 index 0000000000000..6666c543577ff --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_get_service_statistics.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searcha71e1781.search.windows.net/servicestats?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searcha71e1781.search.windows.net/$metadata#Microsoft.Azure.Search.V2020_06_30.ServiceStatistics","counters":{"documentCount":{"usage":0,"quota":null},"indexesCount":{"usage":0,"quota":3},"indexersCount":{"usage":0,"quota":3},"dataSourcesCount":{"usage":0,"quota":3},"storageSize":{"usage":0,"quota":52428800},"synonymMaps":{"usage":0,"quota":3},"skillsetCount":{"usage":0,"quota":3}},"limits":{"maxFieldsPerIndex":1000,"maxFieldNestingDepthPerIndex":10,"maxComplexCollectionFieldsPerIndex":40,"maxComplexObjectsInCollectionsPerDocument":3000}}' + headers: + cache-control: + - no-cache + content-length: + - '571' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:33:55 GMT + elapsed-time: + - '87' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 68cc3da4-e965-11ea-a4bb-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_list_indexes.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_list_indexes.yaml new file mode 100644 index 0000000000000..387395227c91c --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_list_indexes.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchcf9c1352.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchcf9c1352.search.windows.net/$metadata#indexes","value":[{"@odata.etag":"\"0x8D84B895C4DD9C9\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null}}]}' + headers: + cache-control: + - no-cache + content-length: + - '6231' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:34:25 GMT + elapsed-time: + - '65' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7adbfe40-e965-11ea-8f02-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_list_indexes_empty.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_list_indexes_empty.yaml new file mode 100644 index 0000000000000..45eaa7b6c665c --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.test_list_indexes_empty.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search4c2f15e0.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search4c2f15e0.search.windows.net/$metadata#indexes","value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '91' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:34:37 GMT + elapsed-time: + - '26' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 82133551-e965-11ea-8df6-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset.yaml new file mode 100644 index 0000000000000..8dd376d7c07dd --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset.yaml @@ -0,0 +1,202 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searche2bf1c71.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche2bf1c71.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89778D5DB7\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:06 GMT + elapsed-time: + - '198' + etag: + - W/"0x8D84B89778D5DB7" + expires: + - '-1' + location: + - https://searche2bf1c71.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 932cd098-e965-11ea-811f-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searche2bf1c71.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche2bf1c71.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B8977AF6ADE\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:06 GMT + elapsed-time: + - '99' + etag: + - W/"0x8D84B8977AF6ADE" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 939a2297-e965-11ea-9d1d-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche2bf1c71.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche2bf1c71.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B8977AF6ADE\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '690' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:06 GMT + elapsed-time: + - '58' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 93ba5fe5-e965-11ea-ac8b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searche2bf1c71.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche2bf1c71.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B8977AF6ADE\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '686' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:06 GMT + elapsed-time: + - '46' + etag: + - W/"0x8D84B8977AF6ADE" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 93d3b42d-e965-11ea-a30e-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset_if_unchanged.yaml new file mode 100644 index 0000000000000..c048192bbe5a7 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset_if_unchanged.yaml @@ -0,0 +1,156 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search792321ab.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search792321ab.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89836B2014\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:25 GMT + elapsed-time: + - '202' + etag: + - W/"0x8D84B89836B2014" + expires: + - '-1' + location: + - https://search792321ab.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 9eeba273-e965-11ea-a996-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search792321ab.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search792321ab.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B898388E6B2\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:25 GMT + elapsed-time: + - '60' + etag: + - W/"0x8D84B898388E6B2" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 9f76b756-e965-11ea-ad06-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search792321ab.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search792321ab.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B898388E6B2\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '690' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:25 GMT + elapsed-time: + - '113' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 9f93fb1b-e965-11ea-9133-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset_inplace.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset_inplace.yaml new file mode 100644 index 0000000000000..bbd2606e9280a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_or_update_skillset_inplace.yaml @@ -0,0 +1,202 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchd4ef1fac.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd4ef1fac.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89902C4021\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:47 GMT + elapsed-time: + - '84' + etag: + - W/"0x8D84B89902C4021" + expires: + - '-1' + location: + - https://searchd4ef1fac.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ab96a019-e965-11ea-95a5-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '253' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchd4ef1fac.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd4ef1fac.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89904F860A\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:47 GMT + elapsed-time: + - '96' + etag: + - W/"0x8D84B89904F860A" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ac37a097-e965-11ea-a029-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchd4ef1fac.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd4ef1fac.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B89904F860A\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '690' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:47 GMT + elapsed-time: + - '45' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ac5c0161-e965-11ea-89df-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchd4ef1fac.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd4ef1fac.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89904F860A\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '686' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:35:47 GMT + elapsed-time: + - '54' + etag: + - W/"0x8D84B89904F860A" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ac7ad118-e965-11ea-98ee-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_skillset.yaml new file mode 100644 index 0000000000000..4f26329f5d0c0 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_skillset.yaml @@ -0,0 +1,98 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd998184f.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd998184f.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B899D3216DB\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '608' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:36:09 GMT + elapsed-time: + - '78' + etag: + - W/"0x8D84B899D3216DB" + expires: + - '-1' + location: + - https://searchd998184f.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - b8b98333-e965-11ea-8072-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchd998184f.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd998184f.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B899D3216DB\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '689' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:36:09 GMT + elapsed-time: + - '48' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - b93d545a-e965-11ea-8548-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_delete_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_delete_skillset.yaml new file mode 100644 index 0000000000000..1bc3d10e3e70a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_delete_skillset.yaml @@ -0,0 +1,178 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd97c184e.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd97c184e.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89A8FA031D\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '608' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:36:29 GMT + elapsed-time: + - '58' + etag: + - W/"0x8D84B89A8FA031D" + expires: + - '-1' + location: + - https://searchd97c184e.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - c4921772-e965-11ea-960e-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchd97c184e.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd97c184e.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B89A8FA031D\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '689' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:36:29 GMT + elapsed-time: + - '44' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - c50484ad-e965-11ea-87df-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchd97c184e.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Fri, 28 Aug 2020 19:36:29 GMT + elapsed-time: + - '75' + expires: + - '-1' + pragma: + - no-cache + request-id: + - c523f399-e965-11ea-bc47-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchd97c184e.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchd97c184e.search.windows.net/$metadata#skillsets","value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '93' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:36:29 GMT + elapsed-time: + - '24' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - c54b2a8c-e965-11ea-b63a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_delete_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_delete_skillset_if_unchanged.yaml new file mode 100644 index 0000000000000..3d5e200a82005 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_delete_skillset_if_unchanged.yaml @@ -0,0 +1,159 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search3a191d88.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search3a191d88.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89B55A0582\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '608' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:36:49 GMT + elapsed-time: + - '74' + etag: + - W/"0x8D84B89B55A0582" + expires: + - '-1' + location: + - https://search3a191d88.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d119913a-e965-11ea-bd94-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "test-ss", "description": "updated", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '255' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search3a191d88.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search3a191d88.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89B57E8428\"","name":"test-ss","description":"updated","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '611' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:36:49 GMT + elapsed-time: + - '86' + etag: + - W/"0x8D84B89B57E8428" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d165390e-e965-11ea-95d0-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D84B89B55A0582"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search3a191d88.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:36:49 GMT + elapsed-time: + - '26' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d1895d76-e965-11ea-b1a3-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_get_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_get_skillset.yaml new file mode 100644 index 0000000000000..738a8de27ef1e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_get_skillset.yaml @@ -0,0 +1,144 @@ +interactions: +- request: + body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", + "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": + "organizations", "targetName": "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '252' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search9274171b.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9274171b.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89C178D474\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '608' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:37:09 GMT + elapsed-time: + - '68' + etag: + - W/"0x8D84B89C178D474" + expires: + - '-1' + location: + - https://search9274171b.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - dd102fd9-e965-11ea-8c98-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search9274171b.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9274171b.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B89C178D474\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '689' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:37:10 GMT + elapsed-time: + - '43' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - dd842296-e965-11ea-b9fd-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search9274171b.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9274171b.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89C178D474\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '685' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:37:10 GMT + elapsed-time: + - '26' + etag: + - W/"0x8D84B89C178D474" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ddaa1ca7-e965-11ea-8410-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_get_skillsets.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_get_skillsets.yaml new file mode 100644 index 0000000000000..bd39c330deb3f --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_get_skillsets.yaml @@ -0,0 +1,152 @@ +interactions: +- request: + body: '{"name": "test-ss-1", "description": "desc1", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '255' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchaa02178e.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchaa02178e.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89CECA410C\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '611' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:37:32 GMT + elapsed-time: + - '102' + etag: + - W/"0x8D84B89CECA410C" + expires: + - '-1' + location: + - https://searchaa02178e.search.windows.net/skillsets('test-ss-1')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ea7c17dc-e965-11ea-bd68-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "test-ss-2", "description": "desc2", "skills": [{"@odata.type": + "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizations"}]}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '255' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchaa02178e.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchaa02178e.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D84B89CEF2DF20\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '611' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:37:32 GMT + elapsed-time: + - '57' + etag: + - W/"0x8D84B89CEF2DF20" + expires: + - '-1' + location: + - https://searchaa02178e.search.windows.net/skillsets('test-ss-2')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ead5e2aa-e965-11ea-a110-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://searchaa02178e.search.windows.net/skillsets?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchaa02178e.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D84B89CECA410C\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null},{"@odata.etag":"\"0x8D84B89CEF2DF20\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '1292' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:37:32 GMT + elapsed-time: + - '89' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - eafe2792-e965-11ea-929f-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_or_update_synonym_map.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_or_update_synonym_map.yaml new file mode 100644 index 0000000000000..670b1491cd6e0 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_or_update_synonym_map.yaml @@ -0,0 +1,245 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search9ae91f0f.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9ae91f0f.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B89F3D7F56B\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '272' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:38:34 GMT + elapsed-time: + - '58' + etag: + - W/"0x8D84B89F3D7F56B" + expires: + - '-1' + location: + - https://search9ae91f0f.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 0f6401a9-e966-11ea-8458-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search9ae91f0f.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9ae91f0f.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B89F3D7F56B\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '276' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:38:34 GMT + elapsed-time: + - '20' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 0fe22cad-e966-11ea-aea6-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. + => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '81' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search9ae91f0f.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9ae91f0f.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B89F41CD335\"","name":"test-syn-map","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '226' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:38:34 GMT + elapsed-time: + - '19' + etag: + - W/"0x8D84B89F41CD335" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 10065ff7-e966-11ea-b8c2-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search9ae91f0f.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9ae91f0f.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B89F41CD335\"","name":"test-syn-map","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '230' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:38:34 GMT + elapsed-time: + - '14' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 1026a7b8-e966-11ea-96f9-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search9ae91f0f.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search9ae91f0f.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B89F41CD335\"","name":"test-syn-map","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '226' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:38:34 GMT + elapsed-time: + - '6' + etag: + - W/"0x8D84B89F41CD335" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 1043deeb-e966-11ea-a8a0-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_or_update_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_or_update_synonym_map_if_unchanged.yaml new file mode 100644 index 0000000000000..a5509c8946127 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_or_update_synonym_map_if_unchanged.yaml @@ -0,0 +1,163 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search53532449.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search53532449.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A002FB8F1\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '272' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:38:55 GMT + elapsed-time: + - '68' + etag: + - W/"0x8D84B8A002FB8F1" + expires: + - '-1' + location: + - https://search53532449.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 1bb0f41c-e966-11ea-a81b-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. + => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '81' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search53532449.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search53532449.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A004A71C8\"","name":"test-syn-map","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '226' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:38:55 GMT + elapsed-time: + - '17' + etag: + - W/"0x8D84B8A004A71C8" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 1c3948f7-e966-11ea-8f24-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA", "@odata.etag": "\"0x8D84B8A002FB8F1\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '167' + Content-Type: + - application/json + If-Match: + - '"0x8D84B8A002FB8F1"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://search53532449.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:38:55 GMT + elapsed-time: + - '9' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 1c53b38c-e966-11ea-8bde-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_synonym_map.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_synonym_map.yaml new file mode 100644 index 0000000000000..313ff8762d4c8 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_create_synonym_map.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search78461aed.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78461aed.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A0B8238D8\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '272' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:39:14 GMT + elapsed-time: + - '93' + etag: + - W/"0x8D84B8A0B8238D8" + expires: + - '-1' + location: + - https://search78461aed.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 27109575-e966-11ea-9b0c-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search78461aed.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78461aed.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B8A0B8238D8\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '276' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:39:14 GMT + elapsed-time: + - '24' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 278c4144-e966-11ea-9dc6-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_delete_synonym_map.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_delete_synonym_map.yaml new file mode 100644 index 0000000000000..b81be2bc8f7a1 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_delete_synonym_map.yaml @@ -0,0 +1,179 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search78271aec.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78271aec.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A16D9744D\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '272' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:39:33 GMT + elapsed-time: + - '38' + etag: + - W/"0x8D84B8A16D9744D" + expires: + - '-1' + location: + - https://search78271aec.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 32813717-e966-11ea-a0e8-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search78271aec.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78271aec.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B8A16D9744D\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '276' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:39:33 GMT + elapsed-time: + - '9' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 32e2ef2d-e966-11ea-bd94-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://search78271aec.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Fri, 28 Aug 2020 19:39:33 GMT + elapsed-time: + - '15' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 32f6af73-e966-11ea-b964-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search78271aec.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78271aec.search.windows.net/$metadata#synonymmaps","value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '95' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:39:33 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 330f7568-e966-11ea-8b99-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_delete_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_delete_synonym_map_if_unchanged.yaml new file mode 100644 index 0000000000000..ecb03f56181dc --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_delete_synonym_map_if_unchanged.yaml @@ -0,0 +1,158 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchfabb2026.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfabb2026.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A22BED907\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '272' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:39:53 GMT + elapsed-time: + - '38' + etag: + - W/"0x8D84B8A22BED907" + expires: + - '-1' + location: + - https://searchfabb2026.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 3e4b8219-e966-11ea-8c23-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '125' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://searchfabb2026.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchfabb2026.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A22DC034D\"","name":"test-syn-map","format":"solr","synonyms":"W\na\ns\nh\ni\nn\ng\nt\no\nn\n,\n + \nW\na\ns\nh\n.\n \n=\n>\n \nW\nA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '270' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:39:53 GMT + elapsed-time: + - '23' + etag: + - W/"0x8D84B8A22DC034D" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 3ec8cd68-e966-11ea-bc7e-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D84B8A22BED907"' + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://searchfabb2026.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:39:53 GMT + elapsed-time: + - '5' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 3ee62b8a-e966-11ea-a027-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_get_synonym_map.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_get_synonym_map.yaml new file mode 100644 index 0000000000000..100d491a57491 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_get_synonym_map.yaml @@ -0,0 +1,146 @@ +interactions: +- request: + body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, + United States of America\nWashington, Wash. => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '127' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search299919b9.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search299919b9.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A2DC218F0\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '272' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:40:11 GMT + elapsed-time: + - '21' + etag: + - W/"0x8D84B8A2DC218F0" + expires: + - '-1' + location: + - https://search299919b9.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 4951ae04-e966-11ea-8594-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search299919b9.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search299919b9.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B8A2DC218F0\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '276' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:40:11 GMT + elapsed-time: + - '26' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 49cbb87e-e966-11ea-8041-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search299919b9.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search299919b9.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A2DC218F0\"","name":"test-syn-map","format":"solr","synonyms":"USA, + United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '272' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:40:11 GMT + elapsed-time: + - '5' + etag: + - W/"0x8D84B8A2DC218F0" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 49e75dd5-e966-11ea-b134-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_get_synonym_maps.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_get_synonym_maps.yaml new file mode 100644 index 0000000000000..7c6b071f4de7b --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.test_get_synonym_maps.yaml @@ -0,0 +1,152 @@ +interactions: +- request: + body: '{"name": "test-syn-map-1", "format": "solr", "synonyms": "USA, United States, + United States of America"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '104' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search43c51a2c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search43c51a2c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A39AE83D4\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, + United States, United States of America","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '249' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:40:31 GMT + elapsed-time: + - '116' + etag: + - W/"0x8D84B8A39AE83D4" + expires: + - '-1' + location: + - https://search43c51a2c.search.windows.net/synonymmaps('test-syn-map-1')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 554c8258-e966-11ea-8bd7-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "test-syn-map-2", "format": "solr", "synonyms": "Washington, Wash. + => WA"}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '83' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search43c51a2c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search43c51a2c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D84B8A39CC2363\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}' + headers: + cache-control: + - no-cache + content-length: + - '228' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:40:31 GMT + elapsed-time: + - '28' + etag: + - W/"0x8D84B8A39CC2363" + expires: + - '-1' + location: + - https://search43c51a2c.search.windows.net/synonymmaps('test-syn-map-2')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 55b92321-e966-11ea-b16d-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://search43c51a2c.search.windows.net/synonymmaps?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search43c51a2c.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D84B8A39AE83D4\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, + United States, United States of America","encryptionKey":null},{"@odata.etag":"\"0x8D84B8A39CC2363\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, + Wash. => WA","encryptionKey":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 28 Aug 2020 19:40:31 GMT + elapsed-time: + - '66' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 55d63fb9-e966-11ea-a59a-5cf37071153c + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_indexer.yaml new file mode 100644 index 0000000000000..d09541a69fe8a --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_indexer.yaml @@ -0,0 +1,155 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search207914e0.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search207914e0.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED510D525790\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:26 GMT + elapsed-time: + - '44' + etag: + - W/"0x8D7ED510D525790" + expires: + - '-1' + location: + - https://search207914e0.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 29133c98-8b2d-11ea-abb9-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search207914e0.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search207914e0.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED510E3391AF\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:27 GMT + elapsed-time: + - '969' + etag: + - W/"0x8D7ED510E3391AF" + expires: + - '-1' + location: + - https://search207914e0.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 2957de74-8b2d-11ea-89cc-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search207914e0.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search207914e0.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED510EA2BB62\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:28 GMT + elapsed-time: + - '487' + etag: + - W/"0x8D7ED510EA2BB62" + expires: + - '-1' + location: + - https://search207914e0.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 2a3d34b8-8b2d-11ea-9811-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_or_update_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_or_update_indexer.yaml new file mode 100644 index 0000000000000..dc7807335829b --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_or_update_indexer.yaml @@ -0,0 +1,342 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search8001902.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8001902.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5117F9A6D3\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:43 GMT + elapsed-time: + - '59' + etag: + - W/"0x8D7ED5117F9A6D3" + expires: + - '-1' + location: + - https://search8001902.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 33c2ac1c-8b2d-11ea-ae25-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search8001902.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8001902.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED511891E3D4\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:45 GMT + elapsed-time: + - '570' + etag: + - W/"0x8D7ED511891E3D4" + expires: + - '-1' + location: + - https://search8001902.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 33ff425e-8b2d-11ea-a101-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search8001902.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8001902.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5118EC7055\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:45 GMT + elapsed-time: + - '174' + etag: + - W/"0x8D7ED5118EC7055" + expires: + - '-1' + location: + - https://search8001902.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 34a04426-8b2d-11ea-9aca-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search8001902.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8001902.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5118EC7055\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:45 GMT + elapsed-time: + - '26' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 34fad200-8b2d-11ea-be97-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": + "sample-datasource", "targetIndexName": "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://search8001902.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8001902.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED511931C355\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '367' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:46 GMT + elapsed-time: + - '109' + etag: + - W/"0x8D7ED511931C355" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 3512418a-8b2d-11ea-bd46-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search8001902.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8001902.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED511931C355\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '371' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:46 GMT + elapsed-time: + - '9' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 3536ee86-8b2d-11ea-ad34-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search8001902.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search8001902.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED511931C355\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '367' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:54:46 GMT + elapsed-time: + - '4' + etag: + - W/"0x8D7ED511931C355" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 354b52a2-8b2d-11ea-b04c-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_or_update_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_or_update_indexer_if_unchanged.yaml new file mode 100644 index 0000000000000..966ed42db4e46 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_create_or_update_indexer_if_unchanged.yaml @@ -0,0 +1,264 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search71b21e3c.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search71b21e3c.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE17B51C89C5\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:28 GMT + elapsed-time: + - '51' + etag: + - W/"0x8D7EE17B51C89C5" + expires: + - '-1' + location: + - https://search71b21e3c.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d169ba42-8bf3-11ea-923a-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search71b21e3c.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search71b21e3c.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EE17B5D72DF6\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:29 GMT + elapsed-time: + - '904' + etag: + - W/"0x8D7EE17B5D72DF6" + expires: + - '-1' + location: + - https://search71b21e3c.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d1b36228-8bf3-11ea-bd02-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search71b21e3c.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search71b21e3c.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17B61DBE45\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:30 GMT + elapsed-time: + - '173' + etag: + - W/"0x8D7EE17B61DBE45" + expires: + - '-1' + location: + - https://search71b21e3c.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d2708c82-8bf3-11ea-b7e1-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": + "sample-datasource", "targetIndexName": "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://search71b21e3c.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search71b21e3c.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17B646D43E\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '367' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:30 GMT + elapsed-time: + - '129' + etag: + - W/"0x8D7EE17B646D43E" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d2be281e-8bf3-11ea-9719-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": + "sample-datasource", "targetIndexName": "hotels", "disabled": false, "@odata.etag": + "\"0x8D7EE17B61DBE45\""}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '179' + Content-Type: + - application/json + If-Match: + - '"0x8D7EE17B61DBE45"' + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://search71b21e3c.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:30 GMT + elapsed-time: + - '8' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - d2de6b46-8bf3-11ea-a113-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_delete_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_delete_indexer.yaml new file mode 100644 index 0000000000000..1ba63b4ea2f17 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_delete_indexer.yaml @@ -0,0 +1,279 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search205e14df.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search205e14df.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5125E3C05D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:07 GMT + elapsed-time: + - '30' + etag: + - W/"0x8D7ED5125E3C05D" + expires: + - '-1' + location: + - https://search205e14df.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 41a4e0ac-8b2d-11ea-80e0-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search205e14df.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search205e14df.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5126BDF45D\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:09 GMT + elapsed-time: + - '1090' + etag: + - W/"0x8D7ED5126BDF45D" + expires: + - '-1' + location: + - https://search205e14df.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 41e982d2-8b2d-11ea-aac9-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search205e14df.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search205e14df.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5127191D3F\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:10 GMT + elapsed-time: + - '201' + etag: + - W/"0x8D7ED5127191D3F" + expires: + - '-1' + location: + - https://search205e14df.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 42cbcdde-8b2d-11ea-ac7d-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search205e14df.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search205e14df.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5127191D3F\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:10 GMT + elapsed-time: + - '8' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 43260b80-8b2d-11ea-b5d2-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: DELETE + uri: https://search205e14df.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Thu, 30 Apr 2020 21:55:10 GMT + elapsed-time: + - '99' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 4337b16e-8b2d-11ea-a646-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search205e14df.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search205e14df.search.windows.net/$metadata#indexers","value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '92' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:10 GMT + elapsed-time: + - '4' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 435622e2-8b2d-11ea-97eb-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_delete_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_delete_indexer_if_unchanged.yaml new file mode 100644 index 0000000000000..78668252b9a14 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_delete_indexer_if_unchanged.yaml @@ -0,0 +1,258 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search54491a19.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search54491a19.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE17BEFA29F2\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:45 GMT + elapsed-time: + - '45' + etag: + - W/"0x8D7EE17BEFA29F2" + expires: + - '-1' + location: + - https://search54491a19.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - db51671a-8bf3-11ea-a801-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search54491a19.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search54491a19.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EE17BF71C167\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '557' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:46 GMT + elapsed-time: + - '492' + etag: + - W/"0x8D7EE17BF71C167" + expires: + - '-1' + location: + - https://search54491a19.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - db9019e8-8bf3-11ea-8645-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search54491a19.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search54491a19.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17BFE1B5D9\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '361' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:46 GMT + elapsed-time: + - '498' + etag: + - W/"0x8D7EE17BFE1B5D9" + expires: + - '-1' + location: + - https://search54491a19.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - dc0b5cde-8bf3-11ea-930e-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": + "sample-datasource", "targetIndexName": "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Prefer: + - return=representation + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: PUT + uri: https://search54491a19.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search54491a19.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17C015077F\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:46 GMT + elapsed-time: + - '124' + etag: + - W/"0x8D7EE17C015077F" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - dc8c1cec-8bf3-11ea-844d-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D7EE17BFE1B5D9"' + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: DELETE + uri: https://search54491a19.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"error":{"code":"","message":"The precondition given in one of the + request headers evaluated to false. No change was made to the resource from + this request."}}' + headers: + cache-control: + - no-cache + content-language: + - en + content-length: + - '160' + content-type: + - application/json; odata.metadata=minimal + date: + - Fri, 01 May 2020 21:36:46 GMT + elapsed-time: + - '7' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - dcac37e4-8bf3-11ea-a911-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 412 + message: Precondition Failed +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_get_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_get_indexer.yaml new file mode 100644 index 0000000000000..25eec354c921e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_get_indexer.yaml @@ -0,0 +1,201 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searche35313ac.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche35313ac.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5130775CFC\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:25 GMT + elapsed-time: + - '56' + etag: + - W/"0x8D7ED5130775CFC" + expires: + - '-1' + location: + - https://searche35313ac.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 4c3ea7da-8b2d-11ea-8524-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searche35313ac.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche35313ac.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED51313C576E\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:27 GMT + elapsed-time: + - '879' + etag: + - W/"0x8D7ED51313C576E" + expires: + - '-1' + location: + - https://searche35313ac.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 4c7cbf1e-8b2d-11ea-a414-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searche35313ac.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche35313ac.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5131BBB0C0\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:28 GMT + elapsed-time: + - '544' + etag: + - W/"0x8D7ED5131BBB0C0" + expires: + - '-1' + location: + - https://searche35313ac.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 4d4946ee-8b2d-11ea-9df9-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searche35313ac.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche35313ac.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5131BBB0C0\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:28 GMT + elapsed-time: + - '9' + etag: + - W/"0x8D7ED5131BBB0C0" + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 4dd6800c-8b2d-11ea-ba87-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_get_indexer_status.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_get_indexer_status.yaml new file mode 100644 index 0000000000000..41986edd2887d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_get_indexer_status.yaml @@ -0,0 +1,199 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search78e216af.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78e216af.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED513BD34FD0\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:44 GMT + elapsed-time: + - '48' + etag: + - W/"0x8D7ED513BD34FD0" + expires: + - '-1' + location: + - https://search78e216af.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 5796c2d2-8b2d-11ea-a954-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search78e216af.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78e216af.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED513C63EA4A\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:45 GMT + elapsed-time: + - '469' + etag: + - W/"0x8D7ED513C63EA4A" + expires: + - '-1' + location: + - https://search78e216af.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 57d945a6-8b2d-11ea-a995-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://search78e216af.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78e216af.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED513CD9A4E5\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:45 GMT + elapsed-time: + - '484' + etag: + - W/"0x8D7ED513CD9A4E5" + expires: + - '-1' + location: + - https://search78e216af.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 586c971a-8b2d-11ea-bcad-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://search78e216af.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://search78e216af.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":null,"executionHistory":[],"limits":{"maxRunTime":"PT0S","maxDocumentExtractionSize":0,"maxDocumentContentCharactersToExtract":0}}' + headers: + cache-control: + - no-cache + content-length: + - '322' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:55:45 GMT + elapsed-time: + - '13' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 58f2f5a4-8b2d-11ea-9e2c-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_list_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_list_indexer.yaml new file mode 100644 index 0000000000000..044c9bdc46265 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_list_indexer.yaml @@ -0,0 +1,352 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchf8231428.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf8231428.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5146AB7BFE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:03 GMT + elapsed-time: + - '78' + etag: + - W/"0x8D7ED5146AB7BFE" + expires: + - '-1' + location: + - https://searchf8231428.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 6268263a-8b2d-11ea-8b3a-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchf8231428.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf8231428.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5147408421\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '557' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:03 GMT + elapsed-time: + - '501' + etag: + - W/"0x8D7ED5147408421" + expires: + - '-1' + location: + - https://searchf8231428.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 62b10964-8b2d-11ea-aa1f-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: 'b''{"name": "another-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '322' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchf8231428.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf8231428.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED514792D1C2\"","name":"another-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:03 GMT + elapsed-time: + - '29' + etag: + - W/"0x8D7ED514792D1C2" + expires: + - '-1' + location: + - https://searchf8231428.search.windows.net/datasources('another-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 634ba6ee-8b2d-11ea-b3b9-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "another-index", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '114' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchf8231428.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf8231428.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED51484C7F82\"","name":"another-index","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '564' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:05 GMT + elapsed-time: + - '869' + etag: + - W/"0x8D7ED51484C7F82" + expires: + - '-1' + location: + - https://searchf8231428.search.windows.net/indexes('another-index')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 63979858-8b2d-11ea-baf6-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchf8231428.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf8231428.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED51489A5F94\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '361' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:06 GMT + elapsed-time: + - '168' + etag: + - W/"0x8D7ED51489A5F94" + expires: + - '-1' + location: + - https://searchf8231428.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 645647e8-8b2d-11ea-a877-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "another-indexer", "dataSourceName": "another-datasource", "targetIndexName": + "another-index", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchf8231428.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf8231428.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5148C94048\"","name":"another-indexer","description":null,"dataSourceName":"another-datasource","skillsetName":null,"targetIndexName":"another-index","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:06 GMT + elapsed-time: + - '191' + etag: + - W/"0x8D7ED5148C94048" + expires: + - '-1' + location: + - https://searchf8231428.search.windows.net/indexers('another-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 64a826a2-8b2d-11ea-bfa5-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searchf8231428.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchf8231428.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5148C94048\"","name":"another-indexer","description":null,"dataSourceName":"another-datasource","skillsetName":null,"targetIndexName":"another-index","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null},{"@odata.etag":"\"0x8D7ED51489A5F94\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '649' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:06 GMT + elapsed-time: + - '33' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 64d7a0c2-8b2d-11ea-95d8-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_reset_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_reset_indexer.yaml new file mode 100644 index 0000000000000..ff1dacb067b4b --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_reset_indexer.yaml @@ -0,0 +1,279 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchca8148f.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchca8148f.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED51B1466EFF\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:59:01 GMT + elapsed-time: + - '52' + etag: + - W/"0x8D7ED51B1466EFF" + expires: + - '-1' + location: + - https://searchca8148f.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - cd1d664c-8b2d-11ea-96b0-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchca8148f.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchca8148f.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED51B2085B9F\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:59:03 GMT + elapsed-time: + - '940' + etag: + - W/"0x8D7ED51B2085B9F" + expires: + - '-1' + location: + - https://searchca8148f.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - cd4b0f40-8b2d-11ea-b316-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchca8148f.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchca8148f.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED51B275D75A\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:59:03 GMT + elapsed-time: + - '524' + etag: + - W/"0x8D7ED51B275D75A" + expires: + - '-1' + location: + - https://searchca8148f.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ce107046-8b2d-11ea-8aa0-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searchca8148f.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchca8148f.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED51B275D75A\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:59:03 GMT + elapsed-time: + - '19' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ce880c1e-8b2d-11ea-89cc-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searchca8148f.search.windows.net/indexers('sample-indexer')/search.reset?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Thu, 30 Apr 2020 21:59:03 GMT + elapsed-time: + - '137' + expires: + - '-1' + pragma: + - no-cache + request-id: + - ce976af4-8b2d-11ea-827e-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searchca8148f.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searchca8148f.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":{"status":"reset","errorMessage":null,"startTime":"2020-04-30T21:59:04.132Z","endTime":"2020-04-30T21:59:04.132Z","itemsProcessed":0,"itemsFailed":0,"initialTrackingState":null,"finalTrackingState":null,"errors":[],"warnings":[],"metrics":null},"executionHistory":[{"status":"reset","errorMessage":null,"startTime":"2020-04-30T21:59:04.132Z","endTime":"2020-04-30T21:59:04.132Z","itemsProcessed":0,"itemsFailed":0,"initialTrackingState":null,"finalTrackingState":null,"errors":[],"warnings":[],"metrics":null}],"limits":null}' + headers: + cache-control: + - no-cache + content-length: + - '717' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:59:03 GMT + elapsed-time: + - '10' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - ceb981ae-8b2d-11ea-989d-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_run_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_run_indexer.yaml new file mode 100644 index 0000000000000..6ff48aba7b53c --- /dev/null +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.test_run_indexer.yaml @@ -0,0 +1,281 @@ +interactions: +- request: + body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": + "connection_string"}, "container": {"name": "searchcontainer"}}''' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searche43613c1.search.windows.net/datasources?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche43613c1.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5160A7FF06\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' + headers: + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:46 GMT + elapsed-time: + - '29' + etag: + - W/"0x8D7ED5160A7FF06" + expires: + - '-1' + location: + - https://searche43613c1.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7c6fe9be-8b2d-11ea-ad55-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", + "key": true, "searchable": false}]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searche43613c1.search.windows.net/indexes?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche43613c1.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5162298E08\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:48 GMT + elapsed-time: + - '2086' + etag: + - W/"0x8D7ED5162298E08" + expires: + - '-1' + location: + - https://searche43613c1.search.windows.net/indexes('hotels')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7cad8bf4-8b2d-11ea-ac77-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": + "hotels", "disabled": false}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searche43613c1.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche43613c1.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5162765C60\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:49 GMT + elapsed-time: + - '181' + etag: + - W/"0x8D7ED5162765C60" + expires: + - '-1' + location: + - https://searche43613c1.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7e350d6e-8b2d-11ea-acce-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searche43613c1.search.windows.net/indexers?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche43613c1.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5162765C60\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' + headers: + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:49 GMT + elapsed-time: + - '14' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7e83e1ca-8b2d-11ea-9cad-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: POST + uri: https://searche43613c1.search.windows.net/indexers('sample-indexer')/search.run?api-version=2020-06-30 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 30 Apr 2020 21:56:49 GMT + elapsed-time: + - '32' + expires: + - '-1' + pragma: + - no-cache + request-id: + - 7ea7941a-8b2d-11ea-95d9-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) + method: GET + uri: https://searche43613c1.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 + response: + body: + string: '{"@odata.context":"https://searche43613c1.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":null,"executionHistory":[],"limits":{"maxRunTime":"PT0S","maxDocumentExtractionSize":0,"maxDocumentContentCharactersToExtract":0}}' + headers: + cache-control: + - no-cache + content-length: + - '322' + content-type: + - application/json; odata.metadata=minimal + date: + - Thu, 30 Apr 2020 21:56:49 GMT + elapsed-time: + - '11' + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + preference-applied: + - odata.include-annotations="*" + request-id: + - 7ec283d0-8b2d-11ea-80c9-2816a845e8c6 + strict-transport-security: + - max-age=15724800; includeSubDomains + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_analyze_text.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_analyze_text.yaml deleted file mode 100644 index c6a092ce073e3..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_analyze_text.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"text": "One''s ", "analyzer": "standard.lucene"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '55' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 980E4A06562888E4EC5397BE01F2DE38 - method: POST - uri: https://search4d10e85.search.windows.net/indexes('drgqefsg')/search.analyze?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4d10e85.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.AnalyzeResult","tokens":[{"token":"one''s","startOffset":0,"endOffset":5,"position":0},{"token":"two","startOffset":7,"endOffset":10,"position":1}]}' - headers: - cache-control: - - no-cache - content-length: - - '260' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:20:46 GMT - elapsed-time: - - '277' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 0e27953a-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_datasource.yaml deleted file mode 100644 index 232feca5e9c1f..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_datasource.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 0E3774E832B8584D0AC648C5FAA3D77C - method: POST - uri: https://search51c7106b.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search51c7106b.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC9494AD4705\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:18 GMT - elapsed-time: - - '39' - etag: - - W/"0x8D7EC9494AD4705" - expires: - - '-1' - location: - - https://search51c7106b.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - b02c12fc-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_index.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_index.yaml deleted file mode 100644 index 7ccda4c66d25c..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_index.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [{"name": "MyProfile"}], "corsOptions": {"allowedOrigins": - ["*"], "maxAgeInSeconds": 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '260' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1C166A5AB3A98880F52DC59909AC7CD1 - method: POST - uri: https://search3f00e58.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search3f00e58.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EC94044D5005\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '889' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:21:16 GMT - elapsed-time: - - '1126' - etag: - - W/"0x8D7EC94044D5005" - expires: - - '-1' - location: - - https://search3f00e58.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 1f504398-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_indexer.yaml deleted file mode 100644 index 8b7d7eee7caf0..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_indexer.yaml +++ /dev/null @@ -1,161 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 77C02FA230F2A765BD5521B74DD1F4A6 - method: POST - uri: https://search21dc0f2f.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21dc0f2f.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED510D525790\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:26 GMT - elapsed-time: - - '44' - etag: - - W/"0x8D7ED510D525790" - expires: - - '-1' - location: - - https://search21dc0f2f.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 29133c98-8b2d-11ea-abb9-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 77C02FA230F2A765BD5521B74DD1F4A6 - method: POST - uri: https://search21dc0f2f.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21dc0f2f.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED510E3391AF\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '558' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:27 GMT - elapsed-time: - - '969' - etag: - - W/"0x8D7ED510E3391AF" - expires: - - '-1' - location: - - https://search21dc0f2f.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 2957de74-8b2d-11ea-89cc-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 77C02FA230F2A765BD5521B74DD1F4A6 - method: POST - uri: https://search21dc0f2f.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21dc0f2f.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED510EA2BB62\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:28 GMT - elapsed-time: - - '487' - etag: - - W/"0x8D7ED510EA2BB62" - expires: - - '-1' - location: - - https://search21dc0f2f.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 2a3d34b8-8b2d-11ea-9811-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_datasource.yaml deleted file mode 100644 index 13b1616dc087a..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_datasource.yaml +++ /dev/null @@ -1,252 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 424F1875A344DE98823F9BD67139C0D1 - method: POST - uri: https://searchcca148d.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchcca148d.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC949C2A658D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '369' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:31 GMT - elapsed-time: - - '53' - etag: - - W/"0x8D7EC949C2A658D" - expires: - - '-1' - location: - - https://searchcca148d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - b7c3c640-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 424F1875A344DE98823F9BD67139C0D1 - method: GET - uri: https://searchcca148d.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchcca148d.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D7EC949C2A658D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '373' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:31 GMT - elapsed-time: - - '17' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - b7e2bb2c-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '345' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 424F1875A344DE98823F9BD67139C0D1 - method: PUT - uri: https://searchcca148d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchcca148d.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC949C3F02C7\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '374' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:31 GMT - elapsed-time: - - '34' - etag: - - W/"0x8D7EC949C3F02C7" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - b7eba0fc-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 424F1875A344DE98823F9BD67139C0D1 - method: GET - uri: https://searchcca148d.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchcca148d.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D7EC949C3F02C7\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '378' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:31 GMT - elapsed-time: - - '9' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - b7f6ed4a-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 424F1875A344DE98823F9BD67139C0D1 - method: GET - uri: https://searchcca148d.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchcca148d.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC949C3F02C7\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '374' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:31 GMT - elapsed-time: - - '5' - etag: - - W/"0x8D7EC949C3F02C7" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - b7fe3a8c-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_datasource_if_unchanged.yaml deleted file mode 100644 index fd0ed94745800..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_datasource_if_unchanged.yaml +++ /dev/null @@ -1,170 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 0DBCB3E23D05E4915AB588A0A3E6A929 - method: POST - uri: https://search3c8b19c7.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search3c8b19c7.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED71775A7B36\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:28 GMT - elapsed-time: - - '46' - etag: - - W/"0x8D7ED71775A7B36" - expires: - - '-1' - location: - - https://search3c8b19c7.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9334e078-8b4d-11ea-a4ef-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '345' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 0DBCB3E23D05E4915AB588A0A3E6A929 - method: PUT - uri: https://search3c8b19c7.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search3c8b19c7.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED717773D43C\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '375' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:28 GMT - elapsed-time: - - '53' - etag: - - W/"0x8D7ED717773D43C" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9374a408-8b4d-11ea-b48a-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"name": "sample-datasource", "description": "changed", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}, "@odata.etag": "\"0x8D7ED71775A7B36\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '385' - Content-Type: - - application/json - If-Match: - - '"0x8D7ED71775A7B36"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 0DBCB3E23D05E4915AB588A0A3E6A929 - method: PUT - uri: https://search3c8b19c7.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:28 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9390c946-8b4d-11ea-a80b-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_index.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_index.yaml deleted file mode 100644 index 794b4a528f64f..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_index.yaml +++ /dev/null @@ -1,116 +0,0 @@ -interactions: -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [], "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": - 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '239' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C02F3671BBF7211EEE91673DC882584B - method: PUT - uri: https://searchaa3a127a.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchaa3a127a.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EC940BA55393\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '816' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:21:28 GMT - elapsed-time: - - '535' - etag: - - W/"0x8D7EC940BA55393" - expires: - - '-1' - location: - - https://searchaa3a127a.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 26fdbe86-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [{"name": "MyProfile"}], "corsOptions": {"allowedOrigins": - ["*"], "maxAgeInSeconds": 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '260' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - C02F3671BBF7211EEE91673DC882584B - method: PUT - uri: https://searchaa3a127a.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchaa3a127a.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EC940BEEC61E\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '890' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:21:28 GMT - elapsed-time: - - '329' - etag: - - W/"0x8D7EC940BEEC61E" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 27799c54-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexer.yaml deleted file mode 100644 index 6b55bf9022ffc..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexer.yaml +++ /dev/null @@ -1,356 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 611B37AA724F1C68730D7CF6A8C3A842 - method: POST - uri: https://searchd06a1351.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd06a1351.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5117F9A6D3\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:43 GMT - elapsed-time: - - '59' - etag: - - W/"0x8D7ED5117F9A6D3" - expires: - - '-1' - location: - - https://searchd06a1351.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 33c2ac1c-8b2d-11ea-ae25-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 611B37AA724F1C68730D7CF6A8C3A842 - method: POST - uri: https://searchd06a1351.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd06a1351.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED511891E3D4\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '558' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:45 GMT - elapsed-time: - - '570' - etag: - - W/"0x8D7ED511891E3D4" - expires: - - '-1' - location: - - https://searchd06a1351.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 33ff425e-8b2d-11ea-a101-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 611B37AA724F1C68730D7CF6A8C3A842 - method: POST - uri: https://searchd06a1351.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd06a1351.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5118EC7055\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:45 GMT - elapsed-time: - - '174' - etag: - - W/"0x8D7ED5118EC7055" - expires: - - '-1' - location: - - https://searchd06a1351.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 34a04426-8b2d-11ea-9aca-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 611B37AA724F1C68730D7CF6A8C3A842 - method: GET - uri: https://searchd06a1351.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd06a1351.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5118EC7055\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '366' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:45 GMT - elapsed-time: - - '26' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 34fad200-8b2d-11ea-be97-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": - "sample-datasource", "targetIndexName": "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '139' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 611B37AA724F1C68730D7CF6A8C3A842 - method: PUT - uri: https://searchd06a1351.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd06a1351.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED511931C355\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:46 GMT - elapsed-time: - - '109' - etag: - - W/"0x8D7ED511931C355" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 3512418a-8b2d-11ea-bd46-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 611B37AA724F1C68730D7CF6A8C3A842 - method: GET - uri: https://searchd06a1351.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd06a1351.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED511931C355\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '371' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:46 GMT - elapsed-time: - - '9' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 3536ee86-8b2d-11ea-ad34-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 611B37AA724F1C68730D7CF6A8C3A842 - method: GET - uri: https://searchd06a1351.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchd06a1351.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED511931C355\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:54:46 GMT - elapsed-time: - - '4' - etag: - - W/"0x8D7ED511931C355" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 354b52a2-8b2d-11ea-b04c-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexer_if_unchanged.yaml deleted file mode 100644 index 62ff90a85bdcf..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexer_if_unchanged.yaml +++ /dev/null @@ -1,274 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7966DDD092384BAD2A12CDC8418DF7D1 - method: POST - uri: https://searchf01f188b.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf01f188b.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE17B51C89C5\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:28 GMT - elapsed-time: - - '51' - etag: - - W/"0x8D7EE17B51C89C5" - expires: - - '-1' - location: - - https://searchf01f188b.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d169ba42-8bf3-11ea-923a-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7966DDD092384BAD2A12CDC8418DF7D1 - method: POST - uri: https://searchf01f188b.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf01f188b.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EE17B5D72DF6\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '558' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:29 GMT - elapsed-time: - - '904' - etag: - - W/"0x8D7EE17B5D72DF6" - expires: - - '-1' - location: - - https://searchf01f188b.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d1b36228-8bf3-11ea-bd02-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7966DDD092384BAD2A12CDC8418DF7D1 - method: POST - uri: https://searchf01f188b.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf01f188b.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17B61DBE45\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:30 GMT - elapsed-time: - - '173' - etag: - - W/"0x8D7EE17B61DBE45" - expires: - - '-1' - location: - - https://searchf01f188b.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d2708c82-8bf3-11ea-b7e1-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": - "sample-datasource", "targetIndexName": "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '139' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7966DDD092384BAD2A12CDC8418DF7D1 - method: PUT - uri: https://searchf01f188b.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf01f188b.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17B646D43E\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:30 GMT - elapsed-time: - - '129' - etag: - - W/"0x8D7EE17B646D43E" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d2be281e-8bf3-11ea-9719-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": - "sample-datasource", "targetIndexName": "hotels", "disabled": false, "@odata.etag": - "\"0x8D7EE17B61DBE45\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '179' - Content-Type: - - application/json - If-Match: - - '"0x8D7EE17B61DBE45"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7966DDD092384BAD2A12CDC8418DF7D1 - method: PUT - uri: https://searchf01f188b.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:30 GMT - elapsed-time: - - '8' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - d2de6b46-8bf3-11ea-a113-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexes_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexes_if_unchanged.yaml deleted file mode 100644 index 247d2d979d99b..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_indexes_if_unchanged.yaml +++ /dev/null @@ -1,173 +0,0 @@ -interactions: -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [{"name": "MyProfile"}], "corsOptions": {"allowedOrigins": - ["*"], "maxAgeInSeconds": 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '260' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7EDDD034F9B54CB2E3BC204320340D62 - method: POST - uri: https://searchf02d188c.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf02d188c.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED713C61993A\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '890' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:44:49 GMT - elapsed-time: - - '625' - etag: - - W/"0x8D7ED713C61993A" - expires: - - '-1' - location: - - https://searchf02d188c.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 57dcb4fa-8b4d-11ea-9996-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [], "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": - 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '239' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7EDDD034F9B54CB2E3BC204320340D62 - method: PUT - uri: https://searchf02d188c.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf02d188c.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED713C80E6C7\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '816' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:44:49 GMT - elapsed-time: - - '99' - etag: - - W/"0x8D7ED713C80E6C7" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 58800e88-8b4d-11ea-8ef8-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [], "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": - 60}, "@odata.etag": "\"0x8D7ED713C61993A\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '279' - Content-Type: - - application/json - If-Match: - - '"0x8D7ED713C61993A"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7EDDD034F9B54CB2E3BC204320340D62 - method: PUT - uri: https://searchf02d188c.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:44:49 GMT - elapsed-time: - - '43' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 589d8268-8b4d-11ea-ba65-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset.yaml deleted file mode 100644 index b6ddd4472f0a7..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset.yaml +++ /dev/null @@ -1,210 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '253' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 137CEEC8B0A9B0FDC772FF8489590519 - method: PUT - uri: https://searche48b13cd.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searche48b13cd.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC945F838D92\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '588' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:48 GMT - elapsed-time: - - '167' - etag: - - W/"0x8D7EC945F838D92" - expires: - - '-1' - location: - - https://searche48b13cd.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7b0ffd36-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '253' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 137CEEC8B0A9B0FDC772FF8489590519 - method: PUT - uri: https://searche48b13cd.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searche48b13cd.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC945F93BD2C\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '588' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:49 GMT - elapsed-time: - - '58' - etag: - - W/"0x8D7EC945F93BD2C" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7b4046bc-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 137CEEC8B0A9B0FDC772FF8489590519 - method: GET - uri: https://searche48b13cd.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searche48b13cd.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7EC945F93BD2C\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '669' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:49 GMT - elapsed-time: - - '46' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7b4fcfd8-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 137CEEC8B0A9B0FDC772FF8489590519 - method: GET - uri: https://searche48b13cd.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searche48b13cd.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC945F93BD2C\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '665' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:49 GMT - elapsed-time: - - '16' - etag: - - W/"0x8D7EC945F93BD2C" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7b5d4230-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset_if_unchanged.yaml deleted file mode 100644 index a6e702cf0d47a..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset_if_unchanged.yaml +++ /dev/null @@ -1,221 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '253' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 898AD7814EFB81496ACE7ECB4B684BFD - method: PUT - uri: https://searcha9b1907.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searcha9b1907.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7ED716321E476\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '587' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:54 GMT - elapsed-time: - - '162' - etag: - - W/"0x8D7ED716321E476" - expires: - - '-1' - location: - - https://searcha9b1907.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7ef51806-8b4d-11ea-875d-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}], "@odata.etag": "\"0x8D7ED716321E476\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '293' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 898AD7814EFB81496ACE7ECB4B684BFD - method: PUT - uri: https://searcha9b1907.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searcha9b1907.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7ED716345788B\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '587' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:54 GMT - elapsed-time: - - '41' - etag: - - W/"0x8D7ED716345788B" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7f45c05a-8b4d-11ea-84d4-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 898AD7814EFB81496ACE7ECB4B684BFD - method: GET - uri: https://searcha9b1907.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searcha9b1907.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7ED716345788B\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '668' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:54 GMT - elapsed-time: - - '57' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7f60123a-8b4d-11ea-9805-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}], "@odata.etag": "\"0x8D7ED716321E476\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '293' - Content-Type: - - application/json - If-Match: - - '"0x8D7ED716321E476"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 898AD7814EFB81496ACE7ECB4B684BFD - method: PUT - uri: https://searcha9b1907.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:54 GMT - elapsed-time: - - '10' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7f7d2740-8b4d-11ea-9321-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset_inplace.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset_inplace.yaml deleted file mode 100644 index 9d6ebbde69c8c..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_skillset_inplace.yaml +++ /dev/null @@ -1,210 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '253' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7BCAA2A42703160BBB7A7EB13D0570A2 - method: PUT - uri: https://search919b1708.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search919b1708.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC946711539F\"","name":"test-ss","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '588' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:02 GMT - elapsed-time: - - '57' - etag: - - W/"0x8D7EC946711539F" - expires: - - '-1' - location: - - https://search919b1708.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 82abe244-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "test-ss", "description": "desc2", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}], "@odata.etag": "\"0x8D7EC946711539F\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '293' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7BCAA2A42703160BBB7A7EB13D0570A2 - method: PUT - uri: https://search919b1708.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search919b1708.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC94671E9C8A\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '588' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:02 GMT - elapsed-time: - - '55' - etag: - - W/"0x8D7EC94671E9C8A" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 82cbf8ae-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7BCAA2A42703160BBB7A7EB13D0570A2 - method: GET - uri: https://search919b1708.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search919b1708.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7EC94671E9C8A\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '669' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:02 GMT - elapsed-time: - - '86' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 82da5598-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 7BCAA2A42703160BBB7A7EB13D0570A2 - method: GET - uri: https://search919b1708.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search919b1708.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC94671E9C8A\"","name":"test-ss","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '665' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:02 GMT - elapsed-time: - - '14' - etag: - - W/"0x8D7EC94671E9C8A" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 82ed6930-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_synonym_map.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_synonym_map.yaml deleted file mode 100644 index 378f5d010a9eb..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_synonym_map.yaml +++ /dev/null @@ -1,255 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '102' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EC1F64A6D07AB016456D278C08E0D3A0 - method: POST - uri: https://search2351151c.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search2351151c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC94379003F5\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '247' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:42 GMT - elapsed-time: - - '91' - etag: - - W/"0x8D7EC94379003F5" - expires: - - '-1' - location: - - https://search2351151c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 5323a7fa-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EC1F64A6D07AB016456D278C08E0D3A0 - method: GET - uri: https://search2351151c.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search2351151c.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC94379003F5\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:42 GMT - elapsed-time: - - '20' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 534b4f1c-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. - => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '81' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EC1F64A6D07AB016456D278C08E0D3A0 - method: PUT - uri: https://search2351151c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search2351151c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC9437A3416B\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '226' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:42 GMT - elapsed-time: - - '25' - etag: - - W/"0x8D7EC9437A3416B" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 5354ece8-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EC1F64A6D07AB016456D278C08E0D3A0 - method: GET - uri: https://search2351151c.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search2351151c.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC9437A3416B\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '230' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:42 GMT - elapsed-time: - - '9' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 535f2d20-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - EC1F64A6D07AB016456D278C08E0D3A0 - method: GET - uri: https://search2351151c.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search2351151c.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC9437A3416B\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '226' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:42 GMT - elapsed-time: - - '7' - etag: - - W/"0x8D7EC9437A3416B" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 53669bbe-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_synonym_map_if_unchanged.yaml deleted file mode 100644 index b3b5b144edd8d..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_or_update_synonym_map_if_unchanged.yaml +++ /dev/null @@ -1,169 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '102' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46DF28A1622AC6557E74984EDD9A64E7 - method: POST - uri: https://search5a551a56.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search5a551a56.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7ED71502253A0\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '247' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:22 GMT - elapsed-time: - - '36' - etag: - - W/"0x8D7ED71502253A0" - expires: - - '-1' - location: - - https://search5a551a56.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 6bf83b14-8b4d-11ea-b062-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. - => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '81' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46DF28A1622AC6557E74984EDD9A64E7 - method: PUT - uri: https://search5a551a56.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search5a551a56.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7ED715031236D\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '226' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:22 GMT - elapsed-time: - - '16' - etag: - - W/"0x8D7ED715031236D" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 6c3a94da-8b4d-11ea-be03-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "[''USA, United - States, United States of America'']", "@odata.etag": "\"0x8D7ED71502253A0\""}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '146' - Content-Type: - - application/json - If-Match: - - '"0x8D7ED71502253A0"' - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46DF28A1622AC6557E74984EDD9A64E7 - method: PUT - uri: https://search5a551a56.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:22 GMT - elapsed-time: - - '5' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 6c4a90f6-8b4d-11ea-ac9a-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_skillset.yaml deleted file mode 100644 index 0fa770a429c24..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_skillset.yaml +++ /dev/null @@ -1,102 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '252' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 190A4566DDA77F82BEE19B1588A89BA8 - method: POST - uri: https://search31db0fab.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search31db0fab.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC946DEEBBDA\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '587' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:13 GMT - elapsed-time: - - '59' - etag: - - W/"0x8D7EC946DEEBBDA" - expires: - - '-1' - location: - - https://search31db0fab.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 89887280-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 190A4566DDA77F82BEE19B1588A89BA8 - method: GET - uri: https://search31db0fab.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search31db0fab.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7EC946DEEBBDA\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '668' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:13 GMT - elapsed-time: - - '48' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 89a90464-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_synonym_map.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_synonym_map.yaml deleted file mode 100644 index 4a22834865272..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_create_synonym_map.yaml +++ /dev/null @@ -1,103 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America\nWashington, Wash. => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 5466BA2F17F7BB274AF2C6FCDA6EE518 - method: POST - uri: https://search642c10fa.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search642c10fa.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC943E5D3A13\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '272' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:54 GMT - elapsed-time: - - '92' - etag: - - W/"0x8D7EC943E5D3A13" - expires: - - '-1' - location: - - https://search642c10fa.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 59f6f550-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 5466BA2F17F7BB274AF2C6FCDA6EE518 - method: GET - uri: https://search642c10fa.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search642c10fa.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC943E5D3A13\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '276' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:54 GMT - elapsed-time: - - '159' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 5a1b2e5c-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource.yaml deleted file mode 100644 index 1212b611578af..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource.yaml +++ /dev/null @@ -1,186 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1C5B43C52D408683A88B701C2E27EDD2 - method: POST - uri: https://search51a9106a.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search51a9106a.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC94A414B210\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:44 GMT - elapsed-time: - - '34' - etag: - - W/"0x8D7EC94A414B210" - expires: - - '-1' - location: - - https://search51a9106a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - bfb0f2ce-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1C5B43C52D408683A88B701C2E27EDD2 - method: GET - uri: https://search51a9106a.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search51a9106a.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D7EC94A414B210\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '374' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:44 GMT - elapsed-time: - - '63' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - bfcc3b92-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1C5B43C52D408683A88B701C2E27EDD2 - method: DELETE - uri: https://search51a9106a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Wed, 29 Apr 2020 23:25:44 GMT - elapsed-time: - - '20' - expires: - - '-1' - pragma: - - no-cache - request-id: - - bfdc0004-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 1C5B43C52D408683A88B701C2E27EDD2 - method: GET - uri: https://search51a9106a.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search51a9106a.search.windows.net/$metadata#datasources","value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '95' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:44 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - bfe4dfda-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource_if_unchanged.yaml deleted file mode 100644 index 264af1c2567ea..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource_if_unchanged.yaml +++ /dev/null @@ -1,164 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - F1F2BD64ED2A908278EBA8650A6C8DEE - method: POST - uri: https://search4ba315a4.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4ba315a4.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED7181869172\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:45 GMT - elapsed-time: - - '48' - etag: - - W/"0x8D7ED7181869172" - expires: - - '-1' - location: - - https://search4ba315a4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9d5ef89e-8b4d-11ea-ab0b-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '345' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - F1F2BD64ED2A908278EBA8650A6C8DEE - method: PUT - uri: https://search4ba315a4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4ba315a4.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED71819F26FD\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '375' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:45 GMT - elapsed-time: - - '27' - etag: - - W/"0x8D7ED71819F26FD" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9da104c6-8b4d-11ea-8bff-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8D7ED7181869172"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - F1F2BD64ED2A908278EBA8650A6C8DEE - method: DELETE - uri: https://search4ba315a4.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:45 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9db91138-8b4d-11ea-8df5-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource_string_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource_string_if_unchanged.yaml deleted file mode 100644 index a74a646812803..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_datasource_string_if_unchanged.yaml +++ /dev/null @@ -1,112 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 371E8B1C08DCB8B5AEF87D7E375D42AE - method: POST - uri: https://searchf0dc189a.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf0dc189a.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE1DB1EEB45B\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 22:19:19 GMT - elapsed-time: - - '38' - etag: - - W/"0x8D7EE1DB1EEB45B" - expires: - - '-1' - location: - - https://searchf0dc189a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ce408dc8-8bf9-11ea-9a33-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-datasource", "description": "updated", "type": "azureblob", - "credentials": {"connectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '345' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 371E8B1C08DCB8B5AEF87D7E375D42AE - method: PUT - uri: https://searchf0dc189a.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf0dc189a.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE1DB20218D0\"","name":"sample-datasource","description":"updated","type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '375' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 22:19:20 GMT - elapsed-time: - - '36' - etag: - - W/"0x8D7EE1DB20218D0" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ce883c4c-8bf9-11ea-b342-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexer.yaml deleted file mode 100644 index 3417b5aa61980..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexer.yaml +++ /dev/null @@ -1,291 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 9E6C3CF9019ACCA2B66CCE69981C8123 - method: POST - uri: https://search21c10f2e.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21c10f2e.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5125E3C05D\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:07 GMT - elapsed-time: - - '30' - etag: - - W/"0x8D7ED5125E3C05D" - expires: - - '-1' - location: - - https://search21c10f2e.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 41a4e0ac-8b2d-11ea-80e0-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 9E6C3CF9019ACCA2B66CCE69981C8123 - method: POST - uri: https://search21c10f2e.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21c10f2e.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5126BDF45D\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '558' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:09 GMT - elapsed-time: - - '1090' - etag: - - W/"0x8D7ED5126BDF45D" - expires: - - '-1' - location: - - https://search21c10f2e.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 41e982d2-8b2d-11ea-aac9-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 9E6C3CF9019ACCA2B66CCE69981C8123 - method: POST - uri: https://search21c10f2e.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21c10f2e.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5127191D3F\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:10 GMT - elapsed-time: - - '201' - etag: - - W/"0x8D7ED5127191D3F" - expires: - - '-1' - location: - - https://search21c10f2e.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 42cbcdde-8b2d-11ea-ac7d-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 9E6C3CF9019ACCA2B66CCE69981C8123 - method: GET - uri: https://search21c10f2e.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21c10f2e.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5127191D3F\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '366' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:10 GMT - elapsed-time: - - '8' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 43260b80-8b2d-11ea-b5d2-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 9E6C3CF9019ACCA2B66CCE69981C8123 - method: DELETE - uri: https://search21c10f2e.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Thu, 30 Apr 2020 21:55:10 GMT - elapsed-time: - - '99' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 4337b16e-8b2d-11ea-a646-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 9E6C3CF9019ACCA2B66CCE69981C8123 - method: GET - uri: https://search21c10f2e.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21c10f2e.search.windows.net/$metadata#indexers","value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '92' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:10 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 435622e2-8b2d-11ea-97eb-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexer_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexer_if_unchanged.yaml deleted file mode 100644 index b7c19d082a8e9..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexer_if_unchanged.yaml +++ /dev/null @@ -1,268 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E3F54485B0A3180E091774FCC0413692 - method: POST - uri: https://searchbaf1468.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchbaf1468.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EE17BEFA29F2\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '369' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:45 GMT - elapsed-time: - - '45' - etag: - - W/"0x8D7EE17BEFA29F2" - expires: - - '-1' - location: - - https://searchbaf1468.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - db51671a-8bf3-11ea-a801-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E3F54485B0A3180E091774FCC0413692 - method: POST - uri: https://searchbaf1468.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchbaf1468.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EE17BF71C167\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '557' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:46 GMT - elapsed-time: - - '492' - etag: - - W/"0x8D7EE17BF71C167" - expires: - - '-1' - location: - - https://searchbaf1468.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - db9019e8-8bf3-11ea-8645-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E3F54485B0A3180E091774FCC0413692 - method: POST - uri: https://searchbaf1468.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchbaf1468.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17BFE1B5D9\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '361' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:46 GMT - elapsed-time: - - '498' - etag: - - W/"0x8D7EE17BFE1B5D9" - expires: - - '-1' - location: - - https://searchbaf1468.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - dc0b5cde-8bf3-11ea-930e-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "description": "updated", "dataSourceName": - "sample-datasource", "targetIndexName": "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '139' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E3F54485B0A3180E091774FCC0413692 - method: PUT - uri: https://searchbaf1468.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchbaf1468.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7EE17C015077F\"","name":"sample-indexer","description":"updated","dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '366' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:46 GMT - elapsed-time: - - '124' - etag: - - W/"0x8D7EE17C015077F" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - dc8c1cec-8bf3-11ea-844d-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8D7EE17BFE1B5D9"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E3F54485B0A3180E091774FCC0413692 - method: DELETE - uri: https://searchbaf1468.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 21:36:46 GMT - elapsed-time: - - '7' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - dcac37e4-8bf3-11ea-a911-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexes.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexes.yaml deleted file mode 100644 index 5ae73857d8f50..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexes.yaml +++ /dev/null @@ -1,86 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 4047D6344BEF3D3392D3F9E3C29654B1 - method: DELETE - uri: https://search21c20f2f.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Wed, 29 Apr 2020 23:21:42 GMT - elapsed-time: - - '243' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 2eb2ba32-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 4047D6344BEF3D3392D3F9E3C29654B1 - method: GET - uri: https://search21c20f2f.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21c20f2f.search.windows.net/$metadata#indexes","value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '91' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:21:46 GMT - elapsed-time: - - '111' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 321d5592-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexes_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexes_if_unchanged.yaml deleted file mode 100644 index 82f7363da9761..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_indexes_if_unchanged.yaml +++ /dev/null @@ -1,166 +0,0 @@ -interactions: -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [{"name": "MyProfile"}], "corsOptions": {"allowedOrigins": - ["*"], "maxAgeInSeconds": 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '260' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 0ABC8B358D4D85386822B456F8767860 - method: POST - uri: https://searchbbd1469.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchbbd1469.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED714678528F\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[{"name":"MyProfile","functionAggregation":null,"text":null,"functions":[]}],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '889' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:06 GMT - elapsed-time: - - '627' - etag: - - W/"0x8D7ED714678528F" - expires: - - '-1' - location: - - https://searchbbd1469.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 61fbe900-8b4d-11ea-aac9-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}, {"name": "baseRate", "type": "Edm.Double"}], - "scoringProfiles": [], "corsOptions": {"allowedOrigins": ["*"], "maxAgeInSeconds": - 60}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '239' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 0ABC8B358D4D85386822B456F8767860 - method: PUT - uri: https://searchbbd1469.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchbbd1469.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED714695F21D\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":{"allowedOrigins":["*"],"maxAgeInSeconds":60},"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '815' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:06 GMT - elapsed-time: - - '104' - etag: - - W/"0x8D7ED714695F21D" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 629611e8-8b4d-11ea-ad52-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8D7ED714678528F"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 0ABC8B358D4D85386822B456F8767860 - method: DELETE - uri: https://searchbbd1469.search.windows.net/indexes('hotels')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:06 GMT - elapsed-time: - - '15' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 62b2aff8-8b4d-11ea-8440-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_skillset.yaml deleted file mode 100644 index b443f335f537f..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_skillset.yaml +++ /dev/null @@ -1,186 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '252' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 9715B5769069781F16C928BBC2605D8E - method: POST - uri: https://search31bf0faa.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search31bf0faa.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC9474EB318F\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '587' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:25 GMT - elapsed-time: - - '56' - etag: - - W/"0x8D7EC9474EB318F" - expires: - - '-1' - location: - - https://search31bf0faa.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 9083abcc-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 9715B5769069781F16C928BBC2605D8E - method: GET - uri: https://search31bf0faa.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search31bf0faa.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7EC9474EB318F\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '668' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:25 GMT - elapsed-time: - - '26' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 90a4d9b4-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 9715B5769069781F16C928BBC2605D8E - method: DELETE - uri: https://search31bf0faa.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Wed, 29 Apr 2020 23:24:25 GMT - elapsed-time: - - '38' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 90aece9c-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 9715B5769069781F16C928BBC2605D8E - method: GET - uri: https://search31bf0faa.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search31bf0faa.search.windows.net/$metadata#skillsets","value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '93' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:25 GMT - elapsed-time: - - '14' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 90ba3d72-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_skillset_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_skillset_if_unchanged.yaml deleted file mode 100644 index eb6907a14ee5a..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_skillset_if_unchanged.yaml +++ /dev/null @@ -1,165 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '252' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E5E890D66B801E7867C9E374922FC838 - method: POST - uri: https://search21f914e4.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21f914e4.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7ED716DB3B0F7\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '587' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:12 GMT - elapsed-time: - - '37' - etag: - - W/"0x8D7ED716DB3B0F7" - expires: - - '-1' - location: - - https://search21f914e4.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 8979c398-8b4d-11ea-879a-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "test-ss", "description": "updated", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '255' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E5E890D66B801E7867C9E374922FC838 - method: PUT - uri: https://search21f914e4.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search21f914e4.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7ED716DCDF47B\"","name":"test-ss","description":"updated","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '590' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:12 GMT - elapsed-time: - - '52' - etag: - - W/"0x8D7ED716DCDF47B" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 89ce1288-8b4d-11ea-973d-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8D7ED716DB3B0F7"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - E5E890D66B801E7867C9E374922FC838 - method: DELETE - uri: https://search21f914e4.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:46:12 GMT - elapsed-time: - - '10' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 89e92918-8b4d-11ea-882a-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_synonym_map.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_synonym_map.yaml deleted file mode 100644 index 1b4b8025864ab..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_synonym_map.yaml +++ /dev/null @@ -1,187 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America\nWashington, Wash. => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 14E7C5E27E195E2E30A41D7A548E964C - method: POST - uri: https://search640d10f9.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search640d10f9.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC944ADA1B1D\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '272' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:15 GMT - elapsed-time: - - '34' - etag: - - W/"0x8D7EC944ADA1B1D" - expires: - - '-1' - location: - - https://search640d10f9.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 66795110-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 14E7C5E27E195E2E30A41D7A548E964C - method: GET - uri: https://search640d10f9.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search640d10f9.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC944ADA1B1D\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '276' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:15 GMT - elapsed-time: - - '9' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 66941716-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 14E7C5E27E195E2E30A41D7A548E964C - method: DELETE - uri: https://search640d10f9.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Wed, 29 Apr 2020 23:23:15 GMT - elapsed-time: - - '15' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 669b6606-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 14E7C5E27E195E2E30A41D7A548E964C - method: GET - uri: https://search640d10f9.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search640d10f9.search.windows.net/$metadata#synonymmaps","value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '95' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:15 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 66a40cca-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_synonym_map_if_unchanged.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_synonym_map_if_unchanged.yaml deleted file mode 100644 index 298252573320b..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_delete_synonym_map_if_unchanged.yaml +++ /dev/null @@ -1,164 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America\nWashington, Wash. => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 3C7456D14A4C1D58E3B5C8338B829E8D - method: POST - uri: https://search654a1633.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search654a1633.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7ED715978F503\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '272' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:38 GMT - elapsed-time: - - '21' - etag: - - W/"0x8D7ED715978F503" - expires: - - '-1' - location: - - https://search654a1633.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 754dfc4c-8b4d-11ea-abb2-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "Washington, Wash. - => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '81' - Content-Type: - - application/json - Prefer: - - return=representation - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 3C7456D14A4C1D58E3B5C8338B829E8D - method: PUT - uri: https://search654a1633.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search654a1633.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7ED71598DB954\"","name":"test-syn-map","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '226' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:38 GMT - elapsed-time: - - '23' - etag: - - W/"0x8D7ED71598DB954" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 75922b10-8b4d-11ea-b5a8-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8D7ED715978F503"' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 3C7456D14A4C1D58E3B5C8338B829E8D - method: DELETE - uri: https://search654a1633.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"error":{"code":"","message":"The precondition given in one of the - request headers evaluated to false. No change was made to the resource from - this request."}}' - headers: - cache-control: - - no-cache - content-language: - - en - content-length: - - '160' - content-type: - - application/json; odata.metadata=minimal - date: - - Fri, 01 May 2020 01:45:38 GMT - elapsed-time: - - '4' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 75a7793e-8b4d-11ea-9310-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 412 - message: Precondition Failed -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_datasource.yaml deleted file mode 100644 index 2f08af96df395..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_datasource.yaml +++ /dev/null @@ -1,104 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E49D04111DCB1738A561CC9902D552FE - method: POST - uri: https://search22270f37.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search22270f37.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC94AADF76DE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:55 GMT - elapsed-time: - - '47' - etag: - - W/"0x8D7EC94AADF76DE" - expires: - - '-1' - location: - - https://search22270f37.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - c677b57a-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E49D04111DCB1738A561CC9902D552FE - method: GET - uri: https://search22270f37.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search22270f37.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC94AADF76DE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:55 GMT - elapsed-time: - - '28' - etag: - - W/"0x8D7EC94AADF76DE" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - c696f4d0-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_index.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_index.yaml deleted file mode 100644 index 1716e52358a63..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_index.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 61B995D646A110CCEC888B68E298FD85 - method: GET - uri: https://searchda450d24.search.windows.net/indexes('drgqefsg')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchda450d24.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7EC941B4C6FB2\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '6156' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:21:59 GMT - elapsed-time: - - '46' - etag: - - W/"0x8D7EC941B4C6FB2" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 39421e20-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_index_statistics.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_index_statistics.yaml deleted file mode 100644 index abdc5d5ea81da..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_index_statistics.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6FBCE200FF6D960D275576AD2F8FB6F7 - method: GET - uri: https://search86b411ce.search.windows.net/indexes('drgqefsg')/search.stats?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search86b411ce.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexStatistics","documentCount":0,"storageSize":0}' - headers: - cache-control: - - no-cache - content-length: - - '165' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:11 GMT - elapsed-time: - - '105' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 405f58da-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_indexer.yaml deleted file mode 100644 index 87df466b67941..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_indexer.yaml +++ /dev/null @@ -1,209 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EF6DF05F92A8948F94DCE2B89C2D1E9C - method: POST - uri: https://searchf5c90dfb.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf5c90dfb.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5130775CFC\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:25 GMT - elapsed-time: - - '56' - etag: - - W/"0x8D7ED5130775CFC" - expires: - - '-1' - location: - - https://searchf5c90dfb.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 4c3ea7da-8b2d-11ea-8524-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EF6DF05F92A8948F94DCE2B89C2D1E9C - method: POST - uri: https://searchf5c90dfb.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf5c90dfb.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED51313C576E\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '558' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:27 GMT - elapsed-time: - - '879' - etag: - - W/"0x8D7ED51313C576E" - expires: - - '-1' - location: - - https://searchf5c90dfb.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 4c7cbf1e-8b2d-11ea-a414-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EF6DF05F92A8948F94DCE2B89C2D1E9C - method: POST - uri: https://searchf5c90dfb.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf5c90dfb.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5131BBB0C0\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:28 GMT - elapsed-time: - - '544' - etag: - - W/"0x8D7ED5131BBB0C0" - expires: - - '-1' - location: - - https://searchf5c90dfb.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 4d4946ee-8b2d-11ea-9df9-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - EF6DF05F92A8948F94DCE2B89C2D1E9C - method: GET - uri: https://searchf5c90dfb.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf5c90dfb.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5131BBB0C0\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:28 GMT - elapsed-time: - - '9' - etag: - - W/"0x8D7ED5131BBB0C0" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 4dd6800c-8b2d-11ea-ba87-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_indexer_status.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_indexer_status.yaml deleted file mode 100644 index 2b2236927f69d..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_indexer_status.yaml +++ /dev/null @@ -1,207 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 58F301B68D82458CCAFF56AF190D90E9 - method: POST - uri: https://search638110fe.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search638110fe.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED513BD34FD0\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:44 GMT - elapsed-time: - - '48' - etag: - - W/"0x8D7ED513BD34FD0" - expires: - - '-1' - location: - - https://search638110fe.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 5796c2d2-8b2d-11ea-a954-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 58F301B68D82458CCAFF56AF190D90E9 - method: POST - uri: https://search638110fe.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search638110fe.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED513C63EA4A\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '558' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:45 GMT - elapsed-time: - - '469' - etag: - - W/"0x8D7ED513C63EA4A" - expires: - - '-1' - location: - - https://search638110fe.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 57d945a6-8b2d-11ea-a995-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 58F301B68D82458CCAFF56AF190D90E9 - method: POST - uri: https://search638110fe.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search638110fe.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED513CD9A4E5\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:45 GMT - elapsed-time: - - '484' - etag: - - W/"0x8D7ED513CD9A4E5" - expires: - - '-1' - location: - - https://search638110fe.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 586c971a-8b2d-11ea-bcad-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 58F301B68D82458CCAFF56AF190D90E9 - method: GET - uri: https://search638110fe.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search638110fe.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":null,"executionHistory":[],"limits":{"maxRunTime":"PT0S","maxDocumentExtractionSize":0,"maxDocumentContentCharactersToExtract":0}}' - headers: - cache-control: - - no-cache - content-length: - - '322' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:55:45 GMT - elapsed-time: - - '13' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 58f2f5a4-8b2d-11ea-9e2c-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_service_statistics.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_service_statistics.yaml deleted file mode 100644 index 32a7cfd386c46..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_service_statistics.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 9099402AA5DD674D2F4AB5E4CFAE0073 - method: GET - uri: https://searchabe712a7.search.windows.net/servicestats?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchabe712a7.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.ServiceStatistics","counters":{"documentCount":{"usage":0,"quota":null},"indexesCount":{"usage":0,"quota":3},"indexersCount":{"usage":0,"quota":3},"dataSourcesCount":{"usage":0,"quota":3},"storageSize":{"usage":0,"quota":52428800},"synonymMaps":{"usage":0,"quota":3},"skillsetCount":{"usage":0,"quota":3}},"limits":{"maxFieldsPerIndex":1000,"maxFieldNestingDepthPerIndex":10,"maxComplexCollectionFieldsPerIndex":40,"maxComplexObjectsInCollectionsPerDocument":3000}}' - headers: - cache-control: - - no-cache - content-length: - - '579' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:20:34 GMT - elapsed-time: - - '52' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 06b3ad20-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_skillset.yaml deleted file mode 100644 index 143a1beb35506..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_skillset.yaml +++ /dev/null @@ -1,150 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '252' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E526608EB11E433B65F1F2591FD92E31 - method: POST - uri: https://search4a30e77.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4a30e77.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC947C1D56A3\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '586' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:37 GMT - elapsed-time: - - '62' - etag: - - W/"0x8D7EC947C1D56A3" - expires: - - '-1' - location: - - https://search4a30e77.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 97b78ada-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E526608EB11E433B65F1F2591FD92E31 - method: GET - uri: https://search4a30e77.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4a30e77.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7EC947C1D56A3\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '667' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:37 GMT - elapsed-time: - - '45' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 97d70fb8-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - E526608EB11E433B65F1F2591FD92E31 - method: GET - uri: https://search4a30e77.search.windows.net/skillsets('test-ss')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4a30e77.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC947C1D56A3\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '663' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:24:37 GMT - elapsed-time: - - '19' - etag: - - W/"0x8D7EC947C1D56A3" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 97e45696-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_skillsets.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_skillsets.yaml deleted file mode 100644 index 9bbd6107bd15f..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_skillsets.yaml +++ /dev/null @@ -1,158 +0,0 @@ -interactions: -- request: - body: '{"name": "test-ss-1", "description": "desc1", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '255' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B6B0828C8EC0450A923A37B8076FB654 - method: POST - uri: https://search138d0eea.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search138d0eea.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC948D7A3762\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '590' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:06 GMT - elapsed-time: - - '448' - etag: - - W/"0x8D7EC948D7A3762" - expires: - - '-1' - location: - - https://search138d0eea.search.windows.net/skillsets('test-ss-1')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - a8d85132-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "test-ss-2", "description": "desc2", "skills": [{"@odata.type": - "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [{"name": "text", - "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": - "organizations"}]}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '255' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B6B0828C8EC0450A923A37B8076FB654 - method: POST - uri: https://search138d0eea.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search138d0eea.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D7EC948D8BEDF0\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}' - headers: - cache-control: - - no-cache - content-length: - - '590' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:06 GMT - elapsed-time: - - '50' - etag: - - W/"0x8D7EC948D8BEDF0" - expires: - - '-1' - location: - - https://search138d0eea.search.windows.net/skillsets('test-ss-2')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - a937a1d2-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - B6B0828C8EC0450A923A37B8076FB654 - method: GET - uri: https://search138d0eea.search.windows.net/skillsets?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search138d0eea.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D7EC948D7A3762\"","name":"test-ss-1","description":"desc1","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null},{"@odata.etag":"\"0x8D7EC948D8BEDF0\"","name":"test-ss-2","description":"desc2","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizations"}]}],"cognitiveServices":null,"knowledgeStore":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '1250' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:25:06 GMT - elapsed-time: - - '28' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - a94595d0-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_synonym_map.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_synonym_map.yaml deleted file mode 100644 index 68c3546bd7488..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_synonym_map.yaml +++ /dev/null @@ -1,152 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map", "format": "solr", "synonyms": "USA, United States, - United States of America\nWashington, Wash. => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '127' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6778A373F35558F2511949D53BFE7365 - method: POST - uri: https://search33580fc6.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search33580fc6.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC94518B5F89\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '272' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:26 GMT - elapsed-time: - - '59' - etag: - - W/"0x8D7EC94518B5F89" - expires: - - '-1' - location: - - https://search33580fc6.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 6d2a446a-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6778A373F35558F2511949D53BFE7365 - method: GET - uri: https://search33580fc6.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search33580fc6.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC94518B5F89\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '276' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:26 GMT - elapsed-time: - - '114' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 6d48cfd4-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6778A373F35558F2511949D53BFE7365 - method: GET - uri: https://search33580fc6.search.windows.net/synonymmaps('test-syn-map')?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search33580fc6.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC94518B5F89\"","name":"test-syn-map","format":"solr","synonyms":"USA, - United States, United States of America\nWashington, Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '272' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:26 GMT - elapsed-time: - - '6' - etag: - - W/"0x8D7EC94518B5F89" - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 6d609484-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_synonym_maps.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_synonym_maps.yaml deleted file mode 100644 index 696685d5fb0b0..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_get_synonym_maps.yaml +++ /dev/null @@ -1,158 +0,0 @@ -interactions: -- request: - body: '{"name": "test-syn-map-1", "format": "solr", "synonyms": "USA, United States, - United States of America"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '104' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F38023663AA7831EE2B4F0FB244EF306 - method: POST - uri: https://search43911039.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search43911039.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC9458B82C72\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '249' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:38 GMT - elapsed-time: - - '52' - etag: - - W/"0x8D7EC9458B82C72" - expires: - - '-1' - location: - - https://search43911039.search.windows.net/synonymmaps('test-syn-map-1')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 744fc42c-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "test-syn-map-2", "format": "solr", "synonyms": "Washington, Wash. - => WA"}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '83' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F38023663AA7831EE2B4F0FB244EF306 - method: POST - uri: https://search43911039.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search43911039.search.windows.net/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D7EC9458C32AF7\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}' - headers: - cache-control: - - no-cache - content-length: - - '228' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:38 GMT - elapsed-time: - - '29' - etag: - - W/"0x8D7EC9458C32AF7" - expires: - - '-1' - location: - - https://search43911039.search.windows.net/synonymmaps('test-syn-map-2')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7471f916-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - F38023663AA7831EE2B4F0FB244EF306 - method: GET - uri: https://search43911039.search.windows.net/synonymmaps?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search43911039.search.windows.net/$metadata#synonymmaps","value":[{"@odata.etag":"\"0x8D7EC9458B82C72\"","name":"test-syn-map-1","format":"solr","synonyms":"USA, - United States, United States of America","encryptionKey":null},{"@odata.etag":"\"0x8D7EC9458C32AF7\"","name":"test-syn-map-2","format":"solr","synonyms":"Washington, - Wash. => WA","encryptionKey":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '391' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:23:38 GMT - elapsed-time: - - '14' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 747cf122-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_datasource.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_datasource.yaml deleted file mode 100644 index 56c150e0722f8..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_datasource.yaml +++ /dev/null @@ -1,156 +0,0 @@ -interactions: -- request: - body: '{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '319' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6C051A73A19918FEDC9EFD419203F1C7 - method: POST - uri: https://search32ba0fb3.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search32ba0fb3.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC94B2E20FAE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:26:09 GMT - elapsed-time: - - '56' - etag: - - W/"0x8D7EC94B2E20FAE" - expires: - - '-1' - location: - - https://search32ba0fb3.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ce7ab0c4-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "another-sample", "type": "azureblob", "credentials": {"connectionString": - "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net"}, - "container": {"name": "searchcontainer"}}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '316' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6C051A73A19918FEDC9EFD419203F1C7 - method: POST - uri: https://search32ba0fb3.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search32ba0fb3.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7EC94B2ED837E\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:26:09 GMT - elapsed-time: - - '34' - etag: - - W/"0x8D7EC94B2ED837E" - expires: - - '-1' - location: - - https://search32ba0fb3.search.windows.net/datasources('another-sample')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ce9983c8-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 6C051A73A19918FEDC9EFD419203F1C7 - method: GET - uri: https://search32ba0fb3.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search32ba0fb3.search.windows.net/$metadata#datasources","value":[{"@odata.etag":"\"0x8D7EC94B2ED837E\"","name":"another-sample","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null},{"@odata.etag":"\"0x8D7EC94B2E20FAE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:26:09 GMT - elapsed-time: - - '18' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - cea47c42-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexer.yaml deleted file mode 100644 index 58b99fddae0de..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexer.yaml +++ /dev/null @@ -1,366 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - FAD6BE165A2964FC68B2409CBD3188D3 - method: POST - uri: https://search4f70e77.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4f70e77.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5146AB7BFE\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '369' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:03 GMT - elapsed-time: - - '78' - etag: - - W/"0x8D7ED5146AB7BFE" - expires: - - '-1' - location: - - https://search4f70e77.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 6268263a-8b2d-11ea-8b3a-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - FAD6BE165A2964FC68B2409CBD3188D3 - method: POST - uri: https://search4f70e77.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4f70e77.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5147408421\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '557' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:03 GMT - elapsed-time: - - '501' - etag: - - W/"0x8D7ED5147408421" - expires: - - '-1' - location: - - https://search4f70e77.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 62b10964-8b2d-11ea-aa1f-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: 'b''{"name": "another-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '322' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - FAD6BE165A2964FC68B2409CBD3188D3 - method: POST - uri: https://search4f70e77.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4f70e77.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED514792D1C2\"","name":"another-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:03 GMT - elapsed-time: - - '29' - etag: - - W/"0x8D7ED514792D1C2" - expires: - - '-1' - location: - - https://search4f70e77.search.windows.net/datasources('another-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 634ba6ee-8b2d-11ea-b3b9-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "another-index", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '114' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - FAD6BE165A2964FC68B2409CBD3188D3 - method: POST - uri: https://search4f70e77.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4f70e77.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED51484C7F82\"","name":"another-index","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '564' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:05 GMT - elapsed-time: - - '869' - etag: - - W/"0x8D7ED51484C7F82" - expires: - - '-1' - location: - - https://search4f70e77.search.windows.net/indexes('another-index')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 63979858-8b2d-11ea-baf6-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - FAD6BE165A2964FC68B2409CBD3188D3 - method: POST - uri: https://search4f70e77.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4f70e77.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED51489A5F94\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '361' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:06 GMT - elapsed-time: - - '168' - etag: - - W/"0x8D7ED51489A5F94" - expires: - - '-1' - location: - - https://search4f70e77.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 645647e8-8b2d-11ea-a877-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "another-indexer", "dataSourceName": "another-datasource", "targetIndexName": - "another-index", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '122' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - FAD6BE165A2964FC68B2409CBD3188D3 - method: POST - uri: https://search4f70e77.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4f70e77.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5148C94048\"","name":"another-indexer","description":null,"dataSourceName":"another-datasource","skillsetName":null,"targetIndexName":"another-index","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:06 GMT - elapsed-time: - - '191' - etag: - - W/"0x8D7ED5148C94048" - expires: - - '-1' - location: - - https://search4f70e77.search.windows.net/indexers('another-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 64a826a2-8b2d-11ea-bfa5-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - FAD6BE165A2964FC68B2409CBD3188D3 - method: GET - uri: https://search4f70e77.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4f70e77.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5148C94048\"","name":"another-indexer","description":null,"dataSourceName":"another-datasource","skillsetName":null,"targetIndexName":"another-index","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null},{"@odata.etag":"\"0x8D7ED51489A5F94\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '649' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:06 GMT - elapsed-time: - - '33' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 64d7a0c2-8b2d-11ea-95d8-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexes.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexes.yaml deleted file mode 100644 index b20808a684b59..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexes.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - FF50C21851A8A287CCB25DE530228B72 - method: GET - uri: https://search4f80e78.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search4f80e78.search.windows.net/$metadata#indexes","value":[{"@odata.etag":"\"0x8D7EC94296AF173\"","name":"drgqefsg","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"hotelName","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"category","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"parkingIncluded","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"lastRenovationDate","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"rating","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"location","type":"Edm.GeographyPoint","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"address","type":"Edm.ComplexType","fields":[{"name":"streetAddress","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"city","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"stateProvince","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"country","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"postalCode","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]},{"name":"rooms","type":"Collection(Edm.ComplexType)","fields":[{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"en.lucene","synonymMaps":[]},{"name":"descriptionFr","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":"fr.lucene","synonymMaps":[]},{"name":"type","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"baseRate","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"bedOptions","type":"Edm.String","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"sleepsCount","type":"Edm.Int32","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"smokingAllowed","type":"Edm.Boolean","searchable":false,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]},{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":true,"retrievable":true,"sortable":false,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}]}],"scoringProfiles":[{"name":"nearest","functionAggregation":"sum","text":null,"functions":[{"fieldName":"location","interpolation":"linear","type":"distance","boost":2.0,"freshness":null,"magnitude":null,"distance":{"referencePointParameter":"myloc","boostingDistance":100.0},"tag":null}]}],"corsOptions":null,"suggesters":[{"name":"sg","searchMode":"analyzingInfixMatching","sourceFields":["description","hotelName"]}],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '6159' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:22 GMT - elapsed-time: - - '76' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 474ae466-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexes_empty.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexes_empty.yaml deleted file mode 100644 index 6de55d5d250d2..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_list_indexes_empty.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Darwin-19.3.0-x86_64-i386-64bit) - api-key: - - 5E8598A1BBC6C32219175B1F71F10648 - method: GET - uri: https://search64601106.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search64601106.search.windows.net/$metadata#indexes","value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '91' - content-type: - - application/json; odata.metadata=minimal - date: - - Wed, 29 Apr 2020 23:22:30 GMT - elapsed-time: - - '54' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 4bf82de8-8a70-11ea-889b-8c8590507855 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_reset_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_reset_indexer.yaml deleted file mode 100644 index efe4cc0736bd3..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_reset_indexer.yaml +++ /dev/null @@ -1,291 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7F271F32C4D5BFC55396C3FF580E49E7 - method: POST - uri: https://search13bc0ede.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search13bc0ede.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED51B1466EFF\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:59:01 GMT - elapsed-time: - - '52' - etag: - - W/"0x8D7ED51B1466EFF" - expires: - - '-1' - location: - - https://search13bc0ede.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - cd1d664c-8b2d-11ea-96b0-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7F271F32C4D5BFC55396C3FF580E49E7 - method: POST - uri: https://search13bc0ede.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search13bc0ede.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED51B2085B9F\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '558' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:59:03 GMT - elapsed-time: - - '940' - etag: - - W/"0x8D7ED51B2085B9F" - expires: - - '-1' - location: - - https://search13bc0ede.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - cd4b0f40-8b2d-11ea-b316-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7F271F32C4D5BFC55396C3FF580E49E7 - method: POST - uri: https://search13bc0ede.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search13bc0ede.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED51B275D75A\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:59:03 GMT - elapsed-time: - - '524' - etag: - - W/"0x8D7ED51B275D75A" - expires: - - '-1' - location: - - https://search13bc0ede.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ce107046-8b2d-11ea-8aa0-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7F271F32C4D5BFC55396C3FF580E49E7 - method: GET - uri: https://search13bc0ede.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search13bc0ede.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED51B275D75A\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '366' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:59:03 GMT - elapsed-time: - - '19' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ce880c1e-8b2d-11ea-89cc-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7F271F32C4D5BFC55396C3FF580E49E7 - method: POST - uri: https://search13bc0ede.search.windows.net/indexers('sample-indexer')/search.reset?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Thu, 30 Apr 2020 21:59:03 GMT - elapsed-time: - - '137' - expires: - - '-1' - pragma: - - no-cache - request-id: - - ce976af4-8b2d-11ea-827e-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 7F271F32C4D5BFC55396C3FF580E49E7 - method: GET - uri: https://search13bc0ede.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://search13bc0ede.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":{"status":"reset","errorMessage":null,"startTime":"2020-04-30T21:59:04.132Z","endTime":"2020-04-30T21:59:04.132Z","itemsProcessed":0,"itemsFailed":0,"initialTrackingState":null,"finalTrackingState":null,"errors":[],"warnings":[],"metrics":null},"executionHistory":[{"status":"reset","errorMessage":null,"startTime":"2020-04-30T21:59:04.132Z","endTime":"2020-04-30T21:59:04.132Z","itemsProcessed":0,"itemsFailed":0,"initialTrackingState":null,"finalTrackingState":null,"errors":[],"warnings":[],"metrics":null}],"limits":null}' - headers: - cache-control: - - no-cache - content-length: - - '717' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:59:03 GMT - elapsed-time: - - '10' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - ceb981ae-8b2d-11ea-989d-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_run_indexer.yaml b/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_run_indexer.yaml deleted file mode 100644 index 21529220b0d4b..0000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_service_live.test_run_indexer.yaml +++ /dev/null @@ -1,293 +0,0 @@ -interactions: -- request: - body: 'b''{"name": "sample-datasource", "type": "azureblob", "credentials": {"connectionString": - "connection_string"}, "container": {"name": "searchcontainer"}}''' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '321' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46F2314D8E0FDB67E7AB8379484C7D80 - method: POST - uri: https://searchf6ac0e10.search.windows.net/datasources?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf6ac0e10.search.windows.net/$metadata#datasources/$entity","@odata.etag":"\"0x8D7ED5160A7FF06\"","name":"sample-datasource","description":null,"type":"azureblob","subtype":null,"credentials":{"connectionString":null},"container":{"name":"searchcontainer","query":null},"dataChangeDetectionPolicy":null,"dataDeletionDetectionPolicy":null}' - headers: - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:46 GMT - elapsed-time: - - '29' - etag: - - W/"0x8D7ED5160A7FF06" - expires: - - '-1' - location: - - https://searchf6ac0e10.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7c6fe9be-8b2d-11ea-ad55-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "hotels", "fields": [{"name": "hotelId", "type": "Edm.String", - "key": true, "searchable": false}]}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '107' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46F2314D8E0FDB67E7AB8379484C7D80 - method: POST - uri: https://searchf6ac0e10.search.windows.net/indexes?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf6ac0e10.search.windows.net/$metadata#indexes/$entity","@odata.etag":"\"0x8D7ED5162298E08\"","name":"hotels","defaultScoringProfile":null,"fields":[{"name":"hotelId","type":"Edm.String","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":null}' - headers: - cache-control: - - no-cache - content-length: - - '558' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:48 GMT - elapsed-time: - - '2086' - etag: - - W/"0x8D7ED5162298E08" - expires: - - '-1' - location: - - https://searchf6ac0e10.search.windows.net/indexes('hotels')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7cad8bf4-8b2d-11ea-ac77-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: '{"name": "sample-indexer", "dataSourceName": "sample-datasource", "targetIndexName": - "hotels", "disabled": false}' - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '113' - Content-Type: - - application/json - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46F2314D8E0FDB67E7AB8379484C7D80 - method: POST - uri: https://searchf6ac0e10.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf6ac0e10.search.windows.net/$metadata#indexers/$entity","@odata.etag":"\"0x8D7ED5162765C60\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}' - headers: - cache-control: - - no-cache - content-length: - - '362' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:49 GMT - elapsed-time: - - '181' - etag: - - W/"0x8D7ED5162765C60" - expires: - - '-1' - location: - - https://searchf6ac0e10.search.windows.net/indexers('sample-indexer')?api-version=2020-06-30 - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7e350d6e-8b2d-11ea-acce-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46F2314D8E0FDB67E7AB8379484C7D80 - method: GET - uri: https://searchf6ac0e10.search.windows.net/indexers?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf6ac0e10.search.windows.net/$metadata#indexers","value":[{"@odata.etag":"\"0x8D7ED5162765C60\"","name":"sample-indexer","description":null,"dataSourceName":"sample-datasource","skillsetName":null,"targetIndexName":"hotels","disabled":false,"schedule":null,"parameters":null,"fieldMappings":[],"outputFieldMappings":[],"cache":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '366' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:49 GMT - elapsed-time: - - '14' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7e83e1ca-8b2d-11ea-9cad-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46F2314D8E0FDB67E7AB8379484C7D80 - method: POST - uri: https://searchf6ac0e10.search.windows.net/indexers('sample-indexer')/search.run?api-version=2020-06-30 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 30 Apr 2020 21:56:49 GMT - elapsed-time: - - '32' - expires: - - '-1' - pragma: - - no-cache - request-id: - - 7ea7941a-8b2d-11ea-95d9-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json;odata.metadata=minimal - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-search-documents/1.0.0b3 Python/3.7.3 (Windows-10-10.0.17763-SP0) - api-key: - - 46F2314D8E0FDB67E7AB8379484C7D80 - method: GET - uri: https://searchf6ac0e10.search.windows.net/indexers('sample-indexer')/search.status?api-version=2020-06-30 - response: - body: - string: '{"@odata.context":"https://searchf6ac0e10.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06_Preview.IndexerExecutionInfo","name":"sample-indexer","status":"running","lastResult":null,"executionHistory":[],"limits":{"maxRunTime":"PT0S","maxDocumentExtractionSize":0,"maxDocumentContentCharactersToExtract":0}}' - headers: - cache-control: - - no-cache - content-length: - - '322' - content-type: - - application/json; odata.metadata=minimal - date: - - Thu, 30 Apr 2020 21:56:49 GMT - elapsed-time: - - '11' - expires: - - '-1' - odata-version: - - '4.0' - pragma: - - no-cache - preference-applied: - - odata.include-annotations="*" - request-id: - - 7ec283d0-8b2d-11ea-80c9-2816a845e8c6 - strict-transport-security: - - max-age=15724800; includeSubDomains - vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/search/azure-search-documents/tests/test_batching_client.py b/sdk/search/azure-search-documents/tests/test_batching_client.py index 5ec9d86ccf495..3add83fb8b853 100644 --- a/sdk/search/azure-search-documents/tests/test_batching_client.py +++ b/sdk/search/azure-search-documents/tests/test_batching_client.py @@ -11,21 +11,22 @@ SearchIndexDocumentBatchingClient, ) from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError CREDENTIAL = AzureKeyCredential(key="test_api_key") class TestSearchBatchingClient(object): def test_search_index_document_batching_client_kwargs(self): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=100, batch_size=100) + client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=100) - assert client.batch_size == 100 + assert client.batch_size == 1000 assert client._window == 100 assert client._auto_flush client.close() def test_batch_queue(self): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL) + client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, auto_flush=False) assert client._index_documents_batch client.add_upload_actions(["upload1"]) @@ -37,51 +38,44 @@ def test_batch_queue(self): assert len(client.actions) == 0 client._index_documents_batch.enqueue_actions(actions) assert len(client.actions) == 7 - - - def test_succeeded_queue(self): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL) - - assert client._index_documents_batch - client.add_upload_actions(["upload1"]) - client.add_delete_actions(["delete1", "delete2"]) - client.add_merge_actions(["merge1", "merge2", "merge3"]) - client.add_merge_or_upload_actions(["merge_or_upload1"]) actions = client._index_documents_batch.dequeue_actions() - client._index_documents_batch.enqueue_succeeded_actions(actions) - assert len(client.succeeded_actions) == 7 - - - def test_failed_queue(self): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL) - - assert client._index_documents_batch - client.add_upload_actions(["upload1"]) - client.add_delete_actions(["delete1", "delete2"]) - client.add_merge_actions(["merge1", "merge2", "merge3"]) - client.add_merge_or_upload_actions(["merge_or_upload1"]) - actions = client._index_documents_batch.dequeue_actions() - client._index_documents_batch.enqueue_failed_actions(actions) - assert len(client.failed_actions) == 7 + assert len(client.actions) == 0 + for action in actions: + client._index_documents_batch.enqueue_action(action) + assert len(client.actions) == 7 @mock.patch( - "azure.search.documents._internal._search_index_document_batching_client.SearchIndexDocumentBatchingClient.flush" + "azure.search.documents._internal._search_index_document_batching_client.SearchIndexDocumentBatchingClient._process_if_needed" ) - def test_flush_if_needed(self, mock_flush): - client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=1000, batch_size=2) + def test_process_if_needed(self, mock_process_if_needed): + client = SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=1000, auto_flush=False) client.add_upload_actions(["upload1"]) client.add_delete_actions(["delete1", "delete2"]) - assert mock_flush.called - client.close() + assert mock_process_if_needed.called @mock.patch( "azure.search.documents._internal._search_index_document_batching_client.SearchIndexDocumentBatchingClient._cleanup" ) def test_context_manager(self, mock_cleanup): - with SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL) as client: + with SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, auto_flush=False) as client: client.add_upload_actions(["upload1"]) client.add_delete_actions(["delete1", "delete2"]) assert mock_cleanup.called + + def test_flush(self): + DOCUMENT = { + 'Category': 'Hotel', + 'HotelId': '1000', + 'Rating': 4.0, + 'Rooms': [], + 'HotelName': 'Azure Inn', + } + with mock.patch.object(SearchIndexDocumentBatchingClient, "_index_documents_actions", side_effect=HttpResponseError("Error")): + with SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, auto_flush=False) as client: + client._index_key = "HotelId" + client.add_upload_actions([DOCUMENT]) + client.flush() + assert len(client.actions) == 0 diff --git a/sdk/search/azure-search-documents/tests/test_index_live.py b/sdk/search/azure-search-documents/tests/test_index_live.py deleted file mode 100644 index 8b8317c14126d..0000000000000 --- a/sdk/search/azure-search-documents/tests/test_index_live.py +++ /dev/null @@ -1,330 +0,0 @@ -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -import json -from os.path import dirname, join, realpath -import time - -import pytest - -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - -from search_service_preparer import SearchServicePreparer - -CWD = dirname(realpath(__file__)) - -SCHEMA = open(join(CWD, "hotel_schema.json")).read() -BATCH = json.load(open(join(CWD, "hotel_small.json"))) - -from azure.core.exceptions import HttpResponseError -from azure.core.credentials import AzureKeyCredential -from azure.search.documents import SearchClient - -TIME_TO_SLEEP = 3 - -class SearchClientTest(AzureMgmtTestCase): - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_document_count(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - assert client.get_document_count() == 10 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_document(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - for hotel_id in range(1, 11): - result = client.get_document(key=str(hotel_id)) - expected = BATCH["value"][hotel_id - 1] - assert result.get("hotelId") == expected.get("hotelId") - assert result.get("hotelName") == expected.get("hotelName") - assert result.get("description") == expected.get("description") - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_document_missing(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - with pytest.raises(HttpResponseError): - client.get_document(key="1000") - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_search_simple(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - results = list(client.search(search_text="hotel")) - assert len(results) == 7 - - results = list(client.search(search_text="motel")) - assert len(results) == 2 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_search_filter(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - select = ("hotelName", "category", "description") - results = list(client.search( - search_text="WiFi", - filter="category eq 'Budget'", - select=",".join(select), - order_by="hotelName desc" - )) - assert [x["hotelName"] for x in results] == sorted( - [x["hotelName"] for x in results], reverse=True - ) - expected = { - "category", - "hotelName", - "description", - "@search.score", - "@search.highlights", - } - assert all(set(x) == expected for x in results) - assert all(x["category"] == "Budget" for x in results) - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_search_counts(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - results = client.search(search_text="hotel") - assert results.get_count() is None - - results = client.search(search_text="hotel", include_total_count=True) - assert results.get_count() == 7 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_search_coverage(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - results = client.search(search_text="hotel") - assert results.get_coverage() is None - - results = client.search(search_text="hotel", minimum_coverage=50.0) - cov = results.get_coverage() - assert isinstance(cov, float) - assert cov >= 50.0 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_search_facets_none(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - select = ("hotelName", "category", "description") - results = client.search(search_text="WiFi", select=",".join(select)) - assert results.get_facets() is None - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_search_facets_result(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - - select = ("hotelName", "category", "description") - results = client.search(search_text="WiFi", - facets=["category"], - select=",".join(select) - ) - assert results.get_facets() == { - "category": [ - {"value": "Budget", "count": 4}, - {"value": "Luxury", "count": 1}, - ] - } - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_autocomplete(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - results = client.autocomplete(search_text="mot", suggester_name="sg") - assert results == [{"text": "motel", "query_plus_text": "motel"}] - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_suggest(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - results = client.suggest(search_text="mot", suggester_name="sg") - assert results == [ - {"hotelId": "2", "text": "Cheapest hotel in town. Infact, a motel."}, - {"hotelId": "9", "text": "Secret Point Motel"}, - ] - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_upload_documents_new(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - DOCUMENTS = [ - {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, - {"hotelId": "1001", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, - ] - results = client.upload_documents(DOCUMENTS) - assert len(results) == 2 - assert set(x.status_code for x in results) == {201} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert client.get_document_count() == 12 - for doc in DOCUMENTS: - result = client.get_document(key=doc["hotelId"]) - assert result["hotelId"] == doc["hotelId"] - assert result["hotelName"] == doc["hotelName"] - assert result["rating"] == doc["rating"] - assert result["rooms"] == doc["rooms"] - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_upload_documents_existing(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - DOCUMENTS = [ - {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, - {"hotelId": "3", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, - ] - results = client.upload_documents(DOCUMENTS) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200, 201} - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_documents_existing(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - results = client.delete_documents([{"hotelId": "3"}, {"hotelId": "4"}]) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert client.get_document_count() == 8 - - with pytest.raises(HttpResponseError): - client.get_document(key="3") - - with pytest.raises(HttpResponseError): - client.get_document(key="4") - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_documents_missing(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - results = client.delete_documents([{"hotelId": "1000"}, {"hotelId": "4"}]) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert client.get_document_count() == 9 - - with pytest.raises(HttpResponseError): - client.get_document(key="1000") - - with pytest.raises(HttpResponseError): - client.get_document(key="4") - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_merge_documents_existing(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - results = client.merge_documents( - [{"hotelId": "3", "rating": 1}, {"hotelId": "4", "rating": 2}] - ) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert client.get_document_count() == 10 - - result = client.get_document(key="3") - assert result["rating"] == 1 - - result = client.get_document(key="4") - assert result["rating"] == 2 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_merge_documents_missing(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - results = client.merge_documents( - [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] - ) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200, 404} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert client.get_document_count() == 10 - - with pytest.raises(HttpResponseError): - client.get_document(key="1000") - - result = client.get_document(key="4") - assert result["rating"] == 2 - - @ResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_merge_or_upload_documents(self, api_key, endpoint, index_name, **kwargs): - client = SearchClient( - endpoint, index_name, AzureKeyCredential(api_key) - ) - results = client.merge_or_upload_documents( - [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] - ) - assert len(results) == 2 - assert set(x.status_code for x in results) == {200, 201} - - # There can be some lag before a document is searchable - if self.is_live: - time.sleep(TIME_TO_SLEEP) - - assert client.get_document_count() == 11 - - result = client.get_document(key="1000") - assert result["rating"] == 1 - - result = client.get_document(key="4") - assert result["rating"] == 2 diff --git a/sdk/search/azure-search-documents/tests/test_search_client.py b/sdk/search/azure-search-documents/tests/test_search_client.py new file mode 100644 index 0000000000000..bf84a0d57c276 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_client.py @@ -0,0 +1,272 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest + +try: + from unittest import mock +except ImportError: + import mock + +from azure.core.paging import ItemPaged +from azure.core.credentials import AzureKeyCredential + +from azure.search.documents._internal._generated.models import ( + IndexBatch, + SearchDocumentsResult, + SearchResult, +) +from azure.search.documents._internal._search_client import SearchPageIterator + +from azure.search.documents import ( + IndexDocumentsBatch, + SearchClient, + RequestEntityTooLargeError, +) +from azure.search.documents.models import odata + +CREDENTIAL = AzureKeyCredential(key="test_api_key") + +CRUD_METHOD_NAMES = [ + "upload_documents", + "delete_documents", + "merge_documents", + "merge_or_upload_documents", +] + +CRUD_METHOD_MAP = dict( + zip(CRUD_METHOD_NAMES, ["upload", "delete", "merge", "mergeOrUpload"]) +) + + +class Test_odata(object): + def test_const(self): + assert odata("no escapes") == "no escapes" + + def test_numbers(self): + assert odata("foo eq {foo}", foo=10) == "foo eq 10" + + def test_string(self): + assert odata("foo eq {foo}", foo="a string") == "foo eq 'a string'" + + def test_mixed(self): + expected = "foo eq 'a string' and bar le 10" + out = odata("foo eq {foo} and bar le {bar}", foo="a string", bar=10) + assert out == expected + + def test_escape_single_quote(self): + assert odata("foo eq {foo}", foo="a '' str'ing") == "foo eq 'a '''' str''ing'" + + def test_prevent_double_quoting(self): + assert odata("foo eq '{foo}'", foo="a string") == "foo eq 'a string'" + + +class TestSearchClient(object): + def test_init(self): + client = SearchClient("endpoint", "index name", CREDENTIAL) + assert client._headers == { + "api-key": "test_api_key", + "Accept": "application/json;odata.metadata=none", + } + + def test_credential_roll(self): + credential = AzureKeyCredential(key="old_api_key") + client = SearchClient("endpoint", "index name", credential) + assert client._headers == { + "api-key": "old_api_key", + "Accept": "application/json;odata.metadata=none", + } + credential.update("new_api_key") + assert client._headers == { + "api-key": "new_api_key", + "Accept": "application/json;odata.metadata=none", + } + + def test_headers_merge(self): + credential = AzureKeyCredential(key="test_api_key") + client = SearchClient("endpoint", "index name", credential) + orig = {"foo": "bar"} + result = client._merge_client_headers(orig) + assert result is not orig + assert result == { + "api-key": "test_api_key", + "Accept": "application/json;odata.metadata=none", + "foo": "bar", + } + + def test_repr(self): + client = SearchClient("endpoint", "index name", CREDENTIAL) + assert repr(client) == "".format( + repr("endpoint"), repr("index name") + ) + + @mock.patch( + "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.count" + ) + def test_get_document_count(self, mock_count): + client = SearchClient("endpoint", "index name", CREDENTIAL) + client.get_document_count() + assert mock_count.called + assert mock_count.call_args[0] == () + assert len(mock_count.call_args[1]) == 1 + assert mock_count.call_args[1]["headers"] == client._headers + + + @mock.patch( + "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.get" + ) + def test_get_document(self, mock_get): + client = SearchClient("endpoint", "index name", CREDENTIAL) + client.get_document("some_key") + assert mock_get.called + assert mock_get.call_args[0] == () + assert len(mock_get.call_args[1]) == 3 + assert mock_get.call_args[1]["headers"] == client._headers + assert mock_get.call_args[1]["key"] == "some_key" + assert mock_get.call_args[1]["selected_fields"] == None + + mock_get.reset() + + client.get_document("some_key", selected_fields="foo") + assert mock_get.called + assert mock_get.call_args[0] == () + assert len(mock_get.call_args[1]) == 3 + assert mock_get.call_args[1]["headers"] == client._headers + assert mock_get.call_args[1]["key"] == "some_key" + assert mock_get.call_args[1]["selected_fields"] == "foo" + + @mock.patch( + "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.search_post" + ) + def test_search_query_argument(self, mock_search_post): + client = SearchClient("endpoint", "index name", CREDENTIAL) + result = client.search(search_text="search text") + assert isinstance(result, ItemPaged) + assert result._page_iterator_class is SearchPageIterator + search_result = SearchDocumentsResult() + search_result.results = [SearchResult(additional_properties={"key": "val"})] + mock_search_post.return_value = search_result + assert not mock_search_post.called + next(result) + assert mock_search_post.called + assert mock_search_post.call_args[0] == () + assert ( + mock_search_post.call_args[1]["search_request"].search_text == "search text" + ) + + @mock.patch( + "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.suggest_post" + ) + def test_suggest_query_argument(self, mock_suggest_post): + client = SearchClient("endpoint", "index name", CREDENTIAL) + result = client.suggest( + search_text="search text", suggester_name="sg" + ) + assert mock_suggest_post.called + assert mock_suggest_post.call_args[0] == () + assert mock_suggest_post.call_args[1]["headers"] == client._headers + assert ( + mock_suggest_post.call_args[1]["suggest_request"].search_text + == "search text" + ) + + def test_suggest_bad_argument(self): + client = SearchClient("endpoint", "index name", CREDENTIAL) + with pytest.raises(TypeError) as e: + client.suggest("bad_query") + assert str(e) == "Expected a SuggestQuery for 'query', but got {}".format( + repr("bad_query") + ) + + @mock.patch( + "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.autocomplete_post" + ) + def test_autocomplete_query_argument(self, mock_autocomplete_post): + client = SearchClient("endpoint", "index name", CREDENTIAL) + result = client.autocomplete( + search_text="search text", suggester_name="sg" + ) + assert mock_autocomplete_post.called + assert mock_autocomplete_post.call_args[0] == () + assert mock_autocomplete_post.call_args[1]["headers"] == client._headers + assert ( + mock_autocomplete_post.call_args[1]["autocomplete_request"].search_text + == "search text" + ) + + def test_autocomplete_bad_argument(self): + client = SearchClient("endpoint", "index name", CREDENTIAL) + with pytest.raises(TypeError) as e: + client.autocomplete("bad_query") + assert str( + e + ) == "Expected a AutocompleteQuery for 'query', but got {}".format( + repr("bad_query") + ) + + @pytest.mark.parametrize( + "arg", [[], ["doc1"], ["doc1", "doc2"]], ids=lambda x: str(len(x)) + " docs" + ) + @pytest.mark.parametrize("method_name", CRUD_METHOD_NAMES) + def test_add_method(self, arg, method_name): + with mock.patch.object( + SearchClient, "index_documents", return_value=None + ) as mock_index_documents: + client = SearchClient("endpoint", "index name", CREDENTIAL) + + method = getattr(client, method_name) + method(arg, extra="foo") + + assert mock_index_documents.called + assert len(mock_index_documents.call_args[0]) == 1 + batch = mock_index_documents.call_args[0][0] + assert isinstance(batch, IndexDocumentsBatch) + assert all( + action.action_type == CRUD_METHOD_MAP[method_name] + for action in batch.actions + ) + assert [action.additional_properties for action in batch.actions] == arg + assert mock_index_documents.call_args[1]["headers"] == client._headers + assert mock_index_documents.call_args[1]["extra"] == "foo" + + @mock.patch( + "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.index" + ) + def test_index_documents(self, mock_index): + client = SearchClient("endpoint", "index name", CREDENTIAL) + + batch = IndexDocumentsBatch() + actions = batch.add_upload_actions("upload1") + assert len(actions) == 1 + for x in actions: + assert x.action_type == "upload" + actions = batch.add_delete_actions("delete1", "delete2") + assert len(actions) == 2 + for x in actions: + assert x.action_type == "delete" + actions = batch.add_merge_actions(["merge1", "merge2", "merge3"]) + for x in actions: + assert x.action_type == "merge" + actions = batch.add_merge_or_upload_actions("merge_or_upload1") + for x in actions: + assert x.action_type == "mergeOrUpload" + + client.index_documents(batch, extra="foo") + assert mock_index.called + assert mock_index.call_args[0] == () + assert len(mock_index.call_args[1]) == 4 + assert mock_index.call_args[1]["headers"] == client._headers + assert mock_index.call_args[1]["extra"] == "foo" + index_documents = mock_index.call_args[1]["batch"] + assert isinstance(index_documents, IndexBatch) + assert index_documents.actions == batch.actions + + def test_request_too_large_error(self): + with mock.patch.object(SearchClient, "_index_documents_actions", side_effect=RequestEntityTooLargeError("Error")): + client = SearchClient("endpoint", "index name", CREDENTIAL) + batch = IndexDocumentsBatch() + batch.add_upload_actions("upload1") + with pytest.raises(RequestEntityTooLargeError): + client.index_documents(batch, extra="foo") diff --git a/sdk/search/azure-search-documents/tests/test_search_client_basic_live.py b/sdk/search/azure-search-documents/tests/test_search_client_basic_live.py new file mode 100644 index 0000000000000..5749a274ef051 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_client_basic_live.py @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath +import time + +import pytest + +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure_devtools.scenario_tests import ReplayableTest + +from search_service_preparer import SearchServicePreparer + +CWD = dirname(realpath(__file__)) + +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding='utf-8')) +from azure.core.exceptions import HttpResponseError +from azure.core.credentials import AzureKeyCredential +from azure.search.documents import SearchClient + +TIME_TO_SLEEP = 3 + +class SearchClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_document_count(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + assert client.get_document_count() == 10 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_document(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + for hotel_id in range(1, 11): + result = client.get_document(key=str(hotel_id)) + expected = BATCH["value"][hotel_id - 1] + assert result.get("hotelId") == expected.get("hotelId") + assert result.get("hotelName") == expected.get("hotelName") + assert result.get("description") == expected.get("description") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_document_missing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + with pytest.raises(HttpResponseError): + client.get_document(key="1000") diff --git a/sdk/search/azure-search-documents/tests/test_search_client_batching_client_live.py b/sdk/search/azure-search-documents/tests/test_search_client_batching_client_live.py new file mode 100644 index 0000000000000..ae3b3f243cb9d --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_client_batching_client_live.py @@ -0,0 +1,215 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath +import time + +import pytest + +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure_devtools.scenario_tests import ReplayableTest + +from search_service_preparer import SearchServicePreparer + +CWD = dirname(realpath(__file__)) + +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding='utf-8')) +from azure.core.exceptions import HttpResponseError +from azure.core.credentials import AzureKeyCredential +from azure.search.documents import SearchIndexDocumentBatchingClient, SearchClient + +TIME_TO_SLEEP = 3 + +class SearchIndexDocumentBatchingClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_upload_documents_new(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + DOCUMENTS = [ + {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, + {"hotelId": "1001", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, + ] + batch_client.add_upload_actions(DOCUMENTS) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 12 + for doc in DOCUMENTS: + result = client.get_document(key=doc["hotelId"]) + assert result["hotelId"] == doc["hotelId"] + assert result["hotelName"] == doc["hotelName"] + assert result["rating"] == doc["rating"] + assert result["rooms"] == doc["rooms"] + batch_client.close() + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_upload_documents_existing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + DOCUMENTS = [ + {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, + {"hotelId": "3", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, + ] + batch_client.add_upload_actions(DOCUMENTS) + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 11 + batch_client.close() + + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_documents_existing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + batch_client.add_delete_actions([{"hotelId": "3"}, {"hotelId": "4"}]) + batch_client.close() + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 8 + + with pytest.raises(HttpResponseError): + client.get_document(key="3") + + with pytest.raises(HttpResponseError): + client.get_document(key="4") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_documents_missing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + batch_client.add_delete_actions([{"hotelId": "1000"}, {"hotelId": "4"}]) + batch_client.close() + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 9 + + with pytest.raises(HttpResponseError): + client.get_document(key="1000") + + with pytest.raises(HttpResponseError): + client.get_document(key="4") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_merge_documents_existing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + batch_client.add_merge_actions( + [{"hotelId": "3", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + batch_client.close() + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 10 + + result = client.get_document(key="3") + assert result["rating"] == 1 + + result = client.get_document(key="4") + assert result["rating"] == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_merge_documents_missing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + batch_client.add_merge_actions( + [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + batch_client.close() + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 10 + + with pytest.raises(HttpResponseError): + client.get_document(key="1000") + + result = client.get_document(key="4") + assert result["rating"] == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_merge_or_upload_documents(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client = SearchIndexDocumentBatchingClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + batch_client._batch_size = 2 + batch_client.add_merge_or_upload_actions( + [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + batch_client.close() + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 11 + + result = client.get_document(key="1000") + assert result["rating"] == 1 + + result = client.get_document(key="4") + assert result["rating"] == 2 diff --git a/sdk/search/azure-search-documents/tests/test_search_client_index_document_live.py b/sdk/search/azure-search-documents/tests/test_search_client_index_document_live.py new file mode 100644 index 0000000000000..abc9d9e2b048e --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_client_index_document_live.py @@ -0,0 +1,186 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath +import time + +import pytest + +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure_devtools.scenario_tests import ReplayableTest +from search_service_preparer import SearchServicePreparer + +CWD = dirname(realpath(__file__)) + +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding='utf-8')) +from azure.core.exceptions import HttpResponseError +from azure.core.credentials import AzureKeyCredential +from azure.search.documents import SearchClient + +TIME_TO_SLEEP = 3 + +class SearchClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_upload_documents_new(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + DOCUMENTS = [ + {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, + {"hotelId": "1001", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, + ] + results = client.upload_documents(DOCUMENTS) + assert len(results) == 2 + assert set(x.status_code for x in results) == {201} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 12 + for doc in DOCUMENTS: + result = client.get_document(key=doc["hotelId"]) + assert result["hotelId"] == doc["hotelId"] + assert result["hotelName"] == doc["hotelName"] + assert result["rating"] == doc["rating"] + assert result["rooms"] == doc["rooms"] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_upload_documents_existing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + DOCUMENTS = [ + {"hotelId": "1000", "rating": 5, "rooms": [], "hotelName": "Azure Inn"}, + {"hotelId": "3", "rating": 4, "rooms": [], "hotelName": "Redmond Hotel"}, + ] + results = client.upload_documents(DOCUMENTS) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200, 201} + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_documents_existing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + results = client.delete_documents([{"hotelId": "3"}, {"hotelId": "4"}]) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 8 + + with pytest.raises(HttpResponseError): + client.get_document(key="3") + + with pytest.raises(HttpResponseError): + client.get_document(key="4") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_documents_missing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + results = client.delete_documents([{"hotelId": "1000"}, {"hotelId": "4"}]) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 9 + + with pytest.raises(HttpResponseError): + client.get_document(key="1000") + + with pytest.raises(HttpResponseError): + client.get_document(key="4") + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_merge_documents_existing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + results = client.merge_documents( + [{"hotelId": "3", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 10 + + result = client.get_document(key="3") + assert result["rating"] == 1 + + result = client.get_document(key="4") + assert result["rating"] == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_merge_documents_missing(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + results = client.merge_documents( + [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200, 404} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 10 + + with pytest.raises(HttpResponseError): + client.get_document(key="1000") + + result = client.get_document(key="4") + assert result["rating"] == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_merge_or_upload_documents(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + results = client.merge_or_upload_documents( + [{"hotelId": "1000", "rating": 1}, {"hotelId": "4", "rating": 2}] + ) + assert len(results) == 2 + assert set(x.status_code for x in results) == {200, 201} + + # There can be some lag before a document is searchable + if self.is_live: + time.sleep(TIME_TO_SLEEP) + + assert client.get_document_count() == 11 + + result = client.get_document(key="1000") + assert result["rating"] == 1 + + result = client.get_document(key="4") + assert result["rating"] == 2 diff --git a/sdk/search/azure-search-documents/tests/test_search_client_search_live.py b/sdk/search/azure-search-documents/tests/test_search_client_search_live.py new file mode 100644 index 0000000000000..05e44df9eae53 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_client_search_live.py @@ -0,0 +1,144 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath + +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure_devtools.scenario_tests import ReplayableTest +from search_service_preparer import SearchServicePreparer + +CWD = dirname(realpath(__file__)) + +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding='utf-8')) +from azure.core.credentials import AzureKeyCredential +from azure.search.documents import SearchClient + +TIME_TO_SLEEP = 3 + +class SearchClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_search_simple(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + results = list(client.search(search_text="hotel")) + assert len(results) == 7 + + results = list(client.search(search_text="motel")) + assert len(results) == 2 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_search_filter(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + select = ("hotelName", "category", "description") + results = list(client.search( + search_text="WiFi", + filter="category eq 'Budget'", + select=",".join(select), + order_by="hotelName desc" + )) + assert [x["hotelName"] for x in results] == sorted( + [x["hotelName"] for x in results], reverse=True + ) + expected = { + "category", + "hotelName", + "description", + "@search.score", + "@search.highlights", + } + assert all(set(x) == expected for x in results) + assert all(x["category"] == "Budget" for x in results) + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_search_counts(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + results = client.search(search_text="hotel") + assert results.get_count() is None + + results = client.search(search_text="hotel", include_total_count=True) + assert results.get_count() == 7 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_search_coverage(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + results = client.search(search_text="hotel") + assert results.get_coverage() is None + + results = client.search(search_text="hotel", minimum_coverage=50.0) + cov = results.get_coverage() + assert isinstance(cov, float) + assert cov >= 50.0 + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_search_facets_none(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + select = ("hotelName", "category", "description") + results = client.search(search_text="WiFi", select=",".join(select)) + assert results.get_facets() is None + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_search_facets_result(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + + select = ("hotelName", "category", "description") + results = client.search(search_text="WiFi", + facets=["category"], + select=",".join(select) + ) + assert results.get_facets() == { + "category": [ + {"value": "Budget", "count": 4}, + {"value": "Luxury", "count": 1}, + ] + } + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_autocomplete(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + results = client.autocomplete(search_text="mot", suggester_name="sg") + assert results == [{"text": "motel", "query_plus_text": "motel"}] + + @ResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_suggest(self, api_key, endpoint, index_name, **kwargs): + client = SearchClient( + endpoint, index_name, AzureKeyCredential(api_key) + ) + results = client.suggest(search_text="mot", suggester_name="sg") + assert results == [ + {"hotelId": "2", "text": "Cheapest hotel in town. Infact, a motel."}, + {"hotelId": "9", "text": "Secret Point Motel"}, + ] diff --git a/sdk/search/azure-search-documents/tests/test_search_index_client.py b/sdk/search/azure-search-documents/tests/test_search_index_client.py index d628c5cf455e4..55dd866595b20 100644 --- a/sdk/search/azure-search-documents/tests/test_search_index_client.py +++ b/sdk/search/azure-search-documents/tests/test_search_index_client.py @@ -10,261 +10,109 @@ except ImportError: import mock -from azure.core.paging import ItemPaged from azure.core.credentials import AzureKeyCredential - -from azure.search.documents._internal._generated.models import ( - IndexBatch, - SearchDocumentsResult, - SearchResult, -) -from azure.search.documents._internal._search_client import SearchPageIterator - -from azure.search.documents import ( - IndexDocumentsBatch, - SearchClient, - SearchIndexDocumentBatchingClient, -) -from azure.search.documents.models import odata +from azure.search.documents import SearchClient +from azure.search.documents.indexes import SearchIndexClient, SearchIndexerClient +from azure.search.documents.indexes.models import SearchIndexerDataContainer, SearchIndexerDataSourceConnection +from azure.search.documents.indexes._internal._utils import pack_search_indexer_data_source CREDENTIAL = AzureKeyCredential(key="test_api_key") -CRUD_METHOD_NAMES = [ - "upload_documents", - "delete_documents", - "merge_documents", - "merge_or_upload_documents", -] - -CRUD_METHOD_MAP = dict( - zip(CRUD_METHOD_NAMES, ["upload", "delete", "merge", "mergeOrUpload"]) -) - - -class Test_odata(object): - def test_const(self): - assert odata("no escapes") == "no escapes" - - def test_numbers(self): - assert odata("foo eq {foo}", foo=10) == "foo eq 10" - - def test_string(self): - assert odata("foo eq {foo}", foo="a string") == "foo eq 'a string'" - def test_mixed(self): - expected = "foo eq 'a string' and bar le 10" - out = odata("foo eq {foo} and bar le {bar}", foo="a string", bar=10) - assert out == expected - - def test_escape_single_quote(self): - assert odata("foo eq {foo}", foo="a '' str'ing") == "foo eq 'a '''' str''ing'" - - def test_prevent_double_quoting(self): - assert odata("foo eq '{foo}'", foo="a string") == "foo eq 'a string'" - - -class TestSearchClient(object): - def test_init(self): - client = SearchClient("endpoint", "index name", CREDENTIAL) +class TestSearchIndexClient(object): + def test_index_init(self): + client = SearchIndexClient("endpoint", CREDENTIAL) assert client._headers == { "api-key": "test_api_key", - "Accept": "application/json;odata.metadata=none", + "Accept": "application/json;odata.metadata=minimal", } - def test_credential_roll(self): + def test_index_credential_roll(self): credential = AzureKeyCredential(key="old_api_key") - client = SearchClient("endpoint", "index name", credential) + client = SearchIndexClient("endpoint", credential) assert client._headers == { "api-key": "old_api_key", - "Accept": "application/json;odata.metadata=none", + "Accept": "application/json;odata.metadata=minimal", } credential.update("new_api_key") assert client._headers == { "api-key": "new_api_key", - "Accept": "application/json;odata.metadata=none", - } - - def test_headers_merge(self): - credential = AzureKeyCredential(key="test_api_key") - client = SearchClient("endpoint", "index name", credential) - orig = {"foo": "bar"} - result = client._merge_client_headers(orig) - assert result is not orig - assert result == { - "api-key": "test_api_key", - "Accept": "application/json;odata.metadata=none", - "foo": "bar", + "Accept": "application/json;odata.metadata=minimal", } - def test_repr(self): - client = SearchClient("endpoint", "index name", CREDENTIAL) - assert repr(client) == "".format( - repr("endpoint"), repr("index name") - ) - - @mock.patch( - "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.count" - ) - def test_get_document_count(self, mock_count): - client = SearchClient("endpoint", "index name", CREDENTIAL) - client.get_document_count() - assert mock_count.called - assert mock_count.call_args[0] == () - assert len(mock_count.call_args[1]) == 1 - assert mock_count.call_args[1]["headers"] == client._headers - - - @mock.patch( - "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.get" - ) - def test_get_document(self, mock_get): - client = SearchClient("endpoint", "index name", CREDENTIAL) - client.get_document("some_key") - assert mock_get.called - assert mock_get.call_args[0] == () - assert len(mock_get.call_args[1]) == 3 - assert mock_get.call_args[1]["headers"] == client._headers - assert mock_get.call_args[1]["key"] == "some_key" - assert mock_get.call_args[1]["selected_fields"] == None - - mock_get.reset() - - client.get_document("some_key", selected_fields="foo") - assert mock_get.called - assert mock_get.call_args[0] == () - assert len(mock_get.call_args[1]) == 3 - assert mock_get.call_args[1]["headers"] == client._headers - assert mock_get.call_args[1]["key"] == "some_key" - assert mock_get.call_args[1]["selected_fields"] == "foo" + def test_get_search_client(self): + credential = AzureKeyCredential(key="old_api_key") + client = SearchIndexClient("endpoint", credential) + search_client = client.get_search_client('index') + assert isinstance(search_client, SearchClient) @mock.patch( - "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.search_post" + "azure.search.documents.indexes._internal._generated._search_service_client.SearchServiceClient.get_service_statistics" ) - def test_search_query_argument(self, mock_search_post): - client = SearchClient("endpoint", "index name", CREDENTIAL) - result = client.search(search_text="search text") - assert isinstance(result, ItemPaged) - assert result._page_iterator_class is SearchPageIterator - search_result = SearchDocumentsResult() - search_result.results = [SearchResult(additional_properties={"key": "val"})] - mock_search_post.return_value = search_result - assert not mock_search_post.called - next(result) - assert mock_search_post.called - assert mock_search_post.call_args[0] == () - assert ( - mock_search_post.call_args[1]["search_request"].search_text == "search text" - ) + def test_get_service_statistics(self, mock_get_stats): + client = SearchIndexClient("endpoint", CREDENTIAL) + client.get_service_statistics() + assert mock_get_stats.called + assert mock_get_stats.call_args[0] == () + assert mock_get_stats.call_args[1] == {"headers": client._headers} + + def test_index_endpoint_https(self): + credential = AzureKeyCredential(key="old_api_key") + client = SearchIndexClient("endpoint", credential) + assert client._endpoint.startswith('https') - @mock.patch( - "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.suggest_post" - ) - def test_suggest_query_argument(self, mock_suggest_post): - client = SearchClient("endpoint", "index name", CREDENTIAL) - result = client.suggest( - search_text="search text", suggester_name="sg" - ) - assert mock_suggest_post.called - assert mock_suggest_post.call_args[0] == () - assert mock_suggest_post.call_args[1]["headers"] == client._headers - assert ( - mock_suggest_post.call_args[1]["suggest_request"].search_text - == "search text" - ) + client = SearchIndexClient("https://endpoint", credential) + assert client._endpoint.startswith('https') - def test_suggest_bad_argument(self): - client = SearchClient("endpoint", "index name", CREDENTIAL) - with pytest.raises(TypeError) as e: - client.suggest("bad_query") - assert str(e) == "Expected a SuggestQuery for 'query', but got {}".format( - repr("bad_query") - ) + with pytest.raises(ValueError): + client = SearchIndexClient("http://endpoint", credential) - @mock.patch( - "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.autocomplete_post" - ) - def test_autocomplete_query_argument(self, mock_autocomplete_post): - client = SearchClient("endpoint", "index name", CREDENTIAL) - result = client.autocomplete( - search_text="search text", suggester_name="sg" - ) - assert mock_autocomplete_post.called - assert mock_autocomplete_post.call_args[0] == () - assert mock_autocomplete_post.call_args[1]["headers"] == client._headers - assert ( - mock_autocomplete_post.call_args[1]["autocomplete_request"].search_text - == "search text" - ) + with pytest.raises(ValueError): + client = SearchIndexClient(12345, credential) - def test_autocomplete_bad_argument(self): - client = SearchClient("endpoint", "index name", CREDENTIAL) - with pytest.raises(TypeError) as e: - client.autocomplete("bad_query") - assert str( - e - ) == "Expected a AutocompleteQuery for 'query', but got {}".format( - repr("bad_query") - ) - @pytest.mark.parametrize( - "arg", [[], ["doc1"], ["doc1", "doc2"]], ids=lambda x: str(len(x)) + " docs" - ) - @pytest.mark.parametrize("method_name", CRUD_METHOD_NAMES) - def test_add_method(self, arg, method_name): - with mock.patch.object( - SearchClient, "index_documents", return_value=None - ) as mock_index_documents: - client = SearchClient("endpoint", "index name", CREDENTIAL) +class TestSearchIndexerClient(object): + def test_indexer_init(self): + client = SearchIndexerClient("endpoint", CREDENTIAL) + assert client._headers == { + "api-key": "test_api_key", + "Accept": "application/json;odata.metadata=minimal", + } - method = getattr(client, method_name) - method(arg, extra="foo") + def test_indexer_credential_roll(self): + credential = AzureKeyCredential(key="old_api_key") + client = SearchIndexerClient("endpoint", credential) + assert client._headers == { + "api-key": "old_api_key", + "Accept": "application/json;odata.metadata=minimal", + } + credential.update("new_api_key") + assert client._headers == { + "api-key": "new_api_key", + "Accept": "application/json;odata.metadata=minimal", + } - assert mock_index_documents.called - assert len(mock_index_documents.call_args[0]) == 1 - batch = mock_index_documents.call_args[0][0] - assert isinstance(batch, IndexDocumentsBatch) - assert all( - action.action_type == CRUD_METHOD_MAP[method_name] - for action in batch.actions - ) - assert [action.additional_properties for action in batch.actions] == arg - assert mock_index_documents.call_args[1]["headers"] == client._headers - assert mock_index_documents.call_args[1]["extra"] == "foo" + def test_indexer_endpoint_https(self): + credential = AzureKeyCredential(key="old_api_key") + client = SearchIndexerClient("endpoint", credential) + assert client._endpoint.startswith('https') - @mock.patch( - "azure.search.documents._internal._generated.operations._documents_operations.DocumentsOperations.index" - ) - def test_index_documents(self, mock_index): - client = SearchClient("endpoint", "index name", CREDENTIAL) + client = SearchIndexerClient("https://endpoint", credential) + assert client._endpoint.startswith('https') - batch = IndexDocumentsBatch() - actions = batch.add_upload_actions("upload1") - assert len(actions) == 1 - for x in actions: - assert x.action_type == "upload" - actions = batch.add_delete_actions("delete1", "delete2") - assert len(actions) == 2 - for x in actions: - assert x.action_type == "delete" - actions = batch.add_merge_actions(["merge1", "merge2", "merge3"]) - for x in actions: - assert x.action_type == "merge" - actions = batch.add_merge_or_upload_actions("merge_or_upload1") - for x in actions: - assert x.action_type == "mergeOrUpload" + with pytest.raises(ValueError): + client = SearchIndexerClient("http://endpoint", credential) - client.index_documents(batch, extra="foo") - assert mock_index.called - assert mock_index.call_args[0] == () - assert len(mock_index.call_args[1]) == 4 - assert mock_index.call_args[1]["headers"] == client._headers - assert mock_index.call_args[1]["extra"] == "foo" - index_documents = mock_index.call_args[1]["batch"] - assert isinstance(index_documents, IndexBatch) - assert index_documents.actions == batch.actions + with pytest.raises(ValueError): + client = SearchIndexerClient(12345, credential) - def test_get_batching_client(self): - client = SearchClient("endpoint", "index name", CREDENTIAL) - batching_client = client.get_index_document_batching_client() - assert batching_client.batch_size == 1000 - assert batching_client._window == 0 + def test_datasource_with_empty_connection_string(self): + container = SearchIndexerDataContainer(name='searchcontainer') + data_source_connection = SearchIndexerDataSourceConnection( + name="test", + type="azureblob", + connection_string="", + container=container + ) + packed_data_source_connection = pack_search_indexer_data_source(data_source_connection) + assert packed_data_source_connection.credentials.connection_string == "" diff --git a/sdk/search/azure-search-documents/tests/test_search_index_client_data_source_live.py b/sdk/search/azure-search-documents/tests/test_search_index_client_data_source_live.py new file mode 100644 index 0000000000000..16edcbc18fe39 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_index_client_data_source_live.py @@ -0,0 +1,152 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath + +import pytest + +from devtools_testutils import AzureMgmtTestCase + +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer +from azure_devtools.scenario_tests import ReplayableTest + +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + SearchIndexerDataSourceConnection, + SearchIndexerDataContainer, +) +from azure.search.documents.indexes import SearchIndexerClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +class SearchDataSourcesClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + def _create_data_source_connection(self, name="sample-datasource"): + container = SearchIndexerDataContainer(name='searchcontainer') + data_source_connection = SearchIndexerDataSourceConnection( + name=name, + type="azureblob", + connection_string=CONNECTION_STRING, + container=container + ) + return data_source_connection + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_datasource(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + result = client.create_data_source_connection(data_source_connection) + assert result.name == "sample-datasource" + assert result.type == "azureblob" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_datasource(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + result = client.create_data_source_connection(data_source_connection) + assert len(client.get_data_source_connections()) == 1 + client.delete_data_source_connection("sample-datasource") + assert len(client.get_data_source_connections()) == 0 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_datasource(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = client.create_data_source_connection(data_source_connection) + result = client.get_data_source_connection("sample-datasource") + assert result.name == "sample-datasource" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_list_datasource(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection1 = self._create_data_source_connection() + data_source_connection2 = self._create_data_source_connection(name="another-sample") + created1 = client.create_data_source_connection(data_source_connection1) + created2 = client.create_data_source_connection(data_source_connection2) + result = client.get_data_source_connections() + assert isinstance(result, list) + assert set(x.name for x in result) == {"sample-datasource", "another-sample"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_datasource(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = client.create_data_source_connection(data_source_connection) + assert len(client.get_data_source_connections()) == 1 + data_source_connection.description = "updated" + client.create_or_update_data_source_connection(data_source_connection) + assert len(client.get_data_source_connections()) == 1 + result = client.get_data_source_connection("sample-datasource") + assert result.name == "sample-datasource" + assert result.description == "updated" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_datasource_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = client.create_data_source_connection(data_source_connection) + etag = created.e_tag + + # Now update the data source connection + data_source_connection.description = "updated" + client.create_or_update_data_source_connection(data_source_connection) + + # prepare data source connection + data_source_connection.e_tag = etag # reset to the original data source connection + data_source_connection.description = "changed" + with pytest.raises(HttpResponseError): + client.create_or_update_data_source_connection(data_source_connection, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_datasource_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = client.create_data_source_connection(data_source_connection) + etag = created.e_tag + + # Now update the data source connection + data_source_connection.description = "updated" + client.create_or_update_data_source_connection(data_source_connection) + + # prepare data source connection + data_source_connection.e_tag = etag # reset to the original data source connection + with pytest.raises(HttpResponseError): + client.delete_data_source_connection(data_source_connection, match_condition=MatchConditions.IfNotModified) + assert len(client.get_data_source_connections()) == 1 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_datasource_string_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + data_source_connection = self._create_data_source_connection() + created = client.create_data_source_connection(data_source_connection) + etag = created.e_tag + + # Now update the data source connection + data_source_connection.description = "updated" + client.create_or_update_data_source_connection(data_source_connection) + + # prepare data source connection + data_source_connection.e_tag = etag # reset to the original data source connection + with pytest.raises(ValueError): + client.delete_data_source_connection(data_source_connection.name, match_condition=MatchConditions.IfNotModified) diff --git a/sdk/search/azure-search-documents/tests/test_search_index_client_live.py b/sdk/search/azure-search-documents/tests/test_search_index_client_live.py new file mode 100644 index 0000000000000..00f50f1011004 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_index_client_live.py @@ -0,0 +1,239 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath + +import pytest + +from devtools_testutils import AzureMgmtTestCase +from azure_devtools.scenario_tests import ReplayableTest +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + AnalyzeTextOptions, + CorsOptions, + SearchIndex, + ScoringProfile, + SimpleField, + SearchFieldDataType +) +from azure.search.documents.indexes import SearchIndexClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +class SearchIndexClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer() + def test_get_service_statistics(self, api_key, endpoint, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.get_service_statistics() + assert isinstance(result, dict) + assert set(result.keys()) == {"counters", "limits"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer() + def test_list_indexes_empty(self, api_key, endpoint, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.list_indexes() + with pytest.raises(StopIteration): + next(result) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_list_indexes(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.list_indexes() + + first = next(result) + assert first.name == index_name + + with pytest.raises(StopIteration): + next(result) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_index(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.get_index(index_name) + assert result.name == index_name + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_index_statistics(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.get_index_statistics(index_name) + assert set(result.keys()) == {'document_count', 'storage_size'} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_indexes(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + client.delete_index(index_name) + import time + if self.is_live: + time.sleep(TIME_TO_SLEEP) + result = client.list_indexes() + with pytest.raises(StopIteration): + next(result) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_indexes_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + + # First create an index + name = "hotels" + fields = [ + { + "name": "hotelId", + "type": "Edm.String", + "key": True, + "searchable": False + }, + { + "name": "baseRate", + "type": "Edm.Double" + }] + scoring_profile = ScoringProfile( + name="MyProfile" + ) + scoring_profiles = [] + scoring_profiles.append(scoring_profile) + cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + result = client.create_index(index) + etag = result.e_tag + # get e tag and update + index.scoring_profiles = [] + client.create_or_update_index(index) + + index.e_tag = etag + with pytest.raises(HttpResponseError): + client.delete_index(index, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_index(self, api_key, endpoint, index_name, **kwargs): + name = "hotels" + fields = [ + SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), + SimpleField(name="baseRate", type=SearchFieldDataType.Double) + ] + scoring_profile = ScoringProfile( + name="MyProfile" + ) + scoring_profiles = [] + scoring_profiles.append(scoring_profile) + cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.create_index(index) + assert result.name == "hotels" + assert result.scoring_profiles[0].name == scoring_profile.name + assert result.cors_options.allowed_origins == cors_options.allowed_origins + assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_index(self, api_key, endpoint, index_name, **kwargs): + name = "hotels" + fields = [ + SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), + SimpleField(name="baseRate", type=SearchFieldDataType.Double) + ] + cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) + scoring_profiles = [] + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + result = client.create_or_update_index(index=index) + assert len(result.scoring_profiles) == 0 + assert result.cors_options.allowed_origins == cors_options.allowed_origins + assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds + scoring_profile = ScoringProfile( + name="MyProfile" + ) + scoring_profiles = [] + scoring_profiles.append(scoring_profile) + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + result = client.create_or_update_index(index=index) + assert result.scoring_profiles[0].name == scoring_profile.name + assert result.cors_options.allowed_origins == cors_options.allowed_origins + assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_indexes_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + + # First create an index + name = "hotels" + fields = [ + { + "name": "hotelId", + "type": "Edm.String", + "key": True, + "searchable": False + }, + { + "name": "baseRate", + "type": "Edm.Double" + }] + scoring_profile = ScoringProfile( + name="MyProfile" + ) + scoring_profiles = [] + scoring_profiles.append(scoring_profile) + cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) + index = SearchIndex( + name=name, + fields=fields, + scoring_profiles=scoring_profiles, + cors_options=cors_options) + result = client.create_index(index) + etag = result.e_tag + # get e tag and update + index.scoring_profiles = [] + client.create_or_update_index(index) + + index.e_tag = etag + with pytest.raises(HttpResponseError): + client.create_or_update_index(index, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_analyze_text(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + analyze_request = AnalyzeTextOptions(text="One's ", analyzer_name="standard.lucene") + result = client.analyze_text(index_name, analyze_request) + assert len(result.tokens) == 2 diff --git a/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py b/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py new file mode 100644 index 0000000000000..422ab9896fd36 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py @@ -0,0 +1,175 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath + +import pytest + +from devtools_testutils import AzureMgmtTestCase +from azure_devtools.scenario_tests import ReplayableTest +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + EntityRecognitionSkill, + InputFieldMappingEntry, + OutputFieldMappingEntry, + SearchIndexerSkillset, +) +from azure.search.documents.indexes import SearchIndexerClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +class SearchSkillsetClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_skillset(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") + + result = client.create_skillset(skillset) + assert isinstance(result, SearchIndexerSkillset) + assert result.name == "test-ss" + assert result.description == "desc" + assert result.e_tag + assert len(result.skills) == 1 + assert isinstance(result.skills[0], EntityRecognitionSkill) + + assert len(client.get_skillsets()) == 1 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_skillset(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") + + result = client.create_skillset(skillset) + assert len(client.get_skillsets()) == 1 + + client.delete_skillset("test-ss") + assert len(client.get_skillsets()) == 0 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_skillset_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") + + result = client.create_skillset(skillset) + etag = result.e_tag + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="updated") + updated = client.create_or_update_skillset(skillset) + updated.e_tag = etag + + with pytest.raises(HttpResponseError): + client.delete_skillset(updated, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_skillset(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") + client.create_skillset(skillset) + assert len(client.get_skillsets()) == 1 + + result = client.get_skillset("test-ss") + assert isinstance(result, SearchIndexerSkillset) + assert result.name == "test-ss" + assert result.description == "desc" + assert result.e_tag + assert len(result.skills) == 1 + assert isinstance(result.skills[0], EntityRecognitionSkill) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_skillsets(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset1 = SearchIndexerSkillset(name='test-ss-1', skills=list([s]), description="desc1") + client.create_skillset(skillset1) + skillset2 = SearchIndexerSkillset(name='test-ss-2', skills=list([s]), description="desc2") + client.create_skillset(skillset2) + result = client.get_skillsets() + assert isinstance(result, list) + assert all(isinstance(x, SearchIndexerSkillset) for x in result) + assert set(x.name for x in result) == {"test-ss-1", "test-ss-2"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_skillset(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") + client.create_or_update_skillset(skillset1) + skillset2 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc2") + client.create_or_update_skillset(skillset2) + assert len(client.get_skillsets()) == 1 + + result = client.get_skillset("test-ss") + assert isinstance(result, SearchIndexerSkillset) + assert result.name == "test-ss" + assert result.description == "desc2" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_skillset_inplace(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") + ss = client.create_or_update_skillset(skillset1) + skillset2 = SearchIndexerSkillset(name='test-ss', skills=[s], description="desc2", skillset=ss) + client.create_or_update_skillset(skillset2) + assert len(client.get_skillsets()) == 1 + + result = client.get_skillset("test-ss") + assert isinstance(result, SearchIndexerSkillset) + assert result.name == "test-ss" + assert result.description == "desc2" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_skillset_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) + + skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") + ss = client.create_or_update_skillset(skillset1) + etag = ss.e_tag + skillset2 = SearchIndexerSkillset(name='test-ss', skills=[s], description="desc2", skillset=ss) + client.create_or_update_skillset(skillset2) + assert len(client.get_skillsets()) == 1 diff --git a/sdk/search/azure-search-documents/tests/test_search_index_client_synonym_map_live.py b/sdk/search/azure-search-documents/tests/test_search_index_client_synonym_map_live.py new file mode 100644 index 0000000000000..69abe69dd42f9 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_index_client_synonym_map_live.py @@ -0,0 +1,168 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath + +import pytest + +from devtools_testutils import AzureMgmtTestCase +from azure_devtools.scenario_tests import ReplayableTest +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + SynonymMap, +) +from azure.search.documents.indexes import SearchIndexClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding='utf-8')) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +class SearchSynonymMapsClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_synonym_map(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + result = client.create_synonym_map(synonym_map) + assert isinstance(result, SynonymMap) + assert result.name == "test-syn-map" + assert result.synonyms == [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + assert len(client.get_synonym_maps()) == 1 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_synonym_map(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + result = client.create_synonym_map(synonym_map) + assert len(client.get_synonym_maps()) == 1 + client.delete_synonym_map("test-syn-map") + assert len(client.get_synonym_maps()) == 0 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_synonym_map_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + result = client.create_synonym_map(synonym_map) + etag = result.e_tag + + synonym_map.synonyms = "\n".join([ + "Washington, Wash. => WA", + ]) + client.create_or_update_synonym_map(synonym_map) + + result.e_tag = etag + with pytest.raises(HttpResponseError): + client.delete_synonym_map(result, match_condition=MatchConditions.IfNotModified) + assert len(client.get_synonym_maps()) == 1 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_synonym_map(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + client.create_synonym_map(synonym_map) + assert len(client.get_synonym_maps()) == 1 + result = client.get_synonym_map("test-syn-map") + assert isinstance(result, SynonymMap) + assert result.name == "test-syn-map" + assert result.synonyms == [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_synonym_maps(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + ] + synonym_map_1 = SynonymMap(name="test-syn-map-1", synonyms=synonyms) + client.create_synonym_map(synonym_map_1) + synonyms = [ + "Washington, Wash. => WA", + ] + synonym_map_2 = SynonymMap(name="test-syn-map-2", synonyms=synonyms) + client.create_synonym_map(synonym_map_2) + result = client.get_synonym_maps() + assert isinstance(result, list) + assert all(isinstance(x, SynonymMap) for x in result) + assert set(x.name for x in result) == {"test-syn-map-1", "test-syn-map-2"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_synonym_map(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + client.create_synonym_map(synonym_map) + assert len(client.get_synonym_maps()) == 1 + synonym_map.synonyms = ["Washington, Wash. => WA",] + client.create_or_update_synonym_map(synonym_map) + assert len(client.get_synonym_maps()) == 1 + result = client.get_synonym_map("test-syn-map") + assert isinstance(result, SynonymMap) + assert result.name == "test-syn-map" + assert result.synonyms == [ + "Washington, Wash. => WA", + ] + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_synonym_map_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) + synonyms = [ + "USA, United States, United States of America", + "Washington, Wash. => WA", + ] + synonym_map = SynonymMap(name="test-syn-map", synonyms=synonyms) + result = client.create_synonym_map(synonym_map) + etag = result.e_tag + + synonym_map.synonyms = [ + "Washington, Wash. => WA", + ] + + client.create_or_update_synonym_map(synonym_map) + + result.e_tag = etag + with pytest.raises(HttpResponseError): + client.create_or_update_synonym_map(result, match_condition=MatchConditions.IfNotModified) diff --git a/sdk/search/azure-search-documents/tests/test_search_indexer_client_live.py b/sdk/search/azure-search-documents/tests/test_search_indexer_client_live.py new file mode 100644 index 0000000000000..cac49e3240671 --- /dev/null +++ b/sdk/search/azure-search-documents/tests/test_search_indexer_client_live.py @@ -0,0 +1,178 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +from os.path import dirname, join, realpath +import time + +import pytest + +from devtools_testutils import AzureMgmtTestCase +from azure_devtools.scenario_tests import ReplayableTest +from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer + +from azure.core import MatchConditions +from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError +from azure.search.documents.indexes.models import( + SearchIndex, + SearchIndexerDataSourceConnection, + SearchIndexer, + SearchIndexerDataContainer, +) +from azure.search.documents.indexes import SearchIndexClient, SearchIndexerClient + +CWD = dirname(realpath(__file__)) +SCHEMA = open(join(CWD, "hotel_schema.json")).read() +try: + BATCH = json.load(open(join(CWD, "hotel_small.json"))) +except UnicodeDecodeError: + BATCH = json.load(open(join(CWD, "hotel_small.json"), encoding="utf-8")) +TIME_TO_SLEEP = 5 +CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' + +class SearchIndexersClientTest(AzureMgmtTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['api-key'] + + def _prepare_indexer(self, endpoint, api_key, name="sample-indexer", ds_name="sample-datasource", id_name="hotels"): + con_str = self.settings.AZURE_STORAGE_CONNECTION_STRING + self.scrubber.register_name_pair(con_str, 'connection_string') + container = SearchIndexerDataContainer(name='searchcontainer') + data_source_connection = SearchIndexerDataSourceConnection( + name=ds_name, + type="azureblob", + connection_string=con_str, + container=container + ) + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + ds = client.create_data_source_connection(data_source_connection) + + index_name = id_name + fields = [ + { + "name": "hotelId", + "type": "Edm.String", + "key": True, + "searchable": False + }] + index = SearchIndex(name=index_name, fields=fields) + ind = SearchIndexClient(endpoint, AzureKeyCredential(api_key)).create_index(index) + return SearchIndexer(name=name, data_source_name=ds.name, target_index_name=ind.name) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + result = client.create_indexer(indexer) + assert result.name == "sample-indexer" + assert result.target_index_name == "hotels" + assert result.data_source_name == "sample-datasource" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + result = client.create_indexer(indexer) + assert len(client.get_indexers()) == 1 + client.delete_indexer("sample-indexer") + assert len(client.get_indexers()) == 0 + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_reset_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + result = client.create_indexer(indexer) + assert len(client.get_indexers()) == 1 + result = client.reset_indexer("sample-indexer") + assert client.get_indexer_status("sample-indexer").last_result.status in ('InProgress', 'reset') + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_run_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + result = client.create_indexer(indexer) + assert len(client.get_indexers()) == 1 + start = time.time() + client.run_indexer("sample-indexer") + assert client.get_indexer_status("sample-indexer").status == 'running' + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + created = client.create_indexer(indexer) + result = client.get_indexer("sample-indexer") + assert result.name == "sample-indexer" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_list_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer1 = self._prepare_indexer(endpoint, api_key) + indexer2 = self._prepare_indexer(endpoint, api_key, name="another-indexer", ds_name="another-datasource", id_name="another-index") + created1 = client.create_indexer(indexer1) + created2 = client.create_indexer(indexer2) + result = client.get_indexers() + assert isinstance(result, list) + assert set(x.name for x in result) == {"sample-indexer", "another-indexer"} + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_indexer(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + created = client.create_indexer(indexer) + assert len(client.get_indexers()) == 1 + indexer.description = "updated" + client.create_or_update_indexer(indexer) + assert len(client.get_indexers()) == 1 + result = client.get_indexer("sample-indexer") + assert result.name == "sample-indexer" + assert result.description == "updated" + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_get_indexer_status(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + result = client.create_indexer(indexer) + status = client.get_indexer_status("sample-indexer") + assert status.status is not None + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_create_or_update_indexer_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + created = client.create_indexer(indexer) + etag = created.e_tag + + + indexer.description = "updated" + client.create_or_update_indexer(indexer) + + indexer.e_tag = etag + with pytest.raises(HttpResponseError): + client.create_or_update_indexer(indexer, match_condition=MatchConditions.IfNotModified) + + @SearchResourceGroupPreparer(random_name_enabled=True) + @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) + def test_delete_indexer_if_unchanged(self, api_key, endpoint, index_name, **kwargs): + client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) + indexer = self._prepare_indexer(endpoint, api_key) + result = client.create_indexer(indexer) + etag = result.e_tag + + indexer.description = "updated" + client.create_or_update_indexer(indexer) + + indexer.e_tag = etag + with pytest.raises(HttpResponseError): + client.delete_indexer(indexer, match_condition=MatchConditions.IfNotModified) diff --git a/sdk/search/azure-search-documents/tests/test_search_service_client.py b/sdk/search/azure-search-documents/tests/test_search_service_client.py deleted file mode 100644 index 55dd866595b20..0000000000000 --- a/sdk/search/azure-search-documents/tests/test_search_service_client.py +++ /dev/null @@ -1,118 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -import pytest - -try: - from unittest import mock -except ImportError: - import mock - -from azure.core.credentials import AzureKeyCredential -from azure.search.documents import SearchClient -from azure.search.documents.indexes import SearchIndexClient, SearchIndexerClient -from azure.search.documents.indexes.models import SearchIndexerDataContainer, SearchIndexerDataSourceConnection -from azure.search.documents.indexes._internal._utils import pack_search_indexer_data_source - -CREDENTIAL = AzureKeyCredential(key="test_api_key") - - -class TestSearchIndexClient(object): - def test_index_init(self): - client = SearchIndexClient("endpoint", CREDENTIAL) - assert client._headers == { - "api-key": "test_api_key", - "Accept": "application/json;odata.metadata=minimal", - } - - def test_index_credential_roll(self): - credential = AzureKeyCredential(key="old_api_key") - client = SearchIndexClient("endpoint", credential) - assert client._headers == { - "api-key": "old_api_key", - "Accept": "application/json;odata.metadata=minimal", - } - credential.update("new_api_key") - assert client._headers == { - "api-key": "new_api_key", - "Accept": "application/json;odata.metadata=minimal", - } - - def test_get_search_client(self): - credential = AzureKeyCredential(key="old_api_key") - client = SearchIndexClient("endpoint", credential) - search_client = client.get_search_client('index') - assert isinstance(search_client, SearchClient) - - @mock.patch( - "azure.search.documents.indexes._internal._generated._search_service_client.SearchServiceClient.get_service_statistics" - ) - def test_get_service_statistics(self, mock_get_stats): - client = SearchIndexClient("endpoint", CREDENTIAL) - client.get_service_statistics() - assert mock_get_stats.called - assert mock_get_stats.call_args[0] == () - assert mock_get_stats.call_args[1] == {"headers": client._headers} - - def test_index_endpoint_https(self): - credential = AzureKeyCredential(key="old_api_key") - client = SearchIndexClient("endpoint", credential) - assert client._endpoint.startswith('https') - - client = SearchIndexClient("https://endpoint", credential) - assert client._endpoint.startswith('https') - - with pytest.raises(ValueError): - client = SearchIndexClient("http://endpoint", credential) - - with pytest.raises(ValueError): - client = SearchIndexClient(12345, credential) - - -class TestSearchIndexerClient(object): - def test_indexer_init(self): - client = SearchIndexerClient("endpoint", CREDENTIAL) - assert client._headers == { - "api-key": "test_api_key", - "Accept": "application/json;odata.metadata=minimal", - } - - def test_indexer_credential_roll(self): - credential = AzureKeyCredential(key="old_api_key") - client = SearchIndexerClient("endpoint", credential) - assert client._headers == { - "api-key": "old_api_key", - "Accept": "application/json;odata.metadata=minimal", - } - credential.update("new_api_key") - assert client._headers == { - "api-key": "new_api_key", - "Accept": "application/json;odata.metadata=minimal", - } - - def test_indexer_endpoint_https(self): - credential = AzureKeyCredential(key="old_api_key") - client = SearchIndexerClient("endpoint", credential) - assert client._endpoint.startswith('https') - - client = SearchIndexerClient("https://endpoint", credential) - assert client._endpoint.startswith('https') - - with pytest.raises(ValueError): - client = SearchIndexerClient("http://endpoint", credential) - - with pytest.raises(ValueError): - client = SearchIndexerClient(12345, credential) - - def test_datasource_with_empty_connection_string(self): - container = SearchIndexerDataContainer(name='searchcontainer') - data_source_connection = SearchIndexerDataSourceConnection( - name="test", - type="azureblob", - connection_string="", - container=container - ) - packed_data_source_connection = pack_search_indexer_data_source(data_source_connection) - assert packed_data_source_connection.credentials.connection_string == "" diff --git a/sdk/search/azure-search-documents/tests/test_service_live.py b/sdk/search/azure-search-documents/tests/test_service_live.py deleted file mode 100644 index 6b7e7853bde98..0000000000000 --- a/sdk/search/azure-search-documents/tests/test_service_live.py +++ /dev/null @@ -1,790 +0,0 @@ -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -import json -from os.path import dirname, join, realpath -import time - -import pytest - -from devtools_testutils import AzureMgmtTestCase - -from search_service_preparer import SearchServicePreparer, SearchResourceGroupPreparer - -from azure.core import MatchConditions -from azure.core.credentials import AzureKeyCredential -from azure.core.exceptions import HttpResponseError -from azure.search.documents.indexes.models import( - AnalyzeTextOptions, - AnalyzeResult, - CorsOptions, - EntityRecognitionSkill, - SearchIndex, - InputFieldMappingEntry, - OutputFieldMappingEntry, - ScoringProfile, - SearchIndexerSkillset, - SearchIndexerDataSourceConnection, - SearchIndexer, - SearchIndexerDataContainer, - SynonymMap, - SimpleField, - SearchFieldDataType -) -from azure.search.documents.indexes import SearchIndexClient, SearchIndexerClient - -CWD = dirname(realpath(__file__)) -SCHEMA = open(join(CWD, "hotel_schema.json")).read() -BATCH = json.load(open(join(CWD, "hotel_small.json"))) -TIME_TO_SLEEP = 5 -CONNECTION_STRING = 'DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==;EndpointSuffix=core.windows.net' - -class SearchClientTest(AzureMgmtTestCase): - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer() - def test_get_service_statistics(self, api_key, endpoint, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.get_service_statistics() - assert isinstance(result, dict) - assert set(result.keys()) == {"counters", "limits"} - -class SearchIndexesClientTest(AzureMgmtTestCase): - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer() - def test_list_indexes_empty(self, api_key, endpoint, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.list_indexes() - with pytest.raises(StopIteration): - next(result) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_list_indexes(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.list_indexes() - - first = next(result) - assert first.name == index_name - - with pytest.raises(StopIteration): - next(result) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_index(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.get_index(index_name) - assert result.name == index_name - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_index_statistics(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.get_index_statistics(index_name) - assert set(result.keys()) == {'document_count', 'storage_size'} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_indexes(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - client.delete_index(index_name) - import time - if self.is_live: - time.sleep(TIME_TO_SLEEP) - result = client.list_indexes() - with pytest.raises(StopIteration): - next(result) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_indexes_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - - # First create an index - name = "hotels" - fields = [ - { - "name": "hotelId", - "type": "Edm.String", - "key": True, - "searchable": False - }, - { - "name": "baseRate", - "type": "Edm.Double" - }] - scoring_profile = ScoringProfile( - name="MyProfile" - ) - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - result = client.create_index(index) - etag = result.e_tag - # get e tag and update - index.scoring_profiles = [] - client.create_or_update_index(index) - - index.e_tag = etag - with pytest.raises(HttpResponseError): - client.delete_index(index, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_index(self, api_key, endpoint, index_name, **kwargs): - name = "hotels" - fields = [ - SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), - SimpleField(name="baseRate", type=SearchFieldDataType.Double) - ] - scoring_profile = ScoringProfile( - name="MyProfile" - ) - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.create_index(index) - assert result.name == "hotels" - assert result.scoring_profiles[0].name == scoring_profile.name - assert result.cors_options.allowed_origins == cors_options.allowed_origins - assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_index(self, api_key, endpoint, index_name, **kwargs): - name = "hotels" - fields = [ - SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), - SimpleField(name="baseRate", type=SearchFieldDataType.Double) - ] - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - scoring_profiles = [] - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = client.create_or_update_index(index=index) - assert len(result.scoring_profiles) == 0 - assert result.cors_options.allowed_origins == cors_options.allowed_origins - assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds - scoring_profile = ScoringProfile( - name="MyProfile" - ) - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - result = client.create_or_update_index(index=index) - assert result.scoring_profiles[0].name == scoring_profile.name - assert result.cors_options.allowed_origins == cors_options.allowed_origins - assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_indexes_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - - # First create an index - name = "hotels" - fields = [ - { - "name": "hotelId", - "type": "Edm.String", - "key": True, - "searchable": False - }, - { - "name": "baseRate", - "type": "Edm.Double" - }] - scoring_profile = ScoringProfile( - name="MyProfile" - ) - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - index = SearchIndex( - name=name, - fields=fields, - scoring_profiles=scoring_profiles, - cors_options=cors_options) - result = client.create_index(index) - etag = result.e_tag - # get e tag and update - index.scoring_profiles = [] - client.create_or_update_index(index) - - index.e_tag = etag - with pytest.raises(HttpResponseError): - client.create_or_update_index(index, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_analyze_text(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - analyze_request = AnalyzeTextOptions(text="One's ", analyzer_name="standard.lucene") - result = client.analyze_text(index_name, analyze_request) - assert len(result.tokens) == 2 - -class SearchSynonymMapsClientTest(AzureMgmtTestCase): - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_synonym_map(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - result = client.create_synonym_map(synonym_map) - assert isinstance(result, SynonymMap) - assert result.name == "test-syn-map" - assert result.synonyms == [ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ] - assert len(client.get_synonym_maps()) == 1 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_synonym_map(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - result = client.create_synonym_map(synonym_map) - assert len(client.get_synonym_maps()) == 1 - client.delete_synonym_map("test-syn-map") - assert len(client.get_synonym_maps()) == 0 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_synonym_map_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - result = client.create_synonym_map(synonym_map) - etag = result.e_tag - - synonym_map.synonyms = "\n".join([ - "Washington, Wash. => WA", - ]) - client.create_or_update_synonym_map(synonym_map) - - result.e_tag = etag - with pytest.raises(HttpResponseError): - client.delete_synonym_map(result, match_condition=MatchConditions.IfNotModified) - assert len(client.get_synonym_maps()) == 1 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_synonym_map(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - client.create_synonym_map(synonym_map) - assert len(client.get_synonym_maps()) == 1 - result = client.get_synonym_map("test-syn-map") - assert isinstance(result, SynonymMap) - assert result.name == "test-syn-map" - assert result.synonyms == [ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ] - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_synonym_maps(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - ]) - synonym_map_1 = SynonymMap(name="test-syn-map-1", synonyms=solr_format_synonyms) - client.create_synonym_map(synonym_map_1) - solr_format_synonyms = "\n".join([ - "Washington, Wash. => WA", - ]) - synonym_map_2 = SynonymMap(name="test-syn-map-2", synonyms=solr_format_synonyms) - client.create_synonym_map(synonym_map_2) - result = client.get_synonym_maps() - assert isinstance(result, list) - assert all(isinstance(x, SynonymMap) for x in result) - assert set(x.name for x in result) == {"test-syn-map-1", "test-syn-map-2"} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_synonym_map(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - client.create_synonym_map(synonym_map) - assert len(client.get_synonym_maps()) == 1 - synonym_map.synonyms = "\n".join([ - "Washington, Wash. => WA", - ]) - client.create_or_update_synonym_map(synonym_map) - assert len(client.get_synonym_maps()) == 1 - result = client.get_synonym_map("test-syn-map") - assert isinstance(result, SynonymMap) - assert result.name == "test-syn-map" - assert result.synonyms == [ - "Washington, Wash. => WA", - ] - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_synonym_map_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - solr_format_synonyms = "\n".join([ - "USA, United States, United States of America", - "Washington, Wash. => WA", - ]) - synonym_map = SynonymMap(name="test-syn-map", synonyms=solr_format_synonyms) - result = client.create_synonym_map(synonym_map) - etag = result.e_tag - - synonym_map.synonyms = "\n".join([ - "Washington, Wash. => WA", - ]) - - client.create_or_update_synonym_map(synonym_map) - - result.e_tag = etag - with pytest.raises(HttpResponseError): - client.create_or_update_synonym_map(result, match_condition=MatchConditions.IfNotModified) - - -class SearchSkillsetClientTest(AzureMgmtTestCase): - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_skillset(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") - - result = client.create_skillset(skillset) - assert isinstance(result, SearchIndexerSkillset) - assert result.name == "test-ss" - assert result.description == "desc" - assert result.e_tag - assert len(result.skills) == 1 - assert isinstance(result.skills[0], EntityRecognitionSkill) - - assert len(client.get_skillsets()) == 1 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_skillset(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") - - result = client.create_skillset(skillset) - assert len(client.get_skillsets()) == 1 - - client.delete_skillset("test-ss") - assert len(client.get_skillsets()) == 0 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_skillset_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") - - result = client.create_skillset(skillset) - etag = result.e_tag - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="updated") - updated = client.create_or_update_skillset(skillset) - updated.e_tag = etag - - with pytest.raises(HttpResponseError): - client.delete_skillset(updated, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_skillset(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc") - client.create_skillset(skillset) - assert len(client.get_skillsets()) == 1 - - result = client.get_skillset("test-ss") - assert isinstance(result, SearchIndexerSkillset) - assert result.name == "test-ss" - assert result.description == "desc" - assert result.e_tag - assert len(result.skills) == 1 - assert isinstance(result.skills[0], EntityRecognitionSkill) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_skillsets(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset1 = SearchIndexerSkillset(name='test-ss-1', skills=list([s]), description="desc1") - client.create_skillset(skillset1) - skillset2 = SearchIndexerSkillset(name='test-ss-2', skills=list([s]), description="desc2") - client.create_skillset(skillset2) - result = client.get_skillsets() - assert isinstance(result, list) - assert all(isinstance(x, SearchIndexerSkillset) for x in result) - assert set(x.name for x in result) == {"test-ss-1", "test-ss-2"} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_skillset(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") - client.create_or_update_skillset(skillset1) - skillset2 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc2") - client.create_or_update_skillset(skillset2) - assert len(client.get_skillsets()) == 1 - - result = client.get_skillset("test-ss") - assert isinstance(result, SearchIndexerSkillset) - assert result.name == "test-ss" - assert result.description == "desc2" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_skillset_inplace(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") - ss = client.create_or_update_skillset(skillset1) - skillset2 = SearchIndexerSkillset(name='test-ss', skills=[s], description="desc2", skillset=ss) - client.create_or_update_skillset(skillset2) - assert len(client.get_skillsets()) == 1 - - result = client.get_skillset("test-ss") - assert isinstance(result, SearchIndexerSkillset) - assert result.name == "test-ss" - assert result.description == "desc2" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_skillset_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - s = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizations")]) - - skillset1 = SearchIndexerSkillset(name='test-ss', skills=list([s]), description="desc1") - ss = client.create_or_update_skillset(skillset1) - etag = ss.e_tag - skillset2 = SearchIndexerSkillset(name='test-ss', skills=[s], description="desc2", skillset=ss) - client.create_or_update_skillset(skillset2) - assert len(client.get_skillsets()) == 1 - -class SearchDataSourcesClientTest(AzureMgmtTestCase): - - def _create_data_source_connection(self, name="sample-datasource"): - container = SearchIndexerDataContainer(name='searchcontainer') - data_source_connection = SearchIndexerDataSourceConnection( - name=name, - type="azureblob", - connection_string=CONNECTION_STRING, - container=container - ) - return data_source_connection - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_datasource(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - result = client.create_data_source_connection(data_source_connection) - assert result.name == "sample-datasource" - assert result.type == "azureblob" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_datasource(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - result = client.create_data_source_connection(data_source_connection) - assert len(client.get_data_source_connections()) == 1 - client.delete_data_source_connection("sample-datasource") - assert len(client.get_data_source_connections()) == 0 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_datasource(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = client.create_data_source_connection(data_source_connection) - result = client.get_data_source_connection("sample-datasource") - assert result.name == "sample-datasource" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_list_datasource(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection1 = self._create_data_source_connection() - data_source_connection2 = self._create_data_source_connection(name="another-sample") - created1 = client.create_data_source_connection(data_source_connection1) - created2 = client.create_data_source_connection(data_source_connection2) - result = client.get_data_source_connections() - assert isinstance(result, list) - assert set(x.name for x in result) == {"sample-datasource", "another-sample"} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_datasource(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = client.create_data_source_connection(data_source_connection) - assert len(client.get_data_source_connections()) == 1 - data_source_connection.description = "updated" - client.create_or_update_data_source_connection(data_source_connection) - assert len(client.get_data_source_connections()) == 1 - result = client.get_data_source_connection("sample-datasource") - assert result.name == "sample-datasource" - assert result.description == "updated" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_datasource_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = client.create_data_source_connection(data_source_connection) - etag = created.e_tag - - # Now update the data source connection - data_source_connection.description = "updated" - client.create_or_update_data_source_connection(data_source_connection) - - # prepare data source connection - data_source_connection.e_tag = etag # reset to the original data source connection - data_source_connection.description = "changed" - with pytest.raises(HttpResponseError): - client.create_or_update_data_source_connection(data_source_connection, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_datasource_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = client.create_data_source_connection(data_source_connection) - etag = created.e_tag - - # Now update the data source connection - data_source_connection.description = "updated" - client.create_or_update_data_source_connection(data_source_connection) - - # prepare data source connection - data_source_connection.e_tag = etag # reset to the original data source connection - with pytest.raises(HttpResponseError): - client.delete_data_source_connection(data_source_connection, match_condition=MatchConditions.IfNotModified) - assert len(client.get_data_source_connections()) == 1 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_datasource_string_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - data_source_connection = self._create_data_source_connection() - created = client.create_data_source_connection(data_source_connection) - etag = created.e_tag - - # Now update the data source connection - data_source_connection.description = "updated" - client.create_or_update_data_source_connection(data_source_connection) - - # prepare data source connection - data_source_connection.e_tag = etag # reset to the original data source connection - with pytest.raises(ValueError): - client.delete_data_source_connection(data_source_connection.name, match_condition=MatchConditions.IfNotModified) - - -class SearchIndexersClientTest(AzureMgmtTestCase): - - def _prepare_indexer(self, endpoint, api_key, name="sample-indexer", ds_name="sample-datasource", id_name="hotels"): - con_str = self.settings.AZURE_STORAGE_CONNECTION_STRING - self.scrubber.register_name_pair(con_str, 'connection_string') - container = SearchIndexerDataContainer(name='searchcontainer') - data_source_connection = SearchIndexerDataSourceConnection( - name=ds_name, - type="azureblob", - connection_string=con_str, - container=container - ) - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - ds = client.create_data_source_connection(data_source_connection) - - index_name = id_name - fields = [ - { - "name": "hotelId", - "type": "Edm.String", - "key": True, - "searchable": False - }] - index = SearchIndex(name=index_name, fields=fields) - ind = SearchIndexClient(endpoint, AzureKeyCredential(api_key)).create_index(index) - return SearchIndexer(name=name, data_source_name=ds.name, target_index_name=ind.name) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - result = client.create_indexer(indexer) - assert result.name == "sample-indexer" - assert result.target_index_name == "hotels" - assert result.data_source_name == "sample-datasource" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - result = client.create_indexer(indexer) - assert len(client.get_indexers()) == 1 - client.delete_indexer("sample-indexer") - assert len(client.get_indexers()) == 0 - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_reset_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - result = client.create_indexer(indexer) - assert len(client.get_indexers()) == 1 - result = client.reset_indexer("sample-indexer") - assert client.get_indexer_status("sample-indexer").last_result.status in ('InProgress', 'reset') - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_run_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - result = client.create_indexer(indexer) - assert len(client.get_indexers()) == 1 - start = time.time() - client.run_indexer("sample-indexer") - assert client.get_indexer_status("sample-indexer").status == 'running' - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - created = client.create_indexer(indexer) - result = client.get_indexer("sample-indexer") - assert result.name == "sample-indexer" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_list_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer1 = self._prepare_indexer(endpoint, api_key) - indexer2 = self._prepare_indexer(endpoint, api_key, name="another-indexer", ds_name="another-datasource", id_name="another-index") - created1 = client.create_indexer(indexer1) - created2 = client.create_indexer(indexer2) - result = client.get_indexers() - assert isinstance(result, list) - assert set(x.name for x in result) == {"sample-indexer", "another-indexer"} - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_indexer(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - created = client.create_indexer(indexer) - assert len(client.get_indexers()) == 1 - indexer.description = "updated" - client.create_or_update_indexer(indexer) - assert len(client.get_indexers()) == 1 - result = client.get_indexer("sample-indexer") - assert result.name == "sample-indexer" - assert result.description == "updated" - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_get_indexer_status(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - result = client.create_indexer(indexer) - status = client.get_indexer_status("sample-indexer") - assert status.status is not None - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_create_or_update_indexer_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - created = client.create_indexer(indexer) - etag = created.e_tag - - - indexer.description = "updated" - client.create_or_update_indexer(indexer) - - indexer.e_tag = etag - with pytest.raises(HttpResponseError): - client.create_or_update_indexer(indexer, match_condition=MatchConditions.IfNotModified) - - @SearchResourceGroupPreparer(random_name_enabled=True) - @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) - def test_delete_indexer_if_unchanged(self, api_key, endpoint, index_name, **kwargs): - client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) - indexer = self._prepare_indexer(endpoint, api_key) - result = client.create_indexer(indexer) - etag = result.e_tag - - indexer.description = "updated" - client.create_or_update_indexer(indexer) - - indexer.e_tag = etag - with pytest.raises(HttpResponseError): - client.delete_indexer(indexer, match_condition=MatchConditions.IfNotModified) diff --git a/sdk/search/ci.yml b/sdk/search/ci.yml index e07afa82b5136..7f3ef37472b74 100644 --- a/sdk/search/ci.yml +++ b/sdk/search/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/security/ci.yml b/sdk/security/ci.yml index cc92473c69a6b..69283f4f09383 100644 --- a/sdk/security/ci.yml +++ b/sdk/security/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: security Artifacts: - name: azure_mgmt_security - safeName: azuremgmtsecurity \ No newline at end of file + safeName: azuremgmtsecurity diff --git a/sdk/serialconsole/ci.yml b/sdk/serialconsole/ci.yml index b59c3c8918ed1..495a72461d791 100644 --- a/sdk/serialconsole/ci.yml +++ b/sdk/serialconsole/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: serialconsole Artifacts: - name: azure_mgmt_serialconsole - safeName: azuremgmtserialconsole \ No newline at end of file + safeName: azuremgmtserialconsole diff --git a/sdk/servermanager/ci.yml b/sdk/servermanager/ci.yml index d17bce17796b1..f6093cc143057 100644 --- a/sdk/servermanager/ci.yml +++ b/sdk/servermanager/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: servermanager Artifacts: - name: azure_mgmt_servermanager - safeName: azuremgmtservermanager \ No newline at end of file + safeName: azuremgmtservermanager diff --git a/sdk/servicebus/azure-servicebus/CHANGELOG.md b/sdk/servicebus/azure-servicebus/CHANGELOG.md index 3556002dbdabb..f1b832deb5460 100644 --- a/sdk/servicebus/azure-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-servicebus/CHANGELOG.md @@ -2,6 +2,15 @@ ## 7.0.0b6 (Unreleased) +**New Features** +* Messages can now be sent twice in succession. + +**Breaking Changes** + +* Attempting to call `send_messages` on something not a `Message`, `BatchMessage`, or list of `Message`s, will now throw a `TypeError` instead of `ValueError` +* Sending a message twice will no longer result in a MessageAlreadySettled exception. +* `ServiceBusClient.close()` now closes spawned senders and receivers. +* Attempting to initialize a sender or receiver with a different connection string entity and specified entity (e.g. `queue_name`) will result in an AuthenticationError ## 7.0.0b5 (2020-08-10) diff --git a/sdk/servicebus/azure-servicebus/README.md b/sdk/servicebus/azure-servicebus/README.md index 36319b7f146c6..ffa3c82ba0697 100644 --- a/sdk/servicebus/azure-servicebus/README.md +++ b/sdk/servicebus/azure-servicebus/README.md @@ -47,43 +47,13 @@ az servicebus namespace create --resource-group --name -NAMESPACE_NAME= - -export SERVICE_BUS_CONN_STR=$(az servicebus namespace authorization-rule keys list --resource-group $RES_GROUP --namespace-name $NAMESPACE_NAME --name RootManageSharedAccessKey --query primaryConnectionString --output tsv) -``` - -Once you've populated the `SERVICE_BUS_CONN_STR` environment variable, you can create the `ServiceBusClient`. - -```Python -from azure.servicebus import ServiceBusClient - -import os -connstr = os.environ['SERVICE_BUS_CONN_STR'] - -with ServiceBusClient.from_connection_string(connstr) as client: - ... -``` - -#### Create client using the azure-identity library: - -```python -import os -from azure.servicebus import ServiceBusClient -from azure.identity import DefaultAzureCredential - -credential = DefaultAzureCredential() - -FULLY_QUALIFIED_NAMESPACE = os.environ['SERVICE_BUS_FULLY_QUALIFIED_NAMESPACE'] -with ServiceBusClient(FULLY_QUALIFIED_NAMESPACE, credential): - ... -``` +#### [Create client using the azure-identity library][sample_authenticate_client_aad]: - This constructor takes the fully qualified namespace of your Service Bus instance and a credential that implements the [TokenCredential][token_credential_interface] @@ -93,7 +63,7 @@ protocol. There are implementations of the `TokenCredential` protocol available Azure Service Bus Data Owner role. For more information about using Azure Active Directory authorization with Service Bus, please refer to [the associated documentation][servicebus_aad_authentication]. -Note: client can be initialized without a context manager, but must be manually closed via client.close() to not leak resources. +>**Note:** client can be initialized without a context manager, but must be manually closed via client.close() to not leak resources. ## Key concepts @@ -126,6 +96,7 @@ The following sections provide several code snippets covering some of the most c * [Send and receive a message from a session enabled queue](#send-and-receive-a-message-from-a-session-enabled-queue) * [Working with topics and subscriptions](#working-with-topics-and-subscriptions) * [Settle a message after receipt](#settle-a-message-after-receipt) +* [Automatically renew Message or Session locks](#automatically-renew-message-or-session-locks) To perform management tasks such as creating and deleting queues/topics/subscriptions, please utilize the azure-mgmt-servicebus library, available [here][servicebus_management_repository]. @@ -158,9 +129,9 @@ with ServiceBusClient.from_connection_string(connstr) as client: ### Receive messages from a queue -To receive from a queue, you can either perform an ad-hoc receive via "receiver.receive_messages()" or receive persistently through the receiver itself. +To receive from a queue, you can either perform an ad-hoc receive via `receiver.receive_messages()` or receive persistently through the receiver itself. -#### Receive messages from a queue through iterating over ServiceBusReceiver +#### [Receive messages from a queue through iterating over ServiceBusReceiver][streaming_receive_reference] ```Python from azure.servicebus import ServiceBusClient @@ -173,7 +144,7 @@ with ServiceBusClient.from_connection_string(connstr) as client: # max_wait_time specifies how long the receiver should wait with no incoming messages before stopping receipt. # Default is None; to receive forever. with client.get_queue_receiver(queue_name, max_wait_time=30) as receiver: - for msg in receiver: # ServiceBusReceiver instance is a generator + for msg in receiver: # ServiceBusReceiver instance is a generator. This is equivilent to get_streaming_message_iter(). print(str(msg)) # If it is desired to halt receiving early, one can break out of the loop here safely. ``` @@ -183,7 +154,7 @@ with ServiceBusClient.from_connection_string(connstr) as client: > See [AutoLockRenewer](#autolockrenew) for a helper to perform this in the background automatically. > Lock duration is set in Azure on the queue or topic itself. -#### [Receive messages from a queue through `ServiceBusReceiver.receive_messages()`][receive_reference] +#### [Receive messages from a queue through ServiceBusReceiver.receive_messages()][receive_reference] > **NOTE:** `ServiceBusReceiver.receive_messages()` receives a single or constrained list of messages through an ad-hoc method call, as opposed to receiving perpetually from the generator. It always returns a list. @@ -346,27 +317,7 @@ with ServiceBusClient.from_connection_string(connstr) as client: msg.defer() ``` -## Troubleshooting - -### Logging - -- Enable `azure.servicebus` logger to collect traces from the library. -- Enable `uamqp` logger to collect traces from the underlying uAMQP library. -- Enable AMQP frame level trace by setting `logging_enable=True` when creating the client. - -### Timeouts - -There are various timeouts a user should be aware of within the library. -- 10 minute service side link closure: A link, once opened, will be closed after 10 minutes idle to protect the service against resource leakage. This should largely -be transparent to a user, but if you notice a reconnect occurring after such a duration, this is why. Performing any operations, including management operations, on the -link will extend this timeout. -- max_wait_time: Provided on creation of a receiver or when calling `receive_messages()` or `get_streaming_message_iter()`, the time after which receiving messages will halt after no traffic. This applies both to the imperative `receive_messages()` function as well as the length -a generator-style receive will run for before exiting if there are no messages. Passing None (default) will wait forever, up until the 10 minute threshold if no other action is taken. - -> **NOTE:** If processing of a message or session is sufficiently long as to cause timeouts, as an alternative to calling `renew_lock()` manually, one can -> leverage the `AutoLockRenew` functionality detailed below. - -### [AutoLockRenew][autolockrenew_reference] +### [Automatically renew Message or Session locks][autolockrenew_reference] `AutoLockRenew` is a simple method for ensuring your message or session remains locked even over long periods of time, if calling `renew_lock()` is impractical or undesired. Internally, it is not much more than shorthand for creating a concurrent watchdog to call `renew_lock()` if the object is nearing expiry. @@ -395,6 +346,26 @@ renewer.close() If for any reason auto-renewal has been interrupted or failed, this can be observed via the `auto_renew_error` property on the object being renewed. It would also manifest when trying to take action (such as completing a message) on the specified object. +## Troubleshooting + +### Logging + +- Enable `azure.servicebus` logger to collect traces from the library. +- Enable `uamqp` logger to collect traces from the underlying uAMQP library. +- Enable AMQP frame level trace by setting `logging_enable=True` when creating the client. + +### Timeouts + +There are various timeouts a user should be aware of within the library. +- 10 minute service side link closure: A link, once opened, will be closed after 10 minutes idle to protect the service against resource leakage. This should largely +be transparent to a user, but if you notice a reconnect occurring after such a duration, this is why. Performing any operations, including management operations, on the +link will extend this timeout. +- max_wait_time: Provided on creation of a receiver or when calling `receive_messages()` or `get_streaming_message_iter()`, the time after which receiving messages will halt after no traffic. This applies both to the imperative `receive_messages()` function as well as the length +a generator-style receive will run for before exiting if there are no messages. Passing None (default) will wait forever, up until the 10 minute threshold if no other action is taken. + +> **NOTE:** If processing of a message or session is sufficiently long as to cause timeouts, as an alternative to calling `renew_lock()` manually, one can +> leverage the `AutoLockRenew` functionality detailed [above](#automatically-renew-message-or-session-locks). + ### Common Exceptions Please view the [exceptions reference docs][exception_reference] for detailed descriptions of our common Exception types. @@ -446,14 +417,14 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio [service_bus_overview]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messaging-overview [queue_status_codes]: https://docs.microsoft.com/rest/api/servicebus/create-queue#response-codes [service_bus_docs]: https://docs.microsoft.com/azure/service-bus/ -[service_bus_mgmt_docs]: https://docs.microsoft.com/en-us/python/api/overview/azure/servicebus/management?view=azure-python -[queue_concept]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview#queues -[topic_concept]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview#topics -[subscription_concept]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions#topics-and-subscriptions -[azure_namespace_creation]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-create-namespace-portal +[service_bus_mgmt_docs]: https://docs.microsoft.com/python/api/overview/azure/servicebus/management?view=azure-python +[queue_concept]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messaging-overview#queues +[topic_concept]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messaging-overview#topics +[subscription_concept]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-queues-topics-subscriptions#topics-and-subscriptions +[azure_namespace_creation]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-create-namespace-portal [servicebus_management_repository]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/servicebus/azure-mgmt-servicebus -[get_servicebus_conn_str]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-create-namespace-portal#get-the-connection-string -[servicebus_aad_authentication]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-authentication-and-authorization +[get_servicebus_conn_str]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-create-namespace-portal#get-the-connection-string +[servicebus_aad_authentication]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-authentication-and-authorization [token_credential_interface]: ../../core/azure-core/azure/core/credentials.py [pypi_azure_identity]: https://pypi.org/project/azure-identity/ [message_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html#azure.servicebus.Message @@ -462,6 +433,7 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio [client_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html#azure.servicebus.ServiceBusClient [send_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html?highlight=send_messages#azure.servicebus.ServiceBusSender.send_messages [receive_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html?highlight=receive#azure.servicebus.ServiceBusReceiver.receive_messages +[streaming_receive_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html?highlight=get_streaming_message_iter#azure.servicebus.ServiceBusReceiver.get_streaming_message_iter [session_receive_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html?highlight=receive#azure.servicebus.ServiceBusSessionReceiver.receive_messages [session_send_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html?highlight=session_id#azure.servicebus.Message.session_id [complete_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html?highlight=complete#azure.servicebus.ReceivedMessage.complete @@ -472,6 +444,8 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio [exception_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html#module-azure.servicebus.exceptions [subscription_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.aio.html?highlight=subscription#azure.servicebus.aio.ServiceBusClient.get_subscription_receiver [topic_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/latest/azure.servicebus.html?highlight=topic#azure.servicebus.ServiceBusClient.get_topic_sender +[sample_authenticate_client_connstr]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/servicebus/azure-servicebus/samples/sync_samples/authenticate_client_connstr.py +[sample_authenticate_client_aad]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/servicebus/azure-servicebus/samples/sync_samples/client_identity_authentication.py [0_50_source]: https://github.com/Azure/azure-sdk-for-python/tree/servicebus_v0.50.3/sdk/servicebus/azure-servicebus/ [0_50_pypi]: https://pypi.org/project/azure-servicebus/0.50.3/ [0_50_api_docs]:https://azuresdkdocs.blob.core.windows.net/$web/python/azure-servicebus/0.50.3/index.html diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py index 223180d1bf114..80b181d116a96 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py @@ -21,7 +21,7 @@ from ._common._configuration import Configuration from .exceptions import ( ServiceBusError, - ServiceBusAuthorizationError, + ServiceBusAuthenticationError, _create_servicebus_exception ) from ._common.utils import create_properties @@ -104,7 +104,7 @@ def _convert_connection_string_to_kwargs(conn_str, shared_key_credential_type, * entity_in_kwargs = queue_name or topic_name if entity_in_conn_str and entity_in_kwargs and (entity_in_conn_str != entity_in_kwargs): - raise ServiceBusAuthorizationError( + raise ServiceBusAuthenticationError( "Entity names do not match, the entity name in connection string is {};" " the entity name in parameter is {}.".format(entity_in_conn_str, entity_in_kwargs) ) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/auto_lock_renewer.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/auto_lock_renewer.py index cb9a939f6c01b..f1744342bd685 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/auto_lock_renewer.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/auto_lock_renewer.py @@ -53,6 +53,17 @@ class AutoLockRenew(object): """ def __init__(self, executor=None, max_workers=None): + # type: (ThreadPoolExecutor, int) -> None + """Auto renew locks for messages and sessions using a background thread pool. + + :param executor: A user-specified thread pool. This cannot be combined with + setting `max_workers`. + :type executor: ~concurrent.futures.ThreadPoolExecutor + :param max_workers: Specify the maximum workers in the thread pool. If not + specified the number used will be derived from the core count of the environment. + This cannot be combined with `executor`. + :type max_workers: int + """ self._executor = executor or ThreadPoolExecutor(max_workers=max_workers) self._shutdown = threading.Event() self._sleep_time = 1 @@ -109,16 +120,18 @@ def _auto_lock_renew(self, renewable, starttime, timeout, on_lock_renew_failure= on_lock_renew_failure(renewable, error) def register(self, renewable, timeout=300, on_lock_renew_failure=None): + # type: (Union[ReceivedMessage, ServiceBusSession], float, Optional[LockRenewFailureCallback]) -> None """Register a renewable entity for automatic lock renewal. :param renewable: A locked entity that needs to be renewed. - :type renewable: ~azure.servicebus.ReceivedMessage or - ~azure.servicebus.ServiceBusSession - :param float timeout: A time in seconds that the lock should be maintained for. - Default value is 300 (5 minutes). - :param Optional[LockRenewFailureCallback] on_lock_renew_failure: - A callback may be specified to be called when the lock is lost on the renewable that is being registered. - Default value is None (no callback). + :type renewable: Union[~azure.servicebus.ReceivedMessage, ~azure.servicebus.ServiceBusSession] + :param timeout: A time in seconds that the lock should be maintained for. Default value is 300 (5 minutes). + :type timeout: float + :param on_lock_renew_failure: A callback may be specified to be called when the lock is lost on the renewable + that is being registered. Default value is None (no callback). + :type on_lock_renew_failure: Optional[LockRenewFailureCallback] + + :rtype: None """ if self._shutdown.is_set(): raise ServiceBusError("The AutoLockRenew has already been shutdown. Please create a new instance for" @@ -131,6 +144,8 @@ def close(self, wait=True): :param wait: Whether to block until thread pool has shutdown. Default is `True`. :type wait: bool + + :rtype: None """ self._shutdown.set() self._executor.shutdown(wait=wait) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py index 8d05221c8322b..77871922401a9 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py @@ -9,9 +9,10 @@ import uuid import functools import logging -from typing import Optional, List, Union, Iterable, TYPE_CHECKING, Callable +from typing import Optional, List, Union, Iterable, TYPE_CHECKING, Callable, Any import uamqp.message +from uamqp.constants import MessageState from .constants import ( _BATCH_MESSAGE_OVERHEAD_COST, @@ -52,8 +53,9 @@ MessageLockExpired, SessionLockExpired, MessageSettleFailed, - MessageContentTooLarge) -from .utils import utc_from_timestamp, utc_now, copy_messages_to_sendable_if_needed + MessageContentTooLarge, + ServiceBusError) +from .utils import utc_from_timestamp, utc_now, transform_messages_to_sendable_if_needed if TYPE_CHECKING: from .._servicebus_receiver import ServiceBusReceiver from .._servicebus_session_receiver import ServiceBusSessionReceiver @@ -65,7 +67,7 @@ class Message(object): # pylint: disable=too-many-public-methods,too-many-insta """A Service Bus Message. :param body: The data to send in a single message. - :type body: str or bytes + :type body: Union[str, bytes] :keyword dict properties: The user defined properties on the message. :keyword str session_id: The session identifier of the message for a sessionful entity. @@ -95,6 +97,7 @@ class Message(object): # pylint: disable=too-many-public-methods,too-many-insta """ def __init__(self, body, **kwargs): + # type: (Union[str, bytes], Any) -> None # Although we might normally thread through **kwargs this causes # problems as MessageProperties won't absorb spurious args. self._encoding = kwargs.pop("encoding", 'UTF-8') @@ -152,6 +155,12 @@ def _set_message_annotations(self, key, value): else: self.message.annotations[ANNOTATION_SYMBOL_KEY_MAP[key]] = value + def _to_outgoing_message(self): + # type: () -> Message + self.message.state = MessageState.WaitingToBeSent + self.message._response = None # pylint: disable=protected-access + return self + @property def session_id(self): # type: () -> str @@ -491,7 +500,6 @@ class BatchMessage(object): :vartype message: ~uamqp.BatchMessage :param int max_size_in_bytes: The maximum size of bytes data that a BatchMessage object can hold. - """ def __init__(self, max_size_in_bytes=None): # type: (Optional[int]) -> None @@ -514,7 +522,7 @@ def __len__(self): def _from_list(self, messages): for each in messages: if not isinstance(each, Message): - raise ValueError("Only Message or an iterable object containing Message objects are accepted." + raise TypeError("Only Message or an iterable object containing Message objects are accepted." "Received instead: {}".format(each.__class__.__name__)) self.add(each) @@ -540,7 +548,7 @@ def add(self, message): :rtype: None :raises: :class: ~azure.servicebus.exceptions.MessageContentTooLarge, when exceeding the size limit. """ - message = copy_messages_to_sendable_if_needed(message) + message = transform_messages_to_sendable_if_needed(message) message_size = message.message.get_message_encoded_size() # For a BatchMessage, if the encoded_message_size of event_data is < 256, then the overhead cost to encode that @@ -570,11 +578,11 @@ class PeekMessage(Message): This message is still on the queue, and unlocked. A peeked message cannot be completed, abandoned, dead-lettered or deferred. It has no lock token or expiry. - """ def __init__(self, message): - super(PeekMessage, self).__init__(None, message=message) + # type: (uamqp.message.Message) -> None + super(PeekMessage, self).__init__(None, message=message) # type: ignore def _to_outgoing_message(self): # type: () -> Message @@ -741,12 +749,17 @@ class ReceivedMessageBase(PeekMessage): """ def __init__(self, message, mode=ReceiveSettleMode.PeekLock, **kwargs): + # type: (uamqp.message.Message, ReceiveSettleMode, Any) -> None super(ReceivedMessageBase, self).__init__(message=message) self._settled = (mode == ReceiveSettleMode.ReceiveAndDelete) self._received_timestamp_utc = utc_now() self._is_deferred_message = kwargs.get("is_deferred_message", False) - self.auto_renew_error = None - self._receiver = None # type: ignore + self.auto_renew_error = None # type: Optional[Exception] + try: + self._receiver = kwargs.pop("receiver") # type: Union[ServiceBusReceiver, ServiceBusSessionReceiver] + except KeyError: + raise TypeError("ReceivedMessage requires a receiver to be initialized. This class should never be" + \ + "initialized by a user; the Message class should be utilized instead.") self._expiry = None def _check_live(self, action): @@ -769,6 +782,7 @@ def _check_live(self, action): def _settle_via_mgmt_link(self, settle_operation, dead_letter_reason=None, dead_letter_description=None): # type: (str, Optional[str], Optional[str]) -> Callable # pylint: disable=protected-access + if settle_operation == MESSAGE_COMPLETE: return functools.partial( self._receiver._settle_message, @@ -822,13 +836,14 @@ def _settle_via_receiver_link(self, settle_operation, dead_letter_reason=None, d @property def _lock_expired(self): # type: () -> bool + # pylint: disable=protected-access """ Whether the lock on the message has expired. :rtype: bool """ try: - if self._receiver.session: # pylint: disable=protected-access + if self._receiver.session: # type: ignore raise TypeError("Session messages do not expire. Please use the Session expiry instead.") except AttributeError: # Is not a session receiver pass @@ -859,6 +874,7 @@ def lock_token(self): @property def locked_until_utc(self): # type: () -> Optional[datetime.datetime] + # pylint: disable=protected-access """ The UTC datetime until which the message will be locked in the queue/subscription. When the lock expires, delivery count of hte message is incremented and the message @@ -867,7 +883,7 @@ def locked_until_utc(self): :rtype: datetime.datetime """ try: - if self._settled or self._receiver.session: # pylint: disable=protected-access + if self._settled or self._receiver.session: # type: ignore return None except AttributeError: # not settled, and isn't session receiver. pass @@ -1021,6 +1037,7 @@ def defer(self): def renew_lock(self): # type: () -> None + # pylint: disable=protected-access,no-member """Renew the message lock. This will maintain the lock on the message to ensure it is not returned to the queue @@ -1041,7 +1058,7 @@ def renew_lock(self): :raises: ~azure.servicebus.exceptions.MessageAlreadySettled is message has already been settled. """ try: - if self._receiver.session: + if self._receiver.session: # type: ignore raise TypeError("Session messages cannot be renewed. Please renew the Session lock instead.") except AttributeError: pass @@ -1050,5 +1067,5 @@ def renew_lock(self): if not token: raise ValueError("Unable to renew lock - no lock token found.") - expiry = self._receiver._renew_locks(token) # pylint: disable=protected-access,no-member + expiry = self._receiver._renew_locks(token) # type: ignore self._expiry = utc_from_timestamp(expiry[MGMT_RESPONSE_MESSAGE_EXPIRATION][0]/1000.0) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/mgmt_handlers.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/mgmt_handlers.py index 48ebdfe156ec5..c2cfa70a5e5aa 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/mgmt_handlers.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/mgmt_handlers.py @@ -62,6 +62,7 @@ def deferred_message_op( status_code, message, description, + receiver, mode=ReceiveSettleMode.PeekLock, message_type=ReceivedMessage ): @@ -69,7 +70,7 @@ def deferred_message_op( parsed = [] for m in message.get_data()[b'messages']: wrapped = uamqp.Message.decode_from_bytes(bytearray(m[b'message'])) - parsed.append(message_type(wrapped, mode, is_deferred_message=True)) + parsed.append(message_type(wrapped, mode, is_deferred_message=True, receiver=receiver)) return parsed if status_code in [202, 204]: return [] diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/receiver_mixins.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/receiver_mixins.py index edd3404800cd4..2a767e4795a68 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/receiver_mixins.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/receiver_mixins.py @@ -51,8 +51,7 @@ def _populate_attributes(self, **kwargs): self._max_wait_time = kwargs.get("max_wait_time", None) def _build_message(self, received, message_type=ReceivedMessage): - message = message_type(message=received, mode=self._mode) - message._receiver = self # pylint: disable=protected-access + message = message_type(message=received, mode=self._mode, receiver=self) self._last_received_sequenced_number = message.sequence_number return message diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/utils.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/utils.py index a992d841051f0..65241798087ba 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/utils.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/utils.py @@ -179,7 +179,7 @@ def generate_dead_letter_entity_name( return entity_name -def copy_messages_to_sendable_if_needed(messages): +def transform_messages_to_sendable_if_needed(messages): """ This method is to convert single/multiple received messages to sendable messages to enable message resending. """ diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py index c0ad711e2590d..be27075ea2de5 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py @@ -2,11 +2,12 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, List, TYPE_CHECKING +import logging import uamqp -from ._base_handler import _parse_conn_str, ServiceBusSharedKeyCredential +from ._base_handler import _parse_conn_str, ServiceBusSharedKeyCredential, BaseHandler from ._servicebus_sender import ServiceBusSender from ._servicebus_receiver import ServiceBusReceiver from ._servicebus_session_receiver import ServiceBusSessionReceiver @@ -16,6 +17,8 @@ if TYPE_CHECKING: from azure.core.credentials import TokenCredential +_LOGGER = logging.getLogger(__name__) + class ServiceBusClient(object): """The ServiceBusClient class defines a high level interface for @@ -69,6 +72,7 @@ def __init__( self._auth_uri = "{}/{}".format(self._auth_uri, self._entity_name) # Internal flag for switching whether to apply connection sharing, pending fix in uamqp library self._connection_sharing = False + self._handlers = [] # type: List[BaseHandler] def __enter__(self): if self._connection_sharing: @@ -89,10 +93,22 @@ def _create_uamqp_connection(self): def close(self): # type: () -> None """ - Close down the ServiceBus client and the underlying connection. + Close down the ServiceBus client. + All spawned senders, receivers and underlying connection will be shutdown. :return: None """ + for handler in self._handlers: + try: + handler.close() + except Exception as exception: # pylint: disable=broad-except + _LOGGER.error( + "Client has met an exception when closing the handler: %r. Exception: %r.", + handler._container_id, # pylint: disable=protected-access + exception, + ) + del self._handlers[:] + if self._connection_sharing and self._connection: self._connection.destroy() @@ -157,7 +173,7 @@ def get_queue_sender(self, queue_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusSender( + handler = ServiceBusSender( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -168,6 +184,8 @@ def get_queue_sender(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_receiver(self, queue_name, **kwargs): # type: (str, Any) -> ServiceBusReceiver @@ -205,7 +223,7 @@ def get_queue_receiver(self, queue_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -216,6 +234,8 @@ def get_queue_receiver(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_deadletter_receiver(self, queue_name, **kwargs): # type: (str, Any) -> ServiceBusReceiver @@ -265,7 +285,7 @@ def get_queue_deadletter_receiver(self, queue_name, **kwargs): queue_name=queue_name, transfer_deadletter=kwargs.get('transfer_deadletter', False) ) - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, entity_name=entity_name, credential=self._credential, @@ -277,6 +297,8 @@ def get_queue_deadletter_receiver(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_topic_sender(self, topic_name, **kwargs): # type: (str, Any) -> ServiceBusSender @@ -300,7 +322,7 @@ def get_topic_sender(self, topic_name, **kwargs): :caption: Create a new instance of the ServiceBusSender from ServiceBusClient. """ - return ServiceBusSender( + handler = ServiceBusSender( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, credential=self._credential, @@ -311,6 +333,8 @@ def get_topic_sender(self, topic_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): # type: (str, str, Any) -> ServiceBusReceiver @@ -353,7 +377,7 @@ def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, subscription_name=subscription_name, @@ -365,6 +389,8 @@ def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_deadletter_receiver(self, topic_name, subscription_name, **kwargs): # type: (str, str, Any) -> ServiceBusReceiver @@ -416,7 +442,7 @@ def get_subscription_deadletter_receiver(self, topic_name, subscription_name, ** subscription_name=subscription_name, transfer_deadletter=kwargs.get('transfer_deadletter', False) ) - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, entity_name=entity_name, credential=self._credential, @@ -428,9 +454,11 @@ def get_subscription_deadletter_receiver(self, topic_name, subscription_name, ** user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_session_receiver(self, topic_name, subscription_name, session_id=None, **kwargs): - # type: (str, str, str, Any) -> ServiceBusReceiver + # type: (str, str, str, Any) -> ServiceBusSessionReceiver """Get ServiceBusReceiver for the specific subscription under the topic. :param str topic_name: The name of specific Service Bus Topic the client connects to. @@ -473,7 +501,7 @@ def get_subscription_session_receiver(self, topic_name, subscription_name, sessi """ # pylint: disable=protected-access - return ServiceBusSessionReceiver( + handler = ServiceBusSessionReceiver( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, subscription_name=subscription_name, @@ -486,6 +514,8 @@ def get_subscription_session_receiver(self, topic_name, subscription_name, sessi user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): # type: (str, str, Any) -> ServiceBusSessionReceiver @@ -526,7 +556,7 @@ def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): """ # pylint: disable=protected-access - return ServiceBusSessionReceiver( + handler = ServiceBusSessionReceiver( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -538,3 +568,5 @@ def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py index 7a322e6b76a07..883a291581c32 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py @@ -277,7 +277,7 @@ def _settle_message(self, settlement, lock_tokens, dead_letter_details=None): ) def _renew_locks(self, *lock_tokens): - # type: (*str) -> Any + # type: (str) -> Any message = {MGMT_REQUEST_LOCK_TOKENS: types.AMQPArray(lock_tokens)} return self._mgmt_request_response_with_retry( REQUEST_RESPONSE_RENEWLOCK_OPERATION, @@ -286,15 +286,25 @@ def _renew_locks(self, *lock_tokens): ) def get_streaming_message_iter(self, max_wait_time=None): + # type: (float) -> Iterator[ReceivedMessage] """Receive messages from an iterator indefinitely, or if a max_wait_time is specified, until such a timeout occurs. - :param float max_wait_time: Maximum time to wait in seconds for the next message to arrive. + :param max_wait_time: Maximum time to wait in seconds for the next message to arrive. If no messages arrive, and no timeout is specified, this call will not return until the connection is closed. If specified, and no messages arrive for the timeout period, the iterator will stop. + :type max_wait_time: float + :rtype: Iterator[ReceivedMessage] - :rtype Iterator[ReceivedMessage] + .. admonition:: Example: + + .. literalinclude:: ../samples/sync_samples/sample_code_servicebus.py + :start-after: [START receive_forever] + :end-before: [END receive_forever] + :language: python + :dedent: 4 + :caption: Receive indefinitely from an iterator in streaming fashion. """ return self._iter_contextual_wrapper(max_wait_time) @@ -308,6 +318,7 @@ def from_connection_string( """Create a ServiceBusReceiver from a connection string. :param conn_str: The connection string of a Service Bus. + :type conn_str: str :keyword str queue_name: The path of specific Service Bus Queue the client connects to. :keyword str topic_name: The path of specific Service Bus Topic which contains the Subscription the client connects to. @@ -341,6 +352,9 @@ def from_connection_string( within its request to the service. :rtype: ~azure.servicebus.ServiceBusReceiver + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/sync_samples/sample_code_servicebus.py @@ -384,7 +398,8 @@ def receive_messages(self, max_batch_size=None, max_wait_time=None): If no messages arrive, and no timeout is specified, this call will not return until the connection is closed. If specified, an no messages arrive within the timeout period, an empty list will be returned. - :rtype: list[~azure.servicebus.ReceivedMessage] + + :rtype: List[~azure.servicebus.ReceivedMessage] .. admonition:: Example: @@ -411,9 +426,9 @@ def receive_deferred_messages(self, sequence_numbers): When receiving deferred messages from a partitioned entity, all of the supplied sequence numbers must be messages from the same partition. - :param list[int] sequence_numbers: A list of the sequence numbers of messages that have been + :param List[int] sequence_numbers: A list of the sequence numbers of messages that have been deferred. - :rtype: list[~azure.servicebus.ReceivedMessage] + :rtype: List[~azure.servicebus.ReceivedMessage] .. admonition:: Example: @@ -440,14 +455,12 @@ def receive_deferred_messages(self, sequence_numbers): self._populate_message_properties(message) - handler = functools.partial(mgmt_handlers.deferred_message_op, mode=self._mode) + handler = functools.partial(mgmt_handlers.deferred_message_op, mode=self._mode, receiver=self) messages = self._mgmt_request_response_with_retry( REQUEST_RESPONSE_RECEIVE_BY_SEQUENCE_NUMBER, message, handler ) - for m in messages: - m._receiver = self # pylint: disable=protected-access return messages def peek_messages(self, message_count=1, sequence_number=None): @@ -460,7 +473,8 @@ def peek_messages(self, message_count=1, sequence_number=None): :param int message_count: The maximum number of messages to try and peek. The default value is 1. :param int sequence_number: A message sequence number from which to start browsing messages. - :rtype: list[~azure.servicebus.PeekMessage] + + :rtype: List[~azure.servicebus.PeekMessage] .. admonition:: Example: diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_sender.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_sender.py index d7b199502c694..a1c20ba6f9425 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_sender.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_sender.py @@ -18,7 +18,7 @@ OperationTimeoutError, _ServiceBusErrorPolicy, ) -from ._common.utils import create_authentication, copy_messages_to_sendable_if_needed +from ._common.utils import create_authentication, transform_messages_to_sendable_if_needed from ._common.constants import ( REQUEST_RESPONSE_CANCEL_SCHEDULED_MESSAGE_OPERATION, REQUEST_RESPONSE_SCHEDULE_MESSAGE_OPERATION, @@ -68,7 +68,7 @@ def _build_schedule_request(cls, schedule_time_utc, *messages): if not isinstance(message, Message): raise ValueError("Scheduling batch messages only supports iterables containing Message Objects." " Received instead: {}".format(message.__class__.__name__)) - message = copy_messages_to_sendable_if_needed(message) + message = transform_messages_to_sendable_if_needed(message) message.scheduled_enqueue_time_utc = schedule_time_utc message_data = {} message_data[MGMT_REQUEST_MESSAGE_ID] = message.message_id @@ -198,10 +198,10 @@ def schedule_messages(self, messages, schedule_time_utc): """Send Message or multiple Messages to be enqueued at a specific time. Returns a list of the sequence numbers of the enqueued messages. :param messages: The message or list of messages to schedule. - :type messages: ~azure.servicebus.Message or list[~azure.servicebus.Message] + :type messages: Union[~azure.servicebus.Message, List[~azure.servicebus.Message]] :param schedule_time_utc: The utc date and time to enqueue the messages. :type schedule_time_utc: ~datetime.datetime - :rtype: list[int] + :rtype: List[int] .. admonition:: Example: @@ -266,6 +266,7 @@ def from_connection_string( """Create a ServiceBusSender from a connection string. :param conn_str: The connection string of a Service Bus. + :type conn_str: str :keyword str queue_name: The path of specific Service Bus Queue the client connects to. Only one of queue_name or topic_name can be provided. :keyword str topic_name: The path of specific Service Bus Topic the client connects to. @@ -280,7 +281,11 @@ def from_connection_string( keys: `'proxy_hostname'` (str value) and `'proxy_port'` (int value). Additionally the following keys may also be present: `'username', 'password'`. :keyword str user_agent: If specified, this will be added in front of the built-in user agent string. - :rtype: ~azure.servicebus.ServiceBusSenderClient + + :rtype: ~azure.servicebus.ServiceBusSender + + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. .. admonition:: Example: @@ -328,7 +333,7 @@ def send_messages(self, message): :caption: Send message. """ - message = copy_messages_to_sendable_if_needed(message) + message = transform_messages_to_sendable_if_needed(message) try: batch = self.create_batch() batch._from_list(message) # pylint: disable=protected-access @@ -337,6 +342,8 @@ def send_messages(self, message): pass if isinstance(message, BatchMessage) and len(message) == 0: # pylint: disable=len-as-condition raise ValueError("A BatchMessage or list of Message must have at least one Message") + if not isinstance(message, BatchMessage) and not isinstance(message, Message): + raise TypeError("Can only send azure.servicebus. or lists of Messages.") self._do_retryable_operation( self._send, diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_session_receiver.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_session_receiver.py index 417abe97bf988..c6a6bcc33d35d 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_session_receiver.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_session_receiver.py @@ -82,13 +82,14 @@ class ServiceBusSessionReceiver(ServiceBusReceiver, SessionReceiverMixin): """ def __init__(self, fully_qualified_namespace, credential, **kwargs): + # type: (str, TokenCredential, Any) -> None super(ServiceBusSessionReceiver, self).__init__(fully_qualified_namespace, credential, **kwargs) self._populate_session_attributes(**kwargs) self._session = ServiceBusSession(self._session_id, self, self._config.encoding) @property def session(self): - # type: ()->ServiceBusSession + # type: () -> ServiceBusSession """ Get the ServiceBusSession object linked with the receiver. Session is only available to session-enabled entities. @@ -115,7 +116,7 @@ def from_connection_string( # type: (str, Any) -> ServiceBusSessionReceiver """Create a ServiceBusSessionReceiver from a connection string. - :param conn_str: The connection string of a Service Bus. + :param str conn_str: The connection string of a Service Bus. :keyword str queue_name: The path of specific Service Bus Queue the client connects to. :keyword str topic_name: The path of specific Service Bus Topic which contains the Subscription the client connects to. @@ -153,6 +154,9 @@ def from_connection_string( within its request to the service. :rtype: ~azure.servicebus.ServiceBusSessionReceiver + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/sync_samples/sample_code_servicebus.py diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py index 8db9f20d7b1c5..4e13bf070d495 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py @@ -18,7 +18,7 @@ 'ServiceBusSender', 'ServiceBusReceiver', 'ServiceBusSessionReceiver', + 'ServiceBusSession', 'ServiceBusSharedKeyCredential', - 'AutoLockRenew', - 'ServiceBusSession' + 'AutoLockRenew' ] diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_auto_lock_renewer.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_auto_lock_renewer.py index be006a36f1c8c..fbbdc7cac69f0 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_auto_lock_renewer.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_auto_lock_renewer.py @@ -72,8 +72,12 @@ def _renewable(self, renewable: Union[ReceivedMessage, ServiceBusSession]) -> bo return False if renewable._lock_expired: return False - if not renewable._receiver._running: - return False + try: + if not renewable._receiver._running: # type: ignore + return False + except AttributeError: # If for whatever reason the renewable isn't hooked up to a receiver + raise ServiceBusError("Cannot renew an entity without an associated receiver. " + "ReceivedMessage and active ServiceBusReceiver.Session objects are expected.") return True async def _auto_lock_renew(self, diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_message.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_message.py index 6bd8c71228642..2e6a66e5559ab 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_message.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_message.py @@ -125,7 +125,8 @@ async def defer(self) -> None: # type: ignore await self._settle_message(MESSAGE_DEFER) self._settled = True - async def renew_lock(self) -> None: # type: ignore + async def renew_lock(self) -> None: + # pylint: disable=protected-access """Renew the message lock. This will maintain the lock on the message to ensure @@ -142,7 +143,7 @@ async def renew_lock(self) -> None: # type: ignore :raises: ~azure.servicebus.exceptions.MessageAlreadySettled is message has already been settled. """ try: - if self._receiver.session: # pylint: disable=protected-access + if self._receiver.session: # type: ignore raise TypeError("Session messages cannot be renewed. Please renew the Session lock instead.") except AttributeError: pass @@ -151,5 +152,5 @@ async def renew_lock(self) -> None: # type: ignore if not token: raise ValueError("Unable to renew lock - no lock token found.") - expiry = await self._receiver._renew_locks(token) # pylint: disable=protected-access + expiry = await self._receiver._renew_locks(token) # type: ignore self._expiry = utc_from_timestamp(expiry[MGMT_RESPONSE_MESSAGE_EXPIRATION][0]/1000.0) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_base_handler_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_base_handler_async.py index f22ed2b058b15..125574319d79a 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_base_handler_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_base_handler_async.py @@ -9,7 +9,7 @@ import uamqp from uamqp.message import MessageProperties -from .._base_handler import _generate_sas_token +from .._base_handler import _generate_sas_token, _AccessToken from .._common._configuration import Configuration from .._common.utils import create_properties from .._common.constants import ( @@ -23,7 +23,7 @@ ) if TYPE_CHECKING: - from azure.core.credentials import TokenCredential + from azure.core.credentials import TokenCredential, AccessToken _LOGGER = logging.getLogger(__name__) @@ -35,12 +35,12 @@ class ServiceBusSharedKeyCredential(object): :param str key: The shared access key. """ - def __init__(self, policy: str, key: str): + def __init__(self, policy: str, key: str) -> None: self.policy = policy self.key = key self.token_type = TOKEN_TYPE_SASTOKEN - async def get_token(self, *scopes, **kwargs): # pylint:disable=unused-argument + async def get_token(self, *scopes: str, **kwargs: Any) -> _AccessToken: # pylint:disable=unused-argument if not scopes: raise ValueError("No token scope provided.") return _generate_sas_token(scopes[0], self.policy, self.key) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py index 066a82b9ea581..a6827a8ae91ae 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py @@ -2,12 +2,13 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, List, TYPE_CHECKING +import logging import uamqp from .._base_handler import _parse_conn_str -from ._base_handler_async import ServiceBusSharedKeyCredential +from ._base_handler_async import ServiceBusSharedKeyCredential, BaseHandler from ._servicebus_sender_async import ServiceBusSender from ._servicebus_receiver_async import ServiceBusReceiver from ._servicebus_session_receiver_async import ServiceBusSessionReceiver @@ -18,6 +19,8 @@ if TYPE_CHECKING: from azure.core.credentials import TokenCredential +_LOGGER = logging.getLogger(__name__) + class ServiceBusClient(object): """The ServiceBusClient class defines a high level interface for @@ -71,6 +74,7 @@ def __init__( self._auth_uri = "{}/{}".format(self._auth_uri, self._entity_name) # Internal flag for switching whether to apply connection sharing, pending fix in uamqp library self._connection_sharing = False + self._handlers = [] # type: List[BaseHandler] async def __aenter__(self): if self._connection_sharing: @@ -98,7 +102,7 @@ def from_connection_string( """ Create a ServiceBusClient from a connection string. - :param conn_str: The connection string of a Service Bus. + :param str conn_str: The connection string of a Service Bus. :keyword str entity_name: Optional entity name, this can be the name of Queue or Topic. It must be specified if the credential is for specific Queue or Topic. :keyword bool logging_enable: Whether to output network trace logs to the logger. Default is `False`. @@ -125,7 +129,7 @@ def from_connection_string( return cls( fully_qualified_namespace=host, entity_name=entity_in_conn_str or kwargs.pop("entity_name", None), - credential=ServiceBusSharedKeyCredential(policy, key), + credential=ServiceBusSharedKeyCredential(policy, key), # type: ignore **kwargs ) @@ -133,9 +137,21 @@ async def close(self): # type: () -> None """ Close down the ServiceBus client. + All spawned senders, receivers and underlying connection will be shutdown. :return: None """ + for handler in self._handlers: + try: + await handler.close() + except Exception as exception: # pylint: disable=broad-except + _LOGGER.error( + "Client has met an exception when closing the handler: %r. Exception: %r.", + handler._container_id, # pylint: disable=protected-access + exception, + ) + del self._handlers[:] + if self._connection_sharing and self._connection: await self._connection.destroy_async() @@ -159,7 +175,7 @@ def get_queue_sender(self, queue_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusSender( + handler = ServiceBusSender( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -170,6 +186,8 @@ def get_queue_sender(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_receiver(self, queue_name, **kwargs): # type: (str, Any) -> ServiceBusReceiver @@ -206,7 +224,7 @@ def get_queue_receiver(self, queue_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -217,6 +235,8 @@ def get_queue_receiver(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_deadletter_receiver(self, queue_name, **kwargs): # type: (str, Any) -> ServiceBusReceiver @@ -266,7 +286,7 @@ def get_queue_deadletter_receiver(self, queue_name, **kwargs): queue_name=queue_name, transfer_deadletter=kwargs.get('transfer_deadletter', False) ) - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, entity_name=entity_name, credential=self._credential, @@ -278,6 +298,8 @@ def get_queue_deadletter_receiver(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_topic_sender(self, topic_name, **kwargs): # type: (str, Any) -> ServiceBusSender @@ -301,7 +323,7 @@ def get_topic_sender(self, topic_name, **kwargs): :caption: Create a new instance of the ServiceBusSender from ServiceBusClient. """ - return ServiceBusSender( + handler = ServiceBusSender( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, credential=self._credential, @@ -312,6 +334,8 @@ def get_topic_sender(self, topic_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): # type: (str, str, Any) -> ServiceBusReceiver @@ -354,7 +378,7 @@ def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, subscription_name=subscription_name, @@ -366,6 +390,8 @@ def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_deadletter_receiver(self, topic_name, subscription_name, **kwargs): # type: (str, str, Any) -> ServiceBusReceiver @@ -417,7 +443,7 @@ def get_subscription_deadletter_receiver(self, topic_name, subscription_name, ** subscription_name=subscription_name, transfer_deadletter=kwargs.get('transfer_deadletter', False) ) - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, entity_name=entity_name, credential=self._credential, @@ -429,9 +455,11 @@ def get_subscription_deadletter_receiver(self, topic_name, subscription_name, ** user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_session_receiver(self, topic_name, subscription_name, session_id=None, **kwargs): - # type: (str, str, str, Any) -> ServiceBusReceiver + # type: (str, str, str, Any) -> ServiceBusSessionReceiver """Get ServiceBusReceiver for the specific subscription under the topic. :param str topic_name: The name of specific Service Bus Topic the client connects to. @@ -474,7 +502,7 @@ def get_subscription_session_receiver(self, topic_name, subscription_name, sessi """ # pylint: disable=protected-access - return ServiceBusSessionReceiver( + handler = ServiceBusSessionReceiver( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, subscription_name=subscription_name, @@ -487,6 +515,8 @@ def get_subscription_session_receiver(self, topic_name, subscription_name, sessi user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): # type: (str, str, Any) -> ServiceBusSessionReceiver @@ -526,7 +556,7 @@ def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): """ # pylint: disable=protected-access - return ServiceBusSessionReceiver( + handler = ServiceBusSessionReceiver( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -538,3 +568,5 @@ def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py index 571bcdc1610b9..da6c4b6e72e58 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py @@ -103,7 +103,7 @@ def __init__( fully_qualified_namespace: str, credential: "TokenCredential", **kwargs: Any - ): + ) -> None: self._message_iter = None # type: Optional[AsyncIterator[ReceivedMessage]] if kwargs.get("entity_name"): super(ServiceBusReceiver, self).__init__( @@ -293,6 +293,15 @@ def get_streaming_message_iter(self, max_wait_time: float = None) -> AsyncIterat timeout period, the iterator will stop. :rtype AsyncIterator[ReceivedMessage] + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_code_servicebus.py + :start-after: [START receive_forever_async] + :end-before: [END receive_forever_async] + :language: python + :dedent: 4 + :caption: Receive indefinitely from an iterator in streaming fashion. """ return self._IterContextualWrapper(self, max_wait_time) @@ -304,7 +313,7 @@ def from_connection_string( ) -> "ServiceBusReceiver": """Create a ServiceBusReceiver from a connection string. - :param conn_str: The connection string of a Service Bus. + :param str conn_str: The connection string of a Service Bus. :keyword str queue_name: The path of specific Service Bus Queue the client connects to. :keyword str topic_name: The path of specific Service Bus Topic which contains the Subscription the client connects to. @@ -338,6 +347,9 @@ def from_connection_string( within its request to the service. :rtype: ~azure.servicebus.aio.ServiceBusReceiver + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/async_samples/sample_code_servicebus_async.py @@ -437,14 +449,15 @@ async def receive_deferred_messages(self, sequence_numbers): self._populate_message_properties(message) - handler = functools.partial(mgmt_handlers.deferred_message_op, mode=self._mode, message_type=ReceivedMessage) + handler = functools.partial(mgmt_handlers.deferred_message_op, + mode=self._mode, + message_type=ReceivedMessage, + receiver=self) messages = await self._mgmt_request_response_with_retry( REQUEST_RESPONSE_RECEIVE_BY_SEQUENCE_NUMBER, message, handler ) - for m in messages: - m._receiver = self # pylint: disable=protected-access return messages async def peek_messages(self, message_count=1, sequence_number=0): diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_sender_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_sender_async.py index b82d8d754e516..347ab457e57cb 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_sender_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_sender_async.py @@ -19,7 +19,7 @@ MGMT_REQUEST_SEQUENCE_NUMBERS ) from .._common import mgmt_handlers -from .._common.utils import copy_messages_to_sendable_if_needed +from .._common.utils import transform_messages_to_sendable_if_needed from ._async_utils import create_authentication if TYPE_CHECKING: @@ -75,7 +75,7 @@ def __init__( fully_qualified_namespace: str, credential: "TokenCredential", **kwargs: Any - ): + ) -> None: if kwargs.get("entity_name"): super(ServiceBusSender, self).__init__( fully_qualified_namespace=fully_qualified_namespace, @@ -208,7 +208,7 @@ def from_connection_string( ) -> "ServiceBusSender": """Create a ServiceBusSender from a connection string. - :param conn_str: The connection string of a Service Bus. + :param str conn_str: The connection string of a Service Bus. :keyword str queue_name: The path of specific Service Bus Queue the client connects to. :keyword str topic_name: The path of specific Service Bus Topic the client connects to. :keyword bool logging_enable: Whether to output network trace logs to the logger. Default is `False`. @@ -223,6 +223,9 @@ def from_connection_string( :keyword str user_agent: If specified, this will be added in front of the built-in user agent string. :rtype: ~azure.servicebus.aio.ServiceBusSender + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/async_samples/sample_code_servicebus_async.py @@ -269,7 +272,7 @@ async def send_messages(self, message): :caption: Send message. """ - message = copy_messages_to_sendable_if_needed(message) + message = transform_messages_to_sendable_if_needed(message) try: batch = await self.create_batch() batch._from_list(message) # pylint: disable=protected-access @@ -278,6 +281,8 @@ async def send_messages(self, message): pass if isinstance(message, BatchMessage) and len(message) == 0: # pylint: disable=len-as-condition raise ValueError("A BatchMessage or list of Message must have at least one Message") + if not isinstance(message, BatchMessage) and not isinstance(message, Message): + raise TypeError("Can only send azure.servicebus. or lists of Messages.") await self._do_retryable_operation( self._send, diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_async.py index 9fe8b58c39a95..b2446d8ed4112 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_async.py @@ -73,6 +73,7 @@ async def set_session_state(self, state): :param state: The state value. :type state: str, bytes or bytearray + :rtype: None .. admonition:: Example: @@ -103,6 +104,8 @@ async def renew_lock(self): This operation can also be performed as a threaded background task by registering the session with an `azure.servicebus.aio.AutoLockRenew` instance. + :rtype: None + .. admonition:: Example: .. literalinclude:: ../samples/async_samples/sample_code_servicebus_async.py diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_receiver_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_receiver_async.py index f56336569da9d..10abb88b5bf03 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_receiver_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_receiver_async.py @@ -86,7 +86,7 @@ def __init__( fully_qualified_namespace: str, credential: "TokenCredential", **kwargs: Any - ): + ) -> None: super(ServiceBusSessionReceiver, self).__init__(fully_qualified_namespace, credential, **kwargs) self._populate_session_attributes(**kwargs) self._session = ServiceBusSession(self._session_id, self, self._config.encoding) @@ -99,7 +99,7 @@ def from_connection_string( ) -> "ServiceBusSessionReceiver": """Create a ServiceBusSessionReceiver from a connection string. - :param conn_str: The connection string of a Service Bus. + :param str conn_str: The connection string of a Service Bus. :keyword str queue_name: The path of specific Service Bus Queue the client connects to. :keyword str topic_name: The path of specific Service Bus Topic which contains the Subscription the client connects to. @@ -137,6 +137,9 @@ def from_connection_string( within its request to the service. :rtype: ~azure.servicebus.aio.ServiceBusSessionReceiver + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/async_samples/sample_code_servicebus_async.py diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py index 2712c0076987d..33aba62886545 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py @@ -130,7 +130,7 @@ async def _get_rule_element(self, topic_name, subscription_name, rule_name, **kw return element @classmethod - def from_connection_string(cls, conn_str: str, **kwargs) -> "ServiceBusManagementClient": + def from_connection_string(cls, conn_str: str, **kwargs: Any) -> "ServiceBusManagementClient": """Create a client from connection string. :param str conn_str: The connection string of the Service Bus Namespace. @@ -322,7 +322,7 @@ async def delete_queue(self, queue: Union[str, QueueProperties], **kwargs) -> No with _handle_response_error(): await self._impl.entity.delete(queue_name, api_version=constants.API_VERSION, **kwargs) - def list_queues(self, **kwargs) -> AsyncItemPaged[QueueProperties]: + def list_queues(self, **kwargs: Any) -> AsyncItemPaged[QueueProperties]: """List the queues of a ServiceBus namespace. :returns: An iterable (auto-paging) response of QueueProperties. @@ -342,7 +342,7 @@ def entry_to_qd(entry): return AsyncItemPaged( get_next, extract_data) - def list_queues_runtime_info(self, **kwargs) -> AsyncItemPaged[QueueRuntimeProperties]: + def list_queues_runtime_info(self, **kwargs: Any) -> AsyncItemPaged[QueueRuntimeProperties]: """List the runtime information of the queues in a ServiceBus namespace. :returns: An iterable (auto-paging) response of QueueRuntimeProperties. @@ -522,7 +522,7 @@ async def delete_topic(self, topic: Union[str, TopicProperties], **kwargs) -> No topic_name = topic await self._impl.entity.delete(topic_name, api_version=constants.API_VERSION, **kwargs) - def list_topics(self, **kwargs) -> AsyncItemPaged[TopicProperties]: + def list_topics(self, **kwargs: Any) -> AsyncItemPaged[TopicProperties]: """List the topics of a ServiceBus namespace. :returns: An iterable (auto-paging) response of TopicProperties. @@ -541,7 +541,7 @@ def entry_to_topic(entry): return AsyncItemPaged( get_next, extract_data) - def list_topics_runtime_info(self, **kwargs) -> AsyncItemPaged[TopicRuntimeProperties]: + def list_topics_runtime_info(self, **kwargs: Any) -> AsyncItemPaged[TopicRuntimeProperties]: """List the topics runtime information of a ServiceBus namespace. :returns: An iterable (auto-paging) response of TopicRuntimeProperties. @@ -753,7 +753,7 @@ async def delete_subscription( await self._impl.subscription.delete(topic_name, subscription_name, api_version=constants.API_VERSION, **kwargs) def list_subscriptions( - self, topic: Union[str, TopicProperties], **kwargs) -> AsyncItemPaged[SubscriptionProperties]: + self, topic: Union[str, TopicProperties], **kwargs: Any) -> AsyncItemPaged[SubscriptionProperties]: """List the subscriptions of a ServiceBus Topic. :param Union[str, ~azure.servicebus.management.TopicProperties] topic: The topic that owns the subscription. @@ -780,7 +780,7 @@ def entry_to_subscription(entry): get_next, extract_data) def list_subscriptions_runtime_info( - self, topic: Union[str, TopicProperties], **kwargs) -> AsyncItemPaged[SubscriptionRuntimeProperties]: + self, topic: Union[str, TopicProperties], **kwargs: Any) -> AsyncItemPaged[SubscriptionRuntimeProperties]: """List the subscriptions runtime information of a ServiceBus. :param Union[str, ~azure.servicebus.management.TopicProperties] topic: The topic that owns the subscription. @@ -960,7 +960,10 @@ async def delete_rule( topic_name, subscription_name, rule_name, api_version=constants.API_VERSION, **kwargs) def list_rules( - self, topic: Union[str, TopicProperties], subscription: Union[str, SubscriptionProperties], **kwargs + self, + topic: Union[str, TopicProperties], + subscription: Union[str, SubscriptionProperties], + **kwargs: Any ) -> AsyncItemPaged[RuleProperties]: """List the rules of a topic subscription. diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/exceptions.py b/sdk/servicebus/azure-servicebus/azure/servicebus/exceptions.py index e929b9e2b0622..5540709362db0 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/exceptions.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/exceptions.py @@ -4,6 +4,8 @@ # license information. # ------------------------------------------------------------------------- +from typing import Optional + from uamqp import errors, constants from ._common.constants import SESSION_LOCK_LOST, SESSION_LOCK_TIMEOUT @@ -115,7 +117,7 @@ def _create_servicebus_exception(logger, exception, handler): # pylint: disable logger.info("Unexpected error occurred (%r). Shutting down.", exception) error = exception if not isinstance(exception, ServiceBusError): - error = ServiceBusError("Handler failed: {}.".format(exception)) + error = ServiceBusError("Handler failed: {}.".format(exception), exception) try: err_condition = exception.condition @@ -158,6 +160,7 @@ class ServiceBusError(Exception): """ def __init__(self, message, inner_exception=None): + # type: (Optional[str], Optional[Exception]) -> None self.inner_exception = inner_exception super(ServiceBusError, self).__init__(message) @@ -205,6 +208,7 @@ class MessageAlreadySettled(MessageError): """ def __init__(self, action): + # type: (str) -> None message = "Unable to {} message as it has already been settled".format(action) super(MessageAlreadySettled, self).__init__(message) @@ -213,6 +217,7 @@ class MessageSettleFailed(ServiceBusError): """Attempt to settle a message failed.""" def __init__(self, action, inner_exception): + # type: (str, Exception) -> None message = "Failed to {} message. Error: {}".format(action, inner_exception) self.inner_exception = inner_exception super(MessageSettleFailed, self).__init__(message, inner_exception) @@ -222,12 +227,13 @@ class MessageSendFailed(ServiceBusError): """A message failed to send to the Service Bus entity.""" def __init__(self, inner_exception): + # type: (Exception) -> None message = "Message failed to send. Error: {}".format(inner_exception) self.condition = None self.description = None if hasattr(inner_exception, 'condition'): - self.condition = inner_exception.condition - self.description = inner_exception.description + self.condition = inner_exception.condition # type: ignore + self.description = inner_exception.description # type: ignore self.inner_exception = inner_exception super(MessageSendFailed, self).__init__(message, inner_exception) @@ -240,6 +246,7 @@ class MessageLockExpired(ServiceBusError): """ def __init__(self, message=None, inner_exception=None): + # type: (Optional[str], Optional[Exception]) -> None message = message or "Message lock expired" super(MessageLockExpired, self).__init__(message, inner_exception=inner_exception) @@ -252,6 +259,7 @@ class SessionLockExpired(ServiceBusError): """ def __init__(self, message=None, inner_exception=None): + # type: (Optional[str], Optional[Exception]) -> None message = message or "Session lock expired" super(SessionLockExpired, self).__init__(message, inner_exception=inner_exception) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_management_client.py b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_management_client.py index 56aaeed2e1117..9c326af09dd6f 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_management_client.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_management_client.py @@ -939,7 +939,7 @@ def update_rule(self, topic, subscription, rule, **kwargs): ) def delete_rule(self, topic, subscription, rule, **kwargs): - # type: (Union[str, TopicProperties], Union[str, SubscriptionProperties], Union[str, RuleProperties], Any) -> None # pylint:disable=line-too-long + # type: (Union[str,TopicProperties], Union[str,SubscriptionProperties], Union[str,RuleProperties], Any) -> None """Delete a topic subscription rule. :param Union[str, ~azure.servicebus.management.TopicProperties] topic: The topic that owns the subscription. diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_models.py b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_models.py index dc21c2e1ae13a..1bf01ae807a55 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_models.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_models.py @@ -260,7 +260,8 @@ class QueueRuntimeProperties(object): def __init__( self, ): - self._name = None + # type: () -> None + self._name = None # type: Optional[str] self._internal_qr = None # type: Optional[InternalQueueDescription] @classmethod @@ -501,7 +502,8 @@ class TopicRuntimeProperties(object): def __init__( self, ): - self._name = None + # type: () -> None + self._name = None # type: Optional[str] self._internal_td = None # type: Optional[InternalTopicDescription] @classmethod @@ -692,8 +694,9 @@ class SubscriptionRuntimeProperties(object): """ def __init__(self): + # type: () -> None self._internal_sd = None # type: Optional[InternalSubscriptionDescription] - self._name = None + self._name = None # type: Optional[str] @classmethod def _from_internal_entity(cls, name, internal_subscription): @@ -944,6 +947,7 @@ class TrueRuleFilter(SqlRuleFilter): """A sql filter with a sql expression that is always True """ def __init__(self): + # type: () -> None super(TrueRuleFilter, self).__init__("1=1", None, True) def _to_internal_entity(self): @@ -959,6 +963,7 @@ class FalseRuleFilter(SqlRuleFilter): """A sql filter with a sql expression that is always True """ def __init__(self): + # type: () -> None super(FalseRuleFilter, self).__init__("1>1", None, True) def _to_internal_entity(self): diff --git a/sdk/servicebus/azure-servicebus/samples/README.md b/sdk/servicebus/azure-servicebus/samples/README.md index 5745df3efec8f..6f28aa1b1ae0d 100644 --- a/sdk/servicebus/azure-servicebus/samples/README.md +++ b/sdk/servicebus/azure-servicebus/samples/README.md @@ -41,11 +41,16 @@ Both [sync version](./sync_samples) and [async version](./async_samples) of samp - [session_send_receive.py](./sync_samples/session_send_receive.py) ([async_version](./async_samples/session_send_receive_async.py)) - Examples to send messages to and receive messages from a session-enabled service bus queue: - Send messages to a session-enabled queue - Receive messages from session-enabled queue -- [schedule_messages_and_cancellation](./sync_samples/schedule_messages_and_cancellation.py) ([async_version](./async_samples/schedule_messages_and_cancellation_async.py)) - Examples to schedule messages and cancel scheduled message: - - Schedule a single message or multiples messages to a queue +- [schedule_messages_and_cancellation](./sync_samples/schedule_messages_and_cancellation.py) ([async_version](./async_samples/schedule_messages_and_cancellation_async.py)) - Examples to schedule messages and cancel scheduled messages on a service bus queue: + - Schedule a single message or multiple messages to a queue - Cancel scheduled messages from a queue +- [schedule_topic_messages_and_cancellation](./sync_samples/schedule_topic_messages_and_cancellation.py) ([async_version](./async_samples/schedule_topic_messages_and_cancellation_async.py)) - Examples to schedule messages and cancel scheduled messages on a service bus topic: + - Schedule a single message or multiple messages to a topic + - Cancel scheduled messages from a topic - [client_identity_authentication.py](./sync_samples/client_identity_authentication.py) ([async_version](./async_samples/client_identity_authentication_async.py)) - Examples to authenticate the client by Azure Activate Directory - Authenticate and create the client utilizing the `azure.identity` library +- [authenticate_client_connstr.py](./sync_samples/authenticate_client_connstr.py) ([async_version](./async_samples/authenticate_client_connstr_async.py)) - Examples to authenticate the client by Connection String + - Authenticate and create the client utilizing the connection string available in the Azure portal or via Azure CLI. - [proxy.py](./sync_samples/proxy.py) ([async_version](./async_samples/proxy_async.py)) - Examples to send message behind a proxy: - Send message behind a proxy - [auto_lock_renew.py](./sync_samples/auto_lock_renew.py) ([async_version](./async_samples/auto_lock_renew_async.py)) - Examples to show usage of AutoLockRenew: diff --git a/sdk/servicebus/azure-servicebus/samples/async_samples/authenticate_client_connstr_async.py b/sdk/servicebus/azure-servicebus/samples/async_samples/authenticate_client_connstr_async.py new file mode 100644 index 0000000000000..b2cb94164d19e --- /dev/null +++ b/sdk/servicebus/azure-servicebus/samples/async_samples/authenticate_client_connstr_async.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +""" +Example to show connection-string based authentication of the ServiceBusClient. + +Note: To get credentials, one can either obtain the connection string from the Azure Portal, +or use the Azure CLI snippet below to populate an environment variable with the service bus connection string. The following is in bash: + +```bash +RES_GROUP= +NAMESPACE_NAME= + +export SERVICE_BUS_CONN_STR=$(az servicebus namespace authorization-rule keys list --resource-group $RES_GROUP --namespace-name $NAMESPACE_NAME --name RootManageSharedAccessKey --query primaryConnectionString --output tsv) +``` +""" + +# pylint: disable=C0111 + +from azure.servicebus.aio import ServiceBusClient + +import os +import asyncio + +connstr = os.environ['SERVICE_BUS_CONN_STR'] + +async def run(): + async with ServiceBusClient.from_connection_string(connstr) as client: + pass # Client is now initialized and can be used. + +loop = asyncio.get_event_loop() +loop.run_until_complete(run()) diff --git a/sdk/servicebus/azure-servicebus/samples/async_samples/sample_code_servicebus_async.py b/sdk/servicebus/azure-servicebus/samples/async_samples/sample_code_servicebus_async.py index e4b9fa76d014c..cd336eb041c1a 100644 --- a/sdk/servicebus/azure-servicebus/samples/async_samples/sample_code_servicebus_async.py +++ b/sdk/servicebus/azure-servicebus/samples/async_samples/sample_code_servicebus_async.py @@ -217,6 +217,13 @@ async def example_send_and_receive_async(): await message.complete() # [END receive_async] + # [START receive_forever_async] + async with servicebus_receiver: + async for message in servicebus_receiver.get_streaming_message_iter(): + print(str(message)) + await message.complete() + # [END receive_forever_async] + # [START auto_lock_renew_message_async] from azure.servicebus.aio import AutoLockRenew diff --git a/sdk/servicebus/azure-servicebus/samples/async_samples/schedule_topic_messages_and_cancellation_async.py b/sdk/servicebus/azure-servicebus/samples/async_samples/schedule_topic_messages_and_cancellation_async.py new file mode 100644 index 0000000000000..7329d9db7e7de --- /dev/null +++ b/sdk/servicebus/azure-servicebus/samples/async_samples/schedule_topic_messages_and_cancellation_async.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +""" +Example to show scheduling messages to and cancelling messages from a Service Bus Topic asynchronously. +""" + +# pylint: disable=C0111 + +import os +import asyncio +import datetime +from azure.servicebus.aio import ServiceBusClient +from azure.servicebus import Message + +CONNECTION_STR = os.environ["SERVICE_BUS_CONNECTION_STR"] +TOPIC_NAME = os.environ["SERVICE_BUS_TOPIC_NAME"] + + +async def schedule_single_message(sender): + message = Message("Message to be scheduled") + scheduled_time_utc = datetime.datetime.utcnow() + datetime.timedelta(seconds=30) + sequence_number = await sender.schedule_messages(message, scheduled_time_utc) + return sequence_number + + +async def schedule_multiple_messages(sender): + messages_to_schedule = [] + for _ in range(10): + messages_to_schedule.append(Message("Message to be scheduled")) + + scheduled_time_utc = datetime.datetime.utcnow() + datetime.timedelta(seconds=30) + sequence_numbers = await sender.schedule_messages( + messages_to_schedule, scheduled_time_utc + ) + return sequence_numbers + + +async def main(): + servicebus_client = ServiceBusClient.from_connection_string( + conn_str=CONNECTION_STR, logging_enable=True + ) + async with servicebus_client: + sender = servicebus_client.get_topic_sender(topic_name=TOPIC_NAME) + async with sender: + sequence_number = await schedule_single_message(sender) + print( + "Single message is scheduled and sequence number is {}".format( + sequence_number + ) + ) + sequence_numbers = await schedule_multiple_messages(sender) + print( + "Multiple messages are scheduled and sequence numbers are {}".format( + sequence_numbers + ) + ) + + await sender.cancel_scheduled_messages(sequence_number) + await sender.cancel_scheduled_messages(sequence_numbers) + print("All scheduled messages are cancelled.") + + +loop = asyncio.get_event_loop() +loop.run_until_complete(main()) diff --git a/sdk/servicebus/azure-servicebus/samples/sync_samples/authenticate_client_connstr.py b/sdk/servicebus/azure-servicebus/samples/sync_samples/authenticate_client_connstr.py new file mode 100644 index 0000000000000..8d91857985d61 --- /dev/null +++ b/sdk/servicebus/azure-servicebus/samples/sync_samples/authenticate_client_connstr.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +""" +Example to show connection-string based authentication of the ServiceBusClient. + +Note: To get credentials, one can either obtain the connection string from the Azure Portal, +or use the Azure CLI snippet below to populate an environment variable with the service bus connection string. The following is in bash: + +```bash +RES_GROUP= +NAMESPACE_NAME= + +export SERVICE_BUS_CONN_STR=$(az servicebus namespace authorization-rule keys list --resource-group $RES_GROUP --namespace-name $NAMESPACE_NAME --name RootManageSharedAccessKey --query primaryConnectionString --output tsv) +``` +""" + +# pylint: disable=C0111 + +from azure.servicebus import ServiceBusClient + +import os +connstr = os.environ['SERVICE_BUS_CONN_STR'] + +with ServiceBusClient.from_connection_string(connstr) as client: + pass # Client is now initialized and can be used. + diff --git a/sdk/servicebus/azure-servicebus/samples/sync_samples/sample_code_servicebus.py b/sdk/servicebus/azure-servicebus/samples/sync_samples/sample_code_servicebus.py index 1e6393b8f288b..28626350d8355 100644 --- a/sdk/servicebus/azure-servicebus/samples/sync_samples/sample_code_servicebus.py +++ b/sdk/servicebus/azure-servicebus/samples/sync_samples/sample_code_servicebus.py @@ -258,6 +258,14 @@ def example_send_and_receive_sync(): message.abandon() # [END abandon_message] + # [START receive_forever] + with servicebus_receiver: + for message in servicebus_receiver.get_streaming_message_iter(): + print(str(message)) + message.complete() + # [END receive_forever] + + def example_receive_deferred_sync(): servicebus_sender = example_create_servicebus_sender_sync() servicebus_receiver = example_create_servicebus_receiver_sync() diff --git a/sdk/servicebus/azure-servicebus/samples/sync_samples/schedule_topic_messages_and_cancellation.py b/sdk/servicebus/azure-servicebus/samples/sync_samples/schedule_topic_messages_and_cancellation.py new file mode 100644 index 0000000000000..05c74b73df993 --- /dev/null +++ b/sdk/servicebus/azure-servicebus/samples/sync_samples/schedule_topic_messages_and_cancellation.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +""" +Example to show scheduling messages to and cancelling messages from a Service Bus Queue. +""" + +# pylint: disable=C0111 + +import os +import datetime +from azure.servicebus import ServiceBusClient, Message + +CONNECTION_STR = os.environ["SERVICE_BUS_CONNECTION_STR"] +TOPIC_NAME = os.environ["SERVICE_BUS_TOPIC_NAME"] + + +def schedule_single_message(sender): + message = Message("Message to be scheduled") + scheduled_time_utc = datetime.datetime.utcnow() + datetime.timedelta(seconds=30) + sequence_number = sender.schedule_messages(message, scheduled_time_utc) + return sequence_number + + +def schedule_multiple_messages(sender): + messages_to_schedule = [] + for _ in range(10): + messages_to_schedule.append(Message("Message to be scheduled")) + + scheduled_time_utc = datetime.datetime.utcnow() + datetime.timedelta(seconds=30) + sequence_numbers = sender.schedule_messages( + messages_to_schedule, scheduled_time_utc + ) + return sequence_numbers + + +def main(): + servicebus_client = ServiceBusClient.from_connection_string( + conn_str=CONNECTION_STR, logging_enable=True + ) + with servicebus_client: + sender = servicebus_client.get_topic_sender(topic_name=TOPIC_NAME) + with sender: + sequence_number = schedule_single_message(sender) + print( + "Single message is scheduled and sequence number is {}".format( + sequence_number + ) + ) + sequence_numbers = schedule_multiple_messages(sender) + print( + "Multiple messages are scheduled and sequence numbers are {}".format( + sequence_numbers + ) + ) + + sender.cancel_scheduled_messages(sequence_number) + sender.cancel_scheduled_messages(sequence_numbers) + print("All scheduled messages are cancelled.") + + +if __name__ == "__main__": + main() diff --git a/sdk/servicebus/azure-servicebus/setup.py b/sdk/servicebus/azure-servicebus/setup.py index 4f8f2ccfee06f..a66b6aec3de1a 100644 --- a/sdk/servicebus/azure-servicebus/setup.py +++ b/sdk/servicebus/azure-servicebus/setup.py @@ -79,7 +79,6 @@ ]), install_requires=[ 'uamqp>=1.2.10,<2.0.0', - 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', 'msrest>=0.6.17,<2.0.0', 'azure-core<2.0.0,>=1.6.0', diff --git a/sdk/servicebus/azure-servicebus/swagger/README.md b/sdk/servicebus/azure-servicebus/swagger/README.md index 541333f633ecb..dad62935f625f 100644 --- a/sdk/servicebus/azure-servicebus/swagger/README.md +++ b/sdk/servicebus/azure-servicebus/swagger/README.md @@ -2,28 +2,18 @@ > see https://aka.ms/autorest -### Setup -```ps -cd C:\work -git clone --recursive https://github.com/Azure/autorest.python.git -cd autorest.python -git checkout azure-core -npm install -``` ### Generation ```ps cd C:\Work\ServiceBus\ -autorest --use=@autorest/python@5.0.0-preview.6 +autorest --v3 --python --use=@autorest/python@5.0.0-preview.6 ``` ### Settings ``` yaml -input-file: https://raw.githubusercontent.com/YijunXieMS/azure-rest-api-specs-pr/servicebus_mgmt/specification/servicebus/data-plane/servicebus-swagger.json?token=ALQFVABEGSXQX2IEVU26V2K7AYZ4K +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/sb_dataplane_namespace/specification/servicebus/data-plane/servicebus-swagger.json output-folder: ../azure/servicebus/management/_generated namespace: azure.servicebus.management._generated no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION -enable-xml: false -vanilla: true clear-output-folder: true python: true package-version: "2017-04" diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py b/sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py index 785e12d60418b..8b09794975785 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py @@ -959,14 +959,14 @@ async def test_async_queue_schedule_message(self, servicebus_namespace_connectio async with ServiceBusClient.from_connection_string( servicebus_namespace_connection_string, logging_enable=False) as sb_client: - enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) + scheduled_enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) async with sb_client.get_queue_receiver(servicebus_queue.name) as receiver: async with sb_client.get_queue_sender(servicebus_queue.name) as sender: content = str(uuid.uuid4()) message_id = uuid.uuid4() message = Message(content) message.message_id = message_id - message.scheduled_enqueue_time_utc = enqueue_time + message.scheduled_enqueue_time_utc = scheduled_enqueue_time await sender.send_messages(message) messages = await receiver.receive_messages(max_wait_time=120) @@ -975,8 +975,8 @@ async def test_async_queue_schedule_message(self, servicebus_namespace_connectio data = str(messages[0]) assert data == content assert messages[0].message_id == message_id - assert messages[0].scheduled_enqueue_time_utc == enqueue_time - assert messages[0].scheduled_enqueue_time_utc == messages[0].enqueued_time_utc.replace(microsecond=0) + assert messages[0].scheduled_enqueue_time_utc == scheduled_enqueue_time + assert messages[0].scheduled_enqueue_time_utc <= messages[0].enqueued_time_utc.replace(microsecond=0) assert len(messages) == 1 finally: for m in messages: @@ -992,7 +992,7 @@ async def test_async_queue_schedule_message(self, servicebus_namespace_connectio async def test_async_queue_schedule_multiple_messages(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): async with ServiceBusClient.from_connection_string( servicebus_namespace_connection_string, logging_enable=False) as sb_client: - enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) + scheduled_enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) messages = [] receiver = sb_client.get_queue_receiver(servicebus_queue.name, prefetch=20) sender = sb_client.get_queue_sender(servicebus_queue.name) @@ -1007,11 +1007,12 @@ async def test_async_queue_schedule_multiple_messages(self, servicebus_namespace await sender.send_messages([message_a, message_b]) - received_messages = await receiver.receive_messages(max_batch_size=2, max_wait_time=5) - for message in received_messages: + received_messages = [] + async for message in receiver.get_streaming_message_iter(max_wait_time=5): + received_messages.append(message) await message.complete() - tokens = await sender.schedule_messages(received_messages, enqueue_time) + tokens = await sender.schedule_messages(received_messages, scheduled_enqueue_time) assert len(tokens) == 2 messages = await receiver.receive_messages(max_wait_time=120) @@ -1022,8 +1023,8 @@ async def test_async_queue_schedule_multiple_messages(self, servicebus_namespace data = str(messages[0]) assert data == content assert messages[0].message_id in (message_id_a, message_id_b) - assert messages[0].scheduled_enqueue_time_utc == enqueue_time - assert messages[0].scheduled_enqueue_time_utc == messages[0].enqueued_time_utc.replace(microsecond=0) + assert messages[0].scheduled_enqueue_time_utc == scheduled_enqueue_time + assert messages[0].scheduled_enqueue_time_utc <= messages[0].enqueued_time_utc.replace(microsecond=0) assert len(messages) == 2 finally: for m in messages: @@ -1252,7 +1253,11 @@ def message_content(): message_1st_received_cnt = 0 message_2nd_received_cnt = 0 while message_1st_received_cnt < 20 or message_2nd_received_cnt < 20: - messages = await receiver.receive_messages(max_batch_size=20, max_wait_time=5) + messages = [] + batch = await receiver.receive_messages(max_batch_size=20, max_wait_time=5) + while batch: + messages += batch + batch = await receiver.receive_messages(max_batch_size=20, max_wait_time=5) if not messages: break receive_counter += 1 @@ -1332,12 +1337,15 @@ async def test_queue_receive_keep_conn_alive_async(self, servicebus_namespace_co servicebus_namespace_connection_string, logging_enable=False) as sb_client: sender = sb_client.get_queue_sender(servicebus_queue.name) - receiver = sb_client.get_queue_receiver(servicebus_queue.name) + receiver = sb_client.get_queue_receiver(servicebus_queue.name, max_wait_time=5) async with sender, receiver: await sender.send_messages([Message("message1"), Message("message2")]) - messages = await receiver.receive_messages(max_batch_size=20, max_wait_time=5) + messages = [] + async for message in receiver: + messages.append(message) + receiver_handler = receiver._handler assert len(messages) == 2 await asyncio.sleep(4 * 60 + 5) # 240s is the service defined connection idle timeout @@ -1346,7 +1354,10 @@ async def test_queue_receive_keep_conn_alive_async(self, servicebus_namespace_co await messages[1].complete() # check receiver link operation await asyncio.sleep(60) # sleep another one minute to ensure we pass the lock_duration time - messages = await receiver.receive_messages(max_batch_size=20, max_wait_time=5) + messages = [] + async for message in receiver: + messages.append(message) + assert len(messages) == 0 # make sure messages are removed from the queue assert receiver_handler == receiver._handler # make sure no reconnection happened @@ -1376,22 +1387,53 @@ async def test_async_queue_receiver_respects_max_wait_time_overrides(self, servi async for message in receiver.get_streaming_message_iter(max_wait_time=1): messages.append(message) time_3 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=.5) < timedelta(milliseconds=(time_3 - time_2)) < timedelta(seconds=2) + assert timedelta(seconds=.5) < timedelta(milliseconds=(time_3 - time_2)) <= timedelta(seconds=2) time_4 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=8) < timedelta(milliseconds=(time_4 - time_3)) < timedelta(seconds=11) + assert timedelta(seconds=8) < timedelta(milliseconds=(time_4 - time_3)) <= timedelta(seconds=11) async for message in receiver.get_streaming_message_iter(max_wait_time=3): messages.append(message) time_5 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=1) < timedelta(milliseconds=(time_5 - time_4)) < timedelta(seconds=4) + assert timedelta(seconds=1) < timedelta(milliseconds=(time_5 - time_4)) <= timedelta(seconds=4) async for message in receiver: messages.append(message) time_6 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=3) < timedelta(milliseconds=(time_6 - time_5)) < timedelta(seconds=6) + assert timedelta(seconds=3) < timedelta(milliseconds=(time_6 - time_5)) <= timedelta(seconds=6) async for message in receiver.get_streaming_message_iter(): messages.append(message) time_7 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=3) < timedelta(milliseconds=(time_7 - time_6)) < timedelta(seconds=6) + assert timedelta(seconds=3) < timedelta(milliseconds=(time_7 - time_6)) <= timedelta(seconds=6) assert len(messages) == 1 + + @pytest.mark.liveTest + @pytest.mark.live_test_only + @CachedResourceGroupPreparer(name_prefix='servicebustest') + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + @ServiceBusQueuePreparer(name_prefix='servicebustest') + async def test_async_queue_send_twice(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): + async with ServiceBusClient.from_connection_string( + servicebus_namespace_connection_string, logging_enable=False) as sb_client: + + async with sb_client.get_queue_sender(servicebus_queue.name) as sender: + message = Message("Message") + message2 = Message("Message2") + # first test batch message resending. + batch_message = await sender.create_batch() + batch_message._from_list([message, message2]) # pylint: disable=protected-access + await sender.send_messages(batch_message) + await sender.send_messages(batch_message) + messages = [] + async with sb_client.get_queue_receiver(servicebus_queue.name, max_wait_time=5) as receiver: + async for message in receiver: + messages.append(message) + assert len(messages) == 4 + # then normal message resending + await sender.send_messages(message) + await sender.send_messages(message) + messages = [] + async with sb_client.get_queue_receiver(servicebus_queue.name, max_wait_time=5) as receiver: + async for message in receiver: + messages.append(message) + assert len(messages) == 2 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/test_sb_client_async.py b/sdk/servicebus/azure-servicebus/tests/async_tests/test_sb_client_async.py new file mode 100644 index 0000000000000..351d1fe51a99e --- /dev/null +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/test_sb_client_async.py @@ -0,0 +1,60 @@ +#-------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + + +import logging +import pytest + +from azure.servicebus.aio import ServiceBusClient +from devtools_testutils import AzureMgmtTestCase, CachedResourceGroupPreparer +from servicebus_preparer import CachedServiceBusNamespacePreparer, CachedServiceBusQueuePreparer +from utilities import get_logger + +_logger = get_logger(logging.DEBUG) + + +class ServiceBusClientAsyncTests(AzureMgmtTestCase): + @pytest.mark.liveTest + @pytest.mark.live_test_only + @CachedResourceGroupPreparer() + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + @CachedServiceBusQueuePreparer(name_prefix='servicebustest', dead_lettering_on_message_expiration=True) + async def test_async_sb_client_close_spawned_handlers(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): + client = ServiceBusClient.from_connection_string(servicebus_namespace_connection_string) + + await client.close() + + # context manager + async with client: + assert len(client._handlers) == 0 + sender = client.get_queue_sender(servicebus_queue.name) + receiver = client.get_queue_receiver(servicebus_queue.name) + await sender._open() + await receiver._open() + + assert sender._handler and sender._running + assert receiver._handler and receiver._running + assert len(client._handlers) == 2 + + assert not sender._handler and not sender._running + assert not receiver._handler and not receiver._running + assert len(client._handlers) == 0 + + # close operation + sender = client.get_queue_sender(servicebus_queue.name) + receiver = client.get_queue_receiver(servicebus_queue.name) + await sender._open() + await receiver._open() + + assert sender._handler and sender._running + assert receiver._handler and receiver._running + assert len(client._handlers) == 2 + + await client.close() + + assert not sender._handler and not sender._running + assert not receiver._handler and not receiver._running + assert len(client._handlers) == 0 diff --git a/sdk/servicebus/azure-servicebus/tests/test_queues.py b/sdk/servicebus/azure-servicebus/tests/test_queues.py index 5d1b278925545..c17e4e9b00a98 100644 --- a/sdk/servicebus/azure-servicebus/tests/test_queues.py +++ b/sdk/servicebus/azure-servicebus/tests/test_queues.py @@ -1199,14 +1199,14 @@ def test_queue_schedule_message(self, servicebus_namespace_connection_string, se with ServiceBusClient.from_connection_string( servicebus_namespace_connection_string, logging_enable=False) as sb_client: - enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) + scheduled_enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) with sb_client.get_queue_receiver(servicebus_queue.name) as receiver: with sb_client.get_queue_sender(servicebus_queue.name) as sender: content = str(uuid.uuid4()) message_id = uuid.uuid4() message = Message(content) message.message_id = message_id - message.scheduled_enqueue_time_utc = enqueue_time + message.scheduled_enqueue_time_utc = scheduled_enqueue_time sender.send_messages(message) messages = receiver.receive_messages(max_wait_time=120) @@ -1215,8 +1215,8 @@ def test_queue_schedule_message(self, servicebus_namespace_connection_string, se data = str(messages[0]) assert data == content assert messages[0].message_id == message_id - assert messages[0].scheduled_enqueue_time_utc == enqueue_time - assert messages[0].scheduled_enqueue_time_utc == messages[0].enqueued_time_utc.replace(microsecond=0) + assert messages[0].scheduled_enqueue_time_utc == scheduled_enqueue_time + assert messages[0].scheduled_enqueue_time_utc <= messages[0].enqueued_time_utc.replace(microsecond=0) assert len(messages) == 1 finally: for m in messages: @@ -1235,7 +1235,7 @@ def test_queue_schedule_multiple_messages(self, servicebus_namespace_connection_ with ServiceBusClient.from_connection_string( servicebus_namespace_connection_string, logging_enable=False) as sb_client: - enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) + scheduled_enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) sender = sb_client.get_queue_sender(servicebus_queue.name) receiver = sb_client.get_queue_receiver(servicebus_queue.name, prefetch=20) @@ -1265,7 +1265,7 @@ def test_queue_schedule_multiple_messages(self, servicebus_namespace_connection_ received_messages.append(message) message.complete() - tokens = sender.schedule_messages(received_messages, enqueue_time) + tokens = sender.schedule_messages(received_messages, scheduled_enqueue_time) assert len(tokens) == 2 messages = receiver.receive_messages(max_wait_time=120) @@ -1275,8 +1275,8 @@ def test_queue_schedule_multiple_messages(self, servicebus_namespace_connection_ data = str(messages[0]) assert data == content assert messages[0].message_id in (message_id_a, message_id_b) - assert messages[0].scheduled_enqueue_time_utc == enqueue_time - assert messages[0].scheduled_enqueue_time_utc == messages[0].enqueued_time_utc.replace(microsecond=0) + assert messages[0].scheduled_enqueue_time_utc == scheduled_enqueue_time + assert messages[0].scheduled_enqueue_time_utc <= messages[0].enqueued_time_utc.replace(microsecond=0) assert messages[0].delivery_count == 0 assert messages[0].properties assert messages[0].properties[b'key'] == b'value' @@ -1558,7 +1558,7 @@ def test_queue_message_properties(self): }, properties=uamqp.message.MessageProperties() ) - received_message = ReceivedMessage(uamqp_received_message) + received_message = ReceivedMessage(uamqp_received_message, receiver=None) assert received_message.partition_key == 'r_key' assert received_message.via_partition_key == 'r_via_key' assert received_message.scheduled_enqueue_time_utc == new_scheduled_time @@ -1619,7 +1619,9 @@ def message_content(): message_1st_received_cnt = 0 message_2nd_received_cnt = 0 while message_1st_received_cnt < 20 or message_2nd_received_cnt < 20: - messages = receiver.receive_messages(max_batch_size=20, max_wait_time=5) + messages = [] + for message in receiver.get_streaming_message_iter(max_wait_time=5): + messages.append(message) if not messages: break receive_counter += 1 @@ -1710,12 +1712,15 @@ def test_queue_receive_keep_conn_alive(self, servicebus_namespace_connection_str servicebus_namespace_connection_string, logging_enable=False) as sb_client: sender = sb_client.get_queue_sender(servicebus_queue.name) - receiver = sb_client.get_queue_receiver(servicebus_queue.name) + receiver = sb_client.get_queue_receiver(servicebus_queue.name, max_wait_time=5) with sender, receiver: sender.send_messages([Message("message1"), Message("message2")]) - messages = receiver.receive_messages(max_batch_size=20, max_wait_time=5) + messages = [] + for message in receiver: + messages.append(message) + receiver_handler = receiver._handler assert len(messages) == 2 time.sleep(4 * 60 + 5) # 240s is the service defined connection idle timeout @@ -1724,7 +1729,11 @@ def test_queue_receive_keep_conn_alive(self, servicebus_namespace_connection_str messages[1].complete() # check receiver link operation time.sleep(60) # sleep another one minute to ensure we pass the lock_duration time - messages = receiver.receive_messages(max_batch_size=20, max_wait_time=5) + + messages = [] + for message in receiver: + messages.append(message) + assert len(messages) == 0 # make sure messages are removed from the queue assert receiver_handler == receiver._handler # make sure no reconnection happened @@ -1781,22 +1790,70 @@ def test_queue_receiver_respects_max_wait_time_overrides(self, servicebus_namesp for message in receiver.get_streaming_message_iter(max_wait_time=1): messages.append(message) time_3 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=.5) < timedelta(milliseconds=(time_3 - time_2)) < timedelta(seconds=2) + assert timedelta(seconds=.5) < timedelta(milliseconds=(time_3 - time_2)) <= timedelta(seconds=2) time_4 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=8) < timedelta(milliseconds=(time_4 - time_3)) < timedelta(seconds=11) + assert timedelta(seconds=8) < timedelta(milliseconds=(time_4 - time_3)) <= timedelta(seconds=11) for message in receiver.get_streaming_message_iter(max_wait_time=3): messages.append(message) time_5 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=1) < timedelta(milliseconds=(time_5 - time_4)) < timedelta(seconds=4) + assert timedelta(seconds=1) < timedelta(milliseconds=(time_5 - time_4)) <= timedelta(seconds=4) for message in receiver: messages.append(message) time_6 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=3) < timedelta(milliseconds=(time_6 - time_5)) < timedelta(seconds=6) + assert timedelta(seconds=3) < timedelta(milliseconds=(time_6 - time_5)) <= timedelta(seconds=6) for message in receiver.get_streaming_message_iter(): messages.append(message) time_7 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=3) < timedelta(milliseconds=(time_7 - time_6)) < timedelta(seconds=6) + assert timedelta(seconds=3) < timedelta(milliseconds=(time_7 - time_6)) <= timedelta(seconds=6) assert len(messages) == 1 + + + @pytest.mark.liveTest + @pytest.mark.live_test_only + @CachedResourceGroupPreparer(name_prefix='servicebustest') + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + @ServiceBusQueuePreparer(name_prefix='servicebustest') + def test_queue_send_twice(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): + with ServiceBusClient.from_connection_string( + servicebus_namespace_connection_string, logging_enable=False) as sb_client: + + with sb_client.get_queue_sender(servicebus_queue.name) as sender: + message = Message("Message") + message2 = Message("Message2") + # first test batch message resending. + batch_message = sender.create_batch() + batch_message._from_list([message, message2]) # pylint: disable=protected-access + sender.send_messages(batch_message) + sender.send_messages(batch_message) + messages = [] + with sb_client.get_queue_receiver(servicebus_queue.name, max_wait_time=5) as receiver: + for message in receiver: + messages.append(message) + assert len(messages) == 4 + # then normal message resending + sender.send_messages(message) + sender.send_messages(message) + messages = [] + with sb_client.get_queue_receiver(servicebus_queue.name, max_wait_time=5) as receiver: + for message in receiver: + messages.append(message) + assert len(messages) == 2 + + + @pytest.mark.liveTest + @pytest.mark.live_test_only + @CachedResourceGroupPreparer(name_prefix='servicebustest') + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + @CachedServiceBusQueuePreparer(name_prefix='servicebustest') + def test_queue_receiver_invalid_mode(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): + + with ServiceBusClient.from_connection_string( + servicebus_namespace_connection_string, logging_enable=False) as sb_client: +# with pytest.raises(StopIteration): + with sb_client.get_queue_receiver(servicebus_queue.name, + max_wait_time="oij") as receiver: + + assert receiver diff --git a/sdk/servicebus/azure-servicebus/tests/test_sb_client.py b/sdk/servicebus/azure-servicebus/tests/test_sb_client.py index 8f69482f0c4f4..703c1b0a397a4 100644 --- a/sdk/servicebus/azure-servicebus/tests/test_sb_client.py +++ b/sdk/servicebus/azure-servicebus/tests/test_sb_client.py @@ -13,13 +13,14 @@ from azure.common import AzureHttpError, AzureConflictHttpError from azure.mgmt.servicebus.models import AccessRights -from azure.servicebus import ServiceBusClient, ServiceBusSharedKeyCredential +from azure.servicebus import ServiceBusClient, ServiceBusSharedKeyCredential, ServiceBusSender from azure.servicebus._common.message import Message, PeekMessage from azure.servicebus._common.constants import ReceiveSettleMode from azure.servicebus.exceptions import ( ServiceBusError, ServiceBusConnectionError, ServiceBusAuthenticationError, + ServiceBusAuthorizationError, ServiceBusResourceNotFound ) from devtools_testutils import AzureMgmtTestCase, CachedResourceGroupPreparer @@ -28,7 +29,8 @@ ServiceBusTopicPreparer, ServiceBusQueuePreparer, ServiceBusNamespaceAuthorizationRulePreparer, - ServiceBusQueueAuthorizationRulePreparer + ServiceBusQueueAuthorizationRulePreparer, + CachedServiceBusQueuePreparer ) class ServiceBusClientTests(AzureMgmtTestCase): @@ -44,7 +46,7 @@ def test_sb_client_bad_credentials(self, servicebus_namespace, servicebus_queue, credential=ServiceBusSharedKeyCredential('invalid', 'invalid'), logging_enable=False) with client: - with pytest.raises(ServiceBusError): + with pytest.raises(ServiceBusAuthenticationError): with client.get_queue_sender(servicebus_queue.name) as sender: sender.send_messages(Message("test")) @@ -87,7 +89,7 @@ def test_sb_client_readonly_credentials(self, servicebus_authorization_rule_conn with client.get_queue_receiver(servicebus_queue.name) as receiver: messages = receiver.receive_messages(max_batch_size=1, max_wait_time=1) - with pytest.raises(ServiceBusError): + with pytest.raises(ServiceBusAuthorizationError): with client.get_queue_sender(servicebus_queue.name) as sender: sender.send_messages(Message("test")) @@ -108,7 +110,7 @@ def test_sb_client_writeonly_credentials(self, servicebus_authorization_rule_con with client.get_queue_sender(servicebus_queue.name) as sender: sender.send_messages(Message("test")) - with pytest.raises(ValueError): + with pytest.raises(TypeError): sender.send_messages("cat") @pytest.mark.liveTest @@ -119,10 +121,71 @@ def test_sb_client_writeonly_credentials(self, servicebus_authorization_rule_con @ServiceBusQueuePreparer(name_prefix='servicebustest_qone', parameter_name='wrong_queue', dead_lettering_on_message_expiration=True) @ServiceBusQueuePreparer(name_prefix='servicebustest_qtwo', dead_lettering_on_message_expiration=True) @ServiceBusQueueAuthorizationRulePreparer(name_prefix='servicebustest_qtwo') - def test_sb_client_incorrect_queue_conn_str(self, servicebus_queue_authorization_rule_connection_string, wrong_queue, **kwargs): + def test_sb_client_incorrect_queue_conn_str(self, servicebus_queue_authorization_rule_connection_string, servicebus_queue, wrong_queue, **kwargs): client = ServiceBusClient.from_connection_string(servicebus_queue_authorization_rule_connection_string) with client: - with pytest.raises(ServiceBusError): + # Validate that the wrong queue with the right credentials fails. + with pytest.raises(ServiceBusAuthenticationError): with client.get_queue_sender(wrong_queue.name) as sender: sender.send_messages(Message("test")) + + # But that the correct one works. + with client.get_queue_sender(servicebus_queue.name) as sender: + sender.send_messages(Message("test")) + + # Now do the same but with direct connstr initialization. + with pytest.raises(ServiceBusAuthenticationError): + with ServiceBusSender.from_connection_string( + servicebus_queue_authorization_rule_connection_string, + queue_name=wrong_queue.name, + ) as sender: + sender.send_messages(Message("test")) + + with ServiceBusSender.from_connection_string( + servicebus_queue_authorization_rule_connection_string, + queue_name=servicebus_queue.name, + ) as sender: + sender.send_messages(Message("test")) + + @pytest.mark.liveTest + @pytest.mark.live_test_only + @CachedResourceGroupPreparer() + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + @CachedServiceBusQueuePreparer(name_prefix='servicebustest', dead_lettering_on_message_expiration=True) + def test_sb_client_close_spawned_handlers(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): + client = ServiceBusClient.from_connection_string(servicebus_namespace_connection_string) + + client.close() + + # context manager + with client: + assert len(client._handlers) == 0 + sender = client.get_queue_sender(servicebus_queue.name) + receiver = client.get_queue_receiver(servicebus_queue.name) + sender._open() + receiver._open() + + assert sender._handler and sender._running + assert receiver._handler and receiver._running + assert len(client._handlers) == 2 + + assert not sender._handler and not sender._running + assert not receiver._handler and not receiver._running + assert len(client._handlers) == 0 + + # close operation + sender = client.get_queue_sender(servicebus_queue.name) + receiver = client.get_queue_receiver(servicebus_queue.name) + sender._open() + receiver._open() + + assert sender._handler and sender._running + assert receiver._handler and receiver._running + assert len(client._handlers) == 2 + + client.close() + + assert not sender._handler and not sender._running + assert not receiver._handler and not receiver._running + assert len(client._handlers) == 0 diff --git a/sdk/servicebus/ci.yml b/sdk/servicebus/ci.yml index 29f5e55ae4ef4..47fdaf2c29a04 100644 --- a/sdk/servicebus/ci.yml +++ b/sdk/servicebus/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/servicefabric/ci.yml b/sdk/servicefabric/ci.yml index a2ccb391f94b4..8c2cee46ec5fc 100644 --- a/sdk/servicefabric/ci.yml +++ b/sdk/servicefabric/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -32,4 +31,4 @@ extends: - name: azure_mgmt_servicefabric safeName: azuremgmtservicefabric - name: azure_servicefabric - safeName: azureservicefabric \ No newline at end of file + safeName: azureservicefabric diff --git a/sdk/signalr/ci.yml b/sdk/signalr/ci.yml index 18a2e32044e87..368bdd2aca14d 100644 --- a/sdk/signalr/ci.yml +++ b/sdk/signalr/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: signalr Artifacts: - name: azure_mgmt_signalr - safeName: azuremgmtsignalr \ No newline at end of file + safeName: azuremgmtsignalr diff --git a/sdk/sql/ci.yml b/sdk/sql/ci.yml index 54ed8c35a6db6..5bd82121cf211 100644 --- a/sdk/sql/ci.yml +++ b/sdk/sql/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -32,4 +31,4 @@ extends: - name: azure_mgmt_sql safeName: azuremgmtsql - name: azure_mgmt_sqlvirtualmachine - safeName: azuremgmtsqlvirtualmachine \ No newline at end of file + safeName: azuremgmtsqlvirtualmachine diff --git a/sdk/storage/azure-storage-blob-changefeed/README.md b/sdk/storage/azure-storage-blob-changefeed/README.md index 4136ad3415ec8..001b118d4c9bd 100644 --- a/sdk/storage/azure-storage-blob-changefeed/README.md +++ b/sdk/storage/azure-storage-blob-changefeed/README.md @@ -11,7 +11,7 @@ This preview package for Python enables users to get blob change feed events. Th ### Prerequisites * Python 2.7, or 3.5 or later is required to use this package. * You must have an [Azure subscription](https://azure.microsoft.com/free/) and an -[Azure storage account](https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-quickstart-create-account) to use this package. +[Azure storage account](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account) to use this package. ### Install the package Install the Azure Storage Blob ChangeFeed client library for Python with [pip](https://pypi.org/project/pip/): @@ -36,9 +36,9 @@ az storage account create -n my-storage-account-name -g my-resource-group ``` To enable changefeed you can use: -[Azure Portal](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed?tabs=azure-portal#enable-and-disable-the-change-feed) -[Azure PowerShell](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed?tabs=azure-powershell#enable-and-disable-the-change-feed) -or [Template](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed?tabs=template#enable-and-disable-the-change-feed) +[Azure Portal](https://docs.microsoft.com/azure/storage/blobs/storage-blob-change-feed?tabs=azure-portal#enable-and-disable-the-change-feed) +[Azure PowerShell](https://docs.microsoft.com/azure/storage/blobs/storage-blob-change-feed?tabs=azure-powershell#enable-and-disable-the-change-feed) +or [Template](https://docs.microsoft.com/azure/storage/blobs/storage-blob-change-feed?tabs=template#enable-and-disable-the-change-feed) ### Authenticate the client diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py index ad499522c6c25..883f5a5aa7b4b 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py @@ -44,7 +44,7 @@ get_api_version, serialize_blob_tags_header, serialize_blob_tags, - serialize_query_format + serialize_query_format, get_access_conditions ) from ._deserialize import get_page_ranges_result, deserialize_blob_properties, deserialize_blob_stream, parse_tags from ._quick_query_helper import BlobQueryReader @@ -57,6 +57,7 @@ from ._lease import BlobLeaseClient, get_access_conditions from azure.core.exceptions import ResourceNotFoundError + if TYPE_CHECKING: from datetime import datetime from ._generated.models import BlockList @@ -178,6 +179,17 @@ def _format_url(self, hostname): quote(self.blob_name, safe='~/'), self._query_str) + def _encode_source_url(self, source_url): + parsed_source_url = urlparse(source_url) + source_scheme = parsed_source_url.scheme + source_hostname = parsed_source_url.netloc.rstrip('/') + source_path = unquote(parsed_source_url.path) + source_query = parsed_source_url.query + result = ["{}://{}{}".format(source_scheme, source_hostname, quote(source_path, safe='~/'))] + if source_query: + result.append(source_query) + return '?'.join(result) + @classmethod def from_blob_url(cls, blob_url, credential=None, snapshot=None, **kwargs): # type: (str, Optional[Any], Optional[Union[str, Dict[str, Any]]], Any) -> BlobClient @@ -1731,7 +1743,7 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, :caption: Copy a blob from a URL. """ options = self._start_copy_from_url_options( - source_url, + source_url=self._encode_source_url(source_url), metadata=metadata, incremental_copy=incremental_copy, **kwargs) @@ -2095,7 +2107,7 @@ def stage_block_from_url( """ options = self._stage_block_from_url_options( block_id, - source_url, + source_url=self._encode_source_url(source_url), source_offset=source_offset, source_length=source_length, source_content_md5=source_content_md5, @@ -3071,7 +3083,7 @@ def upload_pages_from_url(self, source_url, # type: str The timeout parameter is expressed in seconds. """ options = self._upload_pages_from_url_options( - source_url=source_url, + source_url=self._encode_source_url(source_url), offset=offset, length=length, source_offset=source_offset, @@ -3482,7 +3494,7 @@ def append_block_from_url(self, copy_source_url, # type: str The timeout parameter is expressed in seconds. """ options = self._append_block_from_url_options( - copy_source_url, + copy_source_url=self._encode_source_url(copy_source_url), source_offset=source_offset, source_length=source_length, **kwargs diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py index d771d19ccfcb7..575611c4e7a97 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py @@ -36,13 +36,13 @@ StorageErrorException, SignedIdentifier) from ._deserialize import deserialize_container_properties -from ._serialize import get_modify_conditions, get_container_cpk_scope_info, get_api_version +from ._serialize import get_modify_conditions, get_container_cpk_scope_info, get_api_version, get_access_conditions from ._models import ( # pylint: disable=unused-import ContainerProperties, BlobProperties, BlobType) from ._list_blobs_helper import BlobPrefix, BlobPropertiesPaged -from ._lease import BlobLeaseClient, get_access_conditions +from ._lease import BlobLeaseClient from ._blob_client import BlobClient if TYPE_CHECKING: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_lease.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_lease.py index 7d384233c221d..6180d7851aae7 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_lease.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_lease.py @@ -7,32 +7,22 @@ import uuid from typing import ( # pylint: disable=unused-import - Union, Optional, Any, IO, Iterable, AnyStr, Dict, List, Tuple, - TypeVar, TYPE_CHECKING + Union, Optional, Any, TypeVar, TYPE_CHECKING ) from azure.core.tracing.decorator import distributed_trace from ._shared.response_handlers import return_response_headers, process_storage_error -from ._generated.models import StorageErrorException, LeaseAccessConditions +from ._generated.models import StorageErrorException from ._serialize import get_modify_conditions if TYPE_CHECKING: from datetime import datetime - from ._generated.operations import BlobOperations, ContainerOperations + BlobClient = TypeVar("BlobClient") ContainerClient = TypeVar("ContainerClient") -def get_access_conditions(lease): - # type: (Optional[Union[BlobLeaseClient, str]]) -> Union[LeaseAccessConditions, None] - try: - lease_id = lease.id # type: ignore - except AttributeError: - lease_id = lease # type: ignore - return LeaseAccessConditions(lease_id=lease_id) if lease_id else None - - class BlobLeaseClient(object): """Creates a new BlobLeaseClient. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py index 6781096700b53..1b4ee9f4608d8 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py @@ -26,7 +26,7 @@ JsonTextConfiguration, QueryFormatType, BlobTag, - BlobTags + BlobTags, LeaseAccessConditions ) @@ -63,6 +63,15 @@ def _get_match_headers(kwargs, match_param, etag_param): return if_match, if_none_match +def get_access_conditions(lease): + # type: (Optional[Union[BlobLeaseClient, str]]) -> Union[LeaseAccessConditions, None] + try: + lease_id = lease.id # type: ignore + except AttributeError: + lease_id = lease # type: ignore + return LeaseAccessConditions(lease_id=lease_id) if lease_id else None + + def get_modify_conditions(kwargs): # type: (Dict[str, Any]) -> ModifiedAccessConditions if_match, if_none_match = _get_match_headers(kwargs, 'match_condition', 'etag') diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/authentication.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/authentication.py index b11dc57578087..d04c1e4fb539e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/authentication.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/authentication.py @@ -79,7 +79,9 @@ def _get_canonicalized_resource(self, request): uri_path = urlparse(request.http_request.url).path try: if isinstance(request.context.transport, AioHttpTransport) or \ - isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport): + isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport) or \ + isinstance(getattr(getattr(request.context.transport, "_transport", None), "_transport", None), + AioHttpTransport): uri_path = URL(uri_path) return '/' + self.account_name + str(uri_path) except TypeError: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py index b5a972a81d700..a5ef0d0e82ef6 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py @@ -16,7 +16,7 @@ from .._shared.policies_async import ExponentialRetry from .._shared.response_handlers import return_response_headers, process_storage_error from .._deserialize import get_page_ranges_result, parse_tags -from .._serialize import get_modify_conditions, get_api_version +from .._serialize import get_modify_conditions, get_api_version, get_access_conditions from .._generated import VERSION from .._generated.aio import AzureBlobStorage from .._generated.models import StorageErrorException, CpkInfo @@ -27,7 +27,6 @@ upload_append_blob, upload_page_blob) from .._models import BlobType, BlobBlock, BlobProperties -from .._lease import get_access_conditions from ._lease_async import BlobLeaseClient from ._download_async import StorageStreamDownloader from azure.core.exceptions import ResourceNotFoundError @@ -1065,7 +1064,7 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy= :caption: Copy a blob from a URL. """ options = self._start_copy_from_url_options( - source_url, + source_url=self._encode_source_url(source_url), metadata=metadata, incremental_copy=incremental_copy, **kwargs) @@ -1315,7 +1314,7 @@ async def stage_block_from_url( """ options = self._stage_block_from_url_options( block_id, - source_url, + source_url=self._encode_source_url(source_url), source_offset=source_offset, source_length=source_length, source_content_md5=source_content_md5, @@ -2019,7 +2018,7 @@ async def upload_pages_from_url(self, source_url, # type: str """ options = self._upload_pages_from_url_options( - source_url=source_url, + source_url=self._encode_source_url(source_url), offset=offset, length=length, source_offset=source_offset, @@ -2278,7 +2277,7 @@ async def append_block_from_url(self, copy_source_url, # type: str The timeout parameter is expressed in seconds. """ options = self._append_block_from_url_options( - copy_source_url, + copy_source_url=self._encode_source_url(copy_source_url), source_offset=source_offset, source_length=source_length, **kwargs diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_container_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_container_client_async.py index 6217e9958478d..0554fc6614597 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_container_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_container_client_async.py @@ -30,9 +30,8 @@ StorageErrorException, SignedIdentifier) from .._deserialize import deserialize_container_properties -from .._serialize import get_modify_conditions, get_container_cpk_scope_info, get_api_version +from .._serialize import get_modify_conditions, get_container_cpk_scope_info, get_api_version, get_access_conditions from .._container_client import ContainerClient as ContainerClientBase, _get_blob_name -from .._lease import get_access_conditions from .._models import ContainerProperties, BlobType, BlobProperties # pylint: disable=unused-import from ._list_blobs_helper import BlobPropertiesPaged, BlobPrefix from ._lease_async import BlobLeaseClient diff --git a/sdk/storage/azure-storage-blob/setup.py b/sdk/storage/azure-storage-blob/setup.py index ded5aa613c250..3dc365826ce4e 100644 --- a/sdk/storage/azure-storage-blob/setup.py +++ b/sdk/storage/azure-storage-blob/setup.py @@ -71,7 +71,7 @@ author_email='ascl@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob', classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_copy_blob_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_copy_blob_async.yaml new file mode 100644 index 0000000000000..27e1606ea2523 --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_copy_blob_async.yaml @@ -0,0 +1,134 @@ +interactions: +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 05:19:30 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer70e51129?restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 05:19:30 GMT + etag: '"0x8D8497F9C8C44A7"' + last-modified: Wed, 26 Aug 2020 05:19:30 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer70e51129?restype=container +- request: + body: null + headers: + Content-Length: + - '0' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Wed, 26 Aug 2020 05:19:31 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer70e51129/blob70e51129 + response: + body: + string: '' + headers: + content-length: '0' + content-md5: 1B2M2Y8AsgTpgAmY7PhCfg== + date: Wed, 26 Aug 2020 05:19:31 GMT + etag: '"0x8D8497F9CAD5065"' + last-modified: Wed, 26 Aug 2020 05:19:31 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: AAAAAAAAAAA= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T05:19:31.1203429Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer70e51129/blob70e51129 +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Wed, 26 Aug 2020 05:19:31 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer70e51129/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob70e51129 + response: + body: + string: '' + headers: + content-length: '0' + content-md5: IhmUBAsUKUvff7wSjmZjPA== + date: Wed, 26 Aug 2020 05:19:31 GMT + etag: '"0x8D8497F9CC0DC00"' + last-modified: Wed, 26 Aug 2020 05:19:31 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: ERTjv26IbjE= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T05:19:31.2484352Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer70e51129/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob70e51129 +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainer70e51129/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob70e51129?se=2020-08-26T06%3A19%3A31Z&sp=rt&sv=2019-12-12&sr=b&sig=5VNeVcGYJjpvt4L69m5afdCQ88Mq/DBf8zwPuuaqego%3D + x-ms-date: + - Wed, 26 Aug 2020 05:19:31 GMT + x-ms-requires-sync: + - 'True' + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer70e51129/blob70e51129 + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 05:19:31 GMT + etag: '"0x8D8497F9CF32F7E"' + last-modified: Wed, 26 Aug 2020 05:19:31 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: ERTjv26IbjE= + x-ms-copy-id: 5715bd25-f3ce-4c0b-a7a8-c8a687ee1131 + x-ms-copy-status: success + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T05:19:31.5836748Z' + status: + code: 202 + message: Accepted + url: https://tamerdevtest.blob.core.windows.net/utcontainer70e51129/blob70e51129 +version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_from_url_and_commit.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_from_url_and_commit.yaml new file mode 100644 index 0000000000000..4251c50562adb --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_from_url_and_commit.yaml @@ -0,0 +1,257 @@ +interactions: +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 15:45:04 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5?restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 15:45:03 GMT + etag: '"0x8D849D70012873C"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5?restype=container +- request: + body: null + headers: + Content-Length: + - '0' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Wed, 26 Aug 2020 15:45:04 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5 + response: + body: + string: '' + headers: + content-length: '0' + content-md5: 1B2M2Y8AsgTpgAmY7PhCfg== + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D7002B2AD7"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: AAAAAAAAAAA= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T15:45:04.2560494Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5 +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Wed, 26 Aug 2020 15:45:04 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob8d1b16f5 + response: + body: + string: '' + headers: + content-length: '0' + content-md5: IhmUBAsUKUvff7wSjmZjPA== + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D7003F0493"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: ERTjv26IbjE= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T15:45:04.3851411Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob8d1b16f5 +- request: + body: null + headers: + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob8d1b16f5?se=2020-08-26T16%3A45%3A04Z&sp=rt&sv=2019-12-12&sr=b&sig=nSFk0qXAMw7AFRBRwYhbJ2H6BV0FEqppjDwCQhE2Wyc%3D + x-ms-date: + - Wed, 26 Aug 2020 15:45:04 GMT + x-ms-source-range: + - bytes=0-4095 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blockid=MQ%3D%3D&comp=block + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: Ep3PX5ZZvPI= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blockid=MQ%3D%3D&comp=block +- request: + body: null + headers: + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob8d1b16f5?se=2020-08-26T16%3A45%3A04Z&sp=rt&sv=2019-12-12&sr=b&sig=nSFk0qXAMw7AFRBRwYhbJ2H6BV0FEqppjDwCQhE2Wyc%3D + x-ms-date: + - Wed, 26 Aug 2020 15:45:05 GMT + x-ms-source-range: + - bytes=4096-8191 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blockid=Mg%3D%3D&comp=block + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: Ep3PX5ZZvPI= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blockid=Mg%3D%3D&comp=block +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 15:45:05 GMT + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blocklisttype=all&comp=blocklist + response: + body: + string: "\uFEFFMQ==4096Mg==4096" + headers: + content-type: application/xml + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D7002B2AD7"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-blob-content-length: '0' + x-ms-version: '2019-12-12' + status: + code: 200 + message: OK + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blocklisttype=all&comp=blocklist +- request: + body: ' + + MQ==Mg==' + headers: + Content-Length: + - '104' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 15:45:05 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?comp=blocklist + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D700843076"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: jBoHqXt/R3g= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T15:45:04.8394630Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?comp=blocklist +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 15:45:05 GMT + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blocklisttype=all&comp=blocklist + response: + body: + string: "\uFEFFMQ==4096Mg==4096" + headers: + content-type: application/xml + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D700843076"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-blob-content-length: '8192' + x-ms-version: '2019-12-12' + status: + code: 200 + message: OK + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blocklisttype=all&comp=blocklist +version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_copy_blob_sync.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_copy_blob_sync.yaml index 63296199260f4..5570d1f0e420a 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_copy_blob_sync.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_copy_blob_sync.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:20 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainera9621281?restype=container response: @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:26 GMT + - Sat, 22 Aug 2020 22:33:18 GMT etag: - - '"0x8D7597B395B9E6A"' + - '"0x8D846EB5EEB248E"' last-modified: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -53,13 +53,13 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:21 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainera9621281/srcbloba9621281 response: @@ -71,11 +71,11 @@ interactions: content-md5: - IhmUBAsUKUvff7wSjmZjPA== date: - - Fri, 25 Oct 2019 18:43:26 GMT + - Sat, 22 Aug 2020 22:33:19 GMT etag: - - '"0x8D7597B3964F641"' + - '"0x8D846EB5EFF16BC"' last-modified: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,10 +83,184 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:19.7959868Z' status: code: 201 message: Created +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Sat, 22 Aug 2020 22:33:21 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainera9621281/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86bloba9621281 + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IhmUBAsUKUvff7wSjmZjPA== + date: + - Sat, 22 Aug 2020 22:33:19 GMT + etag: + - '"0x8D846EB5F1365B4"' + last-modified: + - Sat, 22 Aug 2020 22:33:19 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - ERTjv26IbjE= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:19.9290804Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainera9621281/srcbloba9621281?se=2020-08-22T23%3A33%3A21Z&sp=rt&sv=2019-12-12&sr=b&sig=yWlDAXwjK/kWC3IkFPDe8%2BNXNE7sXLcUUpmLNCeAN2k%3D + x-ms-date: + - Sat, 22 Aug 2020 22:33:21 GMT + x-ms-requires-sync: + - 'True' + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainera9621281/destbloba9621281 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 22:33:19 GMT + etag: + - '"0x8D846EB5F40A70B"' + last-modified: + - Sat, 22 Aug 2020 22:33:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - ERTjv26IbjE= + x-ms-copy-id: + - b3d72599-0236-4c0b-bc8e-afc5adfd7898 + x-ms-copy-status: + - success + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:20.2282924Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 22:33:21 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainera9621281/destbloba9621281 + response: + body: + string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + accept-ranges: + - bytes + content-length: + - '8192' + content-range: + - bytes 0-8191/8192 + content-type: + - application/octet-stream + date: + - Sat, 22 Aug 2020 22:33:19 GMT + etag: + - '"0x8D846EB5F40A70B"' + last-modified: + - Sat, 22 Aug 2020 22:33:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - IhmUBAsUKUvff7wSjmZjPA== + x-ms-blob-type: + - BlockBlob + x-ms-copy-completion-time: + - Sat, 22 Aug 2020 22:33:20 GMT + x-ms-copy-id: + - b3d72599-0236-4c0b-bc8e-afc5adfd7898 + x-ms-copy-progress: + - 8192/8192 + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainera9621281/srcbloba9621281?se=2020-08-22T23%3A33%3A21Z&sp=rt&sv=2019-12-12&sr=b + x-ms-copy-status: + - success + x-ms-creation-time: + - Sat, 22 Aug 2020 22:33:20 GMT + x-ms-is-current-version: + - 'true' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:20.2282924Z' + status: + code: 206 + message: Partial Content - request: body: null headers: @@ -99,15 +273,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragec3mt3efpmwli.blob.core.windows.net/utcontainera9621281/srcbloba9621281?se=2019-10-25T19%3A43%3A27Z&sp=r&sv=2019-02-02&sr=b&sig=hlXcN9dWXC0HvyNSVzABnGDxS02q%2BU7xUe7mFnWjc3U%3D + - https://tamerdevtest.blob.core.windows.net/utcontainera9621281/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86bloba9621281?se=2020-08-22T23%3A33%3A21Z&sp=rt&sv=2019-12-12&sr=b&sig=OkT%2B1FCMdpMN4pAmakFfgc2%2BEWqGzU0fWrl/042SV1M%3D x-ms-date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:21 GMT x-ms-requires-sync: - 'True' x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainera9621281/destbloba9621281 response: @@ -117,21 +291,23 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:19 GMT etag: - - '"0x8D7597B39D2239C"' + - '"0x8D846EB5F69E15C"' last-modified: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: - ERTjv26IbjE= x-ms-copy-id: - - b2f119a9-b94c-4f34-99d7-1101698efbd1 + - c9d62e9a-69f0-48f6-8c38-4fb834db20ab x-ms-copy-status: - success x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:20.4974819Z' status: code: 202 message: Accepted @@ -145,13 +321,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:21 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainera9621281/destbloba9621281 response: @@ -167,11 +343,11 @@ interactions: content-type: - application/octet-stream date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:19 GMT etag: - - '"0x8D7597B39D2239C"' + - '"0x8D846EB5F69E15C"' last-modified: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -179,17 +355,19 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-copy-completion-time: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:20 GMT x-ms-copy-id: - - b2f119a9-b94c-4f34-99d7-1101698efbd1 + - c9d62e9a-69f0-48f6-8c38-4fb834db20ab x-ms-copy-progress: - 8192/8192 x-ms-copy-source: - - https://pyacrstoragec3mt3efpmwli.blob.core.windows.net/utcontainera9621281/srcbloba9621281?se=2019-10-25T19%3A43%3A27Z&sp=r&sv=2019-02-02&sr=b&sig=hlXcN9dWXC0HvyNSVzABnGDxS02q%2BU7xUe7mFnWjc3U%3D + - https://tamerdevtest.blob.core.windows.net/utcontainera9621281/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86bloba9621281?se=2020-08-22T23%3A33%3A21Z&sp=rt&sv=2019-12-12&sr=b x-ms-copy-status: - success x-ms-creation-time: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:20 GMT + x-ms-is-current-version: + - 'true' x-ms-lease-state: - available x-ms-lease-status: @@ -197,7 +375,9 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:20.4974819Z' status: code: 206 message: Partial Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_put_block_from_url_and_commit.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_put_block_from_url_and_commit.yaml index 774bdc43f5320..76ec6ad22df03 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_put_block_from_url_and_commit.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_put_block_from_url_and_commit.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:22 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae?restype=container response: @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:05:21 GMT etag: - - '"0x8D7597B39FF894F"' + - '"0x8D846E776FF3690"' last-modified: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:22 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -53,13 +53,13 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:23 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae response: @@ -71,11 +71,11 @@ interactions: content-md5: - IhmUBAsUKUvff7wSjmZjPA== date: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:21 GMT etag: - - '"0x8D7597B3A468BD1"' + - '"0x8D846E77716AEDE"' last-modified: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:22 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,61 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:05:22.2290142Z' + status: + code: 201 + message: Created +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Sat, 22 Aug 2020 22:05:23 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blobf05f18ae + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IhmUBAsUKUvff7wSjmZjPA== + date: + - Sat, 22 Aug 2020 22:05:21 GMT + etag: + - '"0x8D846E7772E80FB"' + last-modified: + - Sat, 22 Aug 2020 22:05:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - ERTjv26IbjE= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:05:22.3861261Z' status: code: 201 message: Created @@ -99,15 +153,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragec3mt3efpmwli.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae?se=2019-10-25T19%3A43%3A29Z&sp=r&sv=2019-02-02&sr=b&sig=pmp7GJORAWc/qr7iDlbbXynQb32xBuXKE4JR6pYy7xk%3D + - https://tamerdevtest.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae?se=2020-08-22T23%3A05%3A23Z&sp=rt&sv=2019-12-12&sr=b&sig=ur2OzABfFKhLGRRFnrkIkZzptQwkVuRUMewNriXJw5I%3D x-ms-date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:05:32 GMT x-ms-source-range: - bytes=0-4095 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blockid=MQ%3D%3D&comp=block response: @@ -117,7 +171,7 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:05:30 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -125,7 +179,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -141,15 +195,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragec3mt3efpmwli.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae?se=2019-10-25T19%3A43%3A29Z&sp=r&sv=2019-02-02&sr=b&sig=pmp7GJORAWc/qr7iDlbbXynQb32xBuXKE4JR6pYy7xk%3D + - https://tamerdevtest.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae?se=2020-08-22T23%3A05%3A23Z&sp=rt&sv=2019-12-12&sr=b&sig=ur2OzABfFKhLGRRFnrkIkZzptQwkVuRUMewNriXJw5I%3D x-ms-date: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:14 GMT x-ms-source-range: - bytes=4096-8191 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blockid=Mg%3D%3D&comp=block response: @@ -159,7 +213,7 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:06:12 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -167,7 +221,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -181,11 +235,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:14 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blocklisttype=all&comp=blocklist response: @@ -196,13 +250,13 @@ interactions: content-type: - application/xml date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:06:12 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 200 message: OK @@ -222,11 +276,11 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:14 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?comp=blocklist response: @@ -236,11 +290,11 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:06:12 GMT etag: - - '"0x8D7597B3AF1E953"' + - '"0x8D846E795A2164F"' last-modified: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:13 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -248,7 +302,239 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:06:13.4742607Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 22:06:14 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae + response: + body: + string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + accept-ranges: + - bytes + content-length: + - '8192' + content-range: + - bytes 0-8191/8192 + content-type: + - application/octet-stream + date: + - Sat, 22 Aug 2020 22:06:13 GMT + etag: + - '"0x8D846E795A2164F"' + last-modified: + - Sat, 22 Aug 2020 22:06:13 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Sat, 22 Aug 2020 22:06:13 GMT + x-ms-is-current-version: + - 'true' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:06:13.4742607Z' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainerf05f18ae/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blobf05f18ae?se=2020-08-22T23%3A05%3A23Z&sp=rt&sv=2019-12-12&sr=b&sig=33UzXINjfLjuvsT/X5TQwCuruo1DR8xasVf49CrKU7w%3D + x-ms-date: + - Sat, 22 Aug 2020 22:06:47 GMT + x-ms-source-range: + - bytes=0-4095 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blockid=Mw%3D%3D&comp=block + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 22:06:45 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - Ep3PX5ZZvPI= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainerf05f18ae/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blobf05f18ae?se=2020-08-22T23%3A05%3A23Z&sp=rt&sv=2019-12-12&sr=b&sig=33UzXINjfLjuvsT/X5TQwCuruo1DR8xasVf49CrKU7w%3D + x-ms-date: + - Sat, 22 Aug 2020 22:06:48 GMT + x-ms-source-range: + - bytes=4096-8191 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blockid=NA%3D%3D&comp=block + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 22:06:46 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - Ep3PX5ZZvPI= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 22:06:48 GMT + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blocklisttype=all&comp=blocklist + response: + body: + string: "\uFEFFMQ==4096Mg==4096Mw==4096NA==4096" + headers: + content-type: + - application/xml + date: + - Sat, 22 Aug 2020 22:06:46 GMT + etag: + - '"0x8D846E795A2164F"' + last-modified: + - Sat, 22 Aug 2020 22:06:13 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-blob-content-length: + - '8192' + x-ms-version: + - '2019-12-12' + status: + code: 200 + message: OK +- request: + body: ' + + Mw==NA==' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '104' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 22:06:48 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?comp=blocklist + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 22:06:46 GMT + etag: + - '"0x8D846E7A9F30FF1"' + last-modified: + - Sat, 22 Aug 2020 22:06:47 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - NtnF99lsyrs= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:06:47.5603713Z' status: code: 201 message: Created @@ -262,13 +548,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:48 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae response: @@ -284,17 +570,19 @@ interactions: content-type: - application/octet-stream date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:06:47 GMT etag: - - '"0x8D7597B3AF1E953"' + - '"0x8D846E7A9F30FF1"' last-modified: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:47 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:47 GMT + x-ms-is-current-version: + - 'true' x-ms-lease-state: - available x-ms-lease-status: @@ -302,7 +590,9 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:06:47.5603713Z' status: code: 206 message: Partial Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_create_blob_with_equal_sign.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_create_blob_with_equal_sign.yaml new file mode 100644 index 0000000000000..67ecf96393b51 --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_create_blob_with_equal_sign.yaml @@ -0,0 +1,104 @@ +interactions: +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 01:48:41 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer775c1685?timeout=5&restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 27 Aug 2020 01:48:40 GMT + etag: '"0x8D84A2B5357BF80"' + last-modified: Thu, 27 Aug 2020 01:48:41 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://emilyeuap.blob.core.windows.net/utcontainer775c1685?timeout=5&restype=container +- request: + body: ??? + headers: + Content-Length: + - '3' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Thu, 27 Aug 2020 01:48:41 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer775c1685/=ques=tion! + response: + body: + string: '' + headers: + content-length: '0' + content-md5: DRsIw0hYkhvHxmKyKKy3ug== + date: Thu, 27 Aug 2020 01:48:40 GMT + etag: '"0x8D84A2B536556A6"' + last-modified: Thu, 27 Aug 2020 01:48:41 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: VtoDJyOMw/A= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-27T01:48:41.6124582Z' + status: + code: 201 + message: Created + url: https://emilyeuap.blob.core.windows.net/utcontainer775c1685/=ques=tion! +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 01:48:41 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer775c1685/=ques=tion! + response: + body: + string: ??? + headers: + accept-ranges: bytes + content-length: '3' + content-range: bytes 0-2/3 + content-type: application/octet-stream + date: Thu, 27 Aug 2020 01:48:41 GMT + etag: '"0x8D84A2B536556A6"' + last-modified: Thu, 27 Aug 2020 01:48:41 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: DRsIw0hYkhvHxmKyKKy3ug== + x-ms-blob-type: BlockBlob + x-ms-creation-time: Thu, 27 Aug 2020 01:48:41 GMT + x-ms-is-current-version: 'true' + x-ms-lease-state: available + x-ms-lease-status: unlocked + x-ms-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-27T01:48:41.6124582Z' + status: + code: 206 + message: Partial Content + url: https://emilyeuap.blob.core.windows.net/utcontainer775c1685/=ques=tion! +version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_list_blobs_with_include_copy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_list_blobs_with_include_copy.yaml index 72f457ba12470..8cc086e135fef 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_list_blobs_with_include_copy.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_list_blobs_with_include_copy.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 17:59:37 GMT + - Wed, 02 Sep 2020 21:55:35 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/containere54813d5?restype=container response: @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 17:59:36 GMT + - Wed, 02 Sep 2020 21:55:35 GMT etag: - - '"0x8D75975197B6CE2"' + - '"0x8D84F8AEC32E712"' last-modified: - - Fri, 25 Oct 2019 17:59:36 GMT + - Wed, 02 Sep 2020 21:55:35 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -53,15 +53,15 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 25 Oct 2019 17:59:37 GMT + - Wed, 02 Sep 2020 21:55:36 GMT x-ms-meta-status: - original x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/containere54813d5/blob1 response: @@ -73,11 +73,11 @@ interactions: content-md5: - XrY7u+Ae7tCTyyK7j1rNww== date: - - Fri, 25 Oct 2019 17:59:36 GMT + - Wed, 02 Sep 2020 21:55:35 GMT etag: - - '"0x8D759751984C5A7"' + - '"0x8D84F8AEC5020DC"' last-modified: - - Fri, 25 Oct 2019 17:59:37 GMT + - Wed, 02 Sep 2020 21:55:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -85,7 +85,9 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-09-02T21:55:36.1680604Z' status: code: 201 message: Created @@ -101,15 +103,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragegaji2d3zddo3.blob.core.windows.net/containere54813d5/blob1 + - https://tamerdevtest.blob.core.windows.net/containere54813d5/blob1 x-ms-date: - - Fri, 25 Oct 2019 17:59:37 GMT + - Wed, 02 Sep 2020 21:55:36 GMT x-ms-meta-status: - copy x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/containere54813d5/blob1copy response: @@ -119,19 +121,21 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 17:59:36 GMT + - Wed, 02 Sep 2020 21:55:36 GMT etag: - - '"0x8D75975199480F2"' + - '"0x8D84F8AEC722DFD"' last-modified: - - Fri, 25 Oct 2019 17:59:37 GMT + - Wed, 02 Sep 2020 21:55:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-copy-id: - - 530e75bb-3f05-457e-9ea7-67ab48b5dabc + - 2cf9e669-0ae6-477c-bf7b-e8d0d5e49fc8 x-ms-copy-status: - success x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-09-02T21:55:36.3912189Z' status: code: 202 message: Accepted @@ -145,38 +149,39 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 17:59:37 GMT + - Wed, 02 Sep 2020 21:55:36 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/containere54813d5?include=copy&restype=container&comp=list response: body: string: "\uFEFFblob1Fri, - 25 Oct 2019 17:59:37 GMTFri, 25 Oct 2019 17:59:37 - GMT0x8D759751984C5A711application/octet-streamblob12020-09-02T21:55:36.1680604ZtrueWed, + 02 Sep 2020 21:55:36 GMTWed, 02 Sep 2020 21:55:36 + GMT0x8D84F8AEC5020DC11application/octet-streamXrY7u+Ae7tCTyyK7j1rNww==BlockBlobHottrueunlockedavailabletrueblob1copyFri, - 25 Oct 2019 17:59:37 GMTFri, 25 Oct 2019 17:59:37 - GMT0x8D75975199480F211application/octet-streamBlockBlobHottrueunlockedavailabletrueblob1copy2020-09-02T21:55:36.3912189ZtrueWed, + 02 Sep 2020 21:55:36 GMTWed, 02 Sep 2020 21:55:36 + GMT0x8D84F8AEC722DFD11application/octet-streamXrY7u+Ae7tCTyyK7j1rNww==BlockBlobHottrueunlockedavailable530e75bb-3f05-457e-9ea7-67ab48b5dabchttps://storagename.blob.core.windows.net/containere54813d5/blob1success11/11Fri, - 25 Oct 2019 17:59:37 GMTtrue" + />BlockBlobHottrueunlockedavailable2cf9e669-0ae6-477c-bf7b-e8d0d5e49fc8https://storagename.blob.core.windows.net/containere54813d5/blob1success11/11Wed, + 02 Sep 2020 21:55:36 GMTtrue" headers: content-type: - application/xml date: - - Fri, 25 Oct 2019 17:59:36 GMT + - Wed, 02 Sep 2020 21:55:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_upload_pages_from_url.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_upload_pages_from_url.yaml index f6099bc49a281..a73f46eb3e10a 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_upload_pages_from_url.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_upload_pages_from_url.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1?restype=container response: @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:18 GMT etag: - - '"0x8D759767EA8C83D"' + - '"0x8D846F6D35B46BA"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -49,11 +49,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1?restype=container response: @@ -63,15 +63,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:19 GMT etag: - - '"0x8D759767EB10722"' + - '"0x8D846F6D3727C64"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -87,15 +87,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-content-length: - '8192' x-ms-blob-type: - PageBlob x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1 response: @@ -105,17 +105,19 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:19 GMT etag: - - '"0x8D759767EB9AEE7"' + - '"0x8D846F6D3893760"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:19.7809504Z' status: code: 201 message: Created @@ -133,15 +135,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT x-ms-page-write: - update x-ms-range: - bytes=0-8191 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?comp=page response: @@ -150,22 +152,22 @@ interactions: headers: content-length: - '0' + content-md5: + - IhmUBAsUKUvff7wSjmZjPA== date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:19 GMT etag: - - '"0x8D759767EC1C69F"' + - '"0x8D846F6D3A01EE5"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: - '0' - x-ms-content-crc64: - - ERTjv26IbjE= x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -181,15 +183,111 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-content-length: - '8192' x-ms-blob-type: - PageBlob x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob5dfe10c1 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 23:55:19 GMT + etag: + - '"0x8D846F6D3B7C9E1"' + last-modified: + - Sat, 22 Aug 2020 23:55:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.0871673Z' + status: + code: 201 + message: Created +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 23:55:21 GMT + x-ms-page-write: + - update + x-ms-range: + - bytes=0-8191 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob5dfe10c1?comp=page + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IhmUBAsUKUvff7wSjmZjPA== + date: + - Sat, 22 Aug 2020 23:55:19 GMT + etag: + - '"0x8D846F6D3CF74DE"' + last-modified: + - Sat, 22 Aug 2020 23:55:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-content-length: + - '8192' + x-ms-blob-type: + - PageBlob + x-ms-date: + - Sat, 22 Aug 2020 23:55:21 GMT + x-ms-version: + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 response: @@ -199,17 +297,19 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:19 GMT etag: - - '"0x8D759767EC9B743"' + - '"0x8D846F6D3E68376"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' status: code: 201 message: Created @@ -225,11 +325,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragedtrpf3xfnfdp.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?se=2019-10-25T19%3A09%3A36Z&sp=rd&sv=2019-02-02&sr=b&sig=5V5rE7JxXyu5zkiy1GeSqpxXicJjITU1vZ4RNt8HrfA%3D + - https://tamerdevtest.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?se=2020-08-23T00%3A55%3A21Z&sp=rdt&sv=2019-12-12&sr=b&sig=sUiZ2hFamJ6zGFddsNvmAbHp1d8GNLCcP5tOvWYHhQA%3D x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT x-ms-page-write: - update x-ms-range: @@ -237,7 +337,7 @@ interactions: x-ms-source-range: - bytes=0-4095 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=page response: @@ -246,22 +346,22 @@ interactions: headers: content-length: - '0' + content-md5: + - IaGZxT9CKjgOILFi+26+nA== date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:20 GMT etag: - - '"0x8D759767ED68AC3"' + - '"0x8D846F6D442BDE2"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: - '0' - x-ms-content-crc64: - - Ep3PX5ZZvPI= x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -277,11 +377,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragedtrpf3xfnfdp.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?se=2019-10-25T19%3A09%3A36Z&sp=rd&sv=2019-02-02&sr=b&sig=5V5rE7JxXyu5zkiy1GeSqpxXicJjITU1vZ4RNt8HrfA%3D + - https://tamerdevtest.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?se=2020-08-23T00%3A55%3A21Z&sp=rdt&sv=2019-12-12&sr=b&sig=sUiZ2hFamJ6zGFddsNvmAbHp1d8GNLCcP5tOvWYHhQA%3D x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT x-ms-page-write: - update x-ms-range: @@ -289,7 +389,7 @@ interactions: x-ms-source-range: - bytes=4096-8191 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=page response: @@ -298,22 +398,22 @@ interactions: headers: content-length: - '0' + content-md5: + - IaGZxT9CKjgOILFi+26+nA== date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:20 GMT etag: - - '"0x8D759767EDEF096"' + - '"0x8D846F6D458E1F4"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: - '0' - x-ms-content-crc64: - - Ep3PX5ZZvPI= x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -327,11 +427,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: HEAD uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 response: @@ -345,11 +445,11 @@ interactions: content-type: - application/octet-stream date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:20 GMT etag: - - '"0x8D759767EDEF096"' + - '"0x8D846F6D458E1F4"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: @@ -357,7 +457,9 @@ interactions: x-ms-blob-type: - PageBlob x-ms-creation-time: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT + x-ms-is-current-version: + - 'true' x-ms-lease-state: - available x-ms-lease-status: @@ -365,7 +467,9 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' status: code: 200 message: OK @@ -379,13 +483,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 response: @@ -401,11 +505,11 @@ interactions: content-type: - application/octet-stream date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:20 GMT etag: - - '"0x8D759767EDEF096"' + - '"0x8D846F6D458E1F4"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: @@ -413,7 +517,217 @@ interactions: x-ms-blob-type: - PageBlob x-ms-creation-time: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT + x-ms-is-current-version: + - 'true' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 23:55:22 GMT + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=pagelist + response: + body: + string: "\uFEFF08191" + headers: + content-type: + - application/xml + date: + - Sat, 22 Aug 2020 23:55:21 GMT + etag: + - '"0x8D846F6D458E1F4"' + last-modified: + - Sat, 22 Aug 2020 23:55:21 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-blob-content-length: + - '8192' + x-ms-version: + - '2019-12-12' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainersource5dfe10c1/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob5dfe10c1?se=2020-08-23T00%3A55%3A21Z&sp=rdt&sv=2019-12-12&sr=b&sig=aQAXAXPEcm%2BE%2BDLpjddg6tZ5xP8MrT5puW3CdWCQXks%3D + x-ms-date: + - Sat, 22 Aug 2020 23:55:23 GMT + x-ms-page-write: + - update + x-ms-range: + - bytes=0-4095 + x-ms-source-range: + - bytes=0-4095 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=page + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IaGZxT9CKjgOILFi+26+nA== + date: + - Sat, 22 Aug 2020 23:55:21 GMT + etag: + - '"0x8D846F6D4F5655A"' + last-modified: + - Sat, 22 Aug 2020 23:55:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 23:55:23 GMT + x-ms-version: + - '2019-12-12' + method: HEAD + uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '8192' + content-type: + - application/octet-stream + date: + - Sat, 22 Aug 2020 23:55:21 GMT + etag: + - '"0x8D846F6D4F5655A"' + last-modified: + - Sat, 22 Aug 2020 23:55:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-blob-type: + - PageBlob + x-ms-creation-time: + - Sat, 22 Aug 2020 23:55:20 GMT + x-ms-is-current-version: + - 'true' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 23:55:23 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 + response: + body: + string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + accept-ranges: + - bytes + content-length: + - '8192' + content-range: + - bytes 0-8191/8192 + content-type: + - application/octet-stream + date: + - Sat, 22 Aug 2020 23:55:21 GMT + etag: + - '"0x8D846F6D4F5655A"' + last-modified: + - Sat, 22 Aug 2020 23:55:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-blob-type: + - PageBlob + x-ms-creation-time: + - Sat, 22 Aug 2020 23:55:20 GMT + x-ms-is-current-version: + - 'true' x-ms-lease-state: - available x-ms-lease-status: @@ -421,7 +735,9 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' status: code: 206 message: Partial Content @@ -435,11 +751,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:37 GMT + - Sat, 22 Aug 2020 23:55:23 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=pagelist response: @@ -449,11 +765,11 @@ interactions: content-type: - application/xml date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT etag: - - '"0x8D759767EDEF096"' + - '"0x8D846F6D4F5655A"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -461,7 +777,7 @@ interactions: x-ms-blob-content-length: - '8192' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py index 0b158529f3388..bdfb2e5fc00cd 100644 --- a/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py @@ -11,6 +11,7 @@ import asyncio import uuid +from datetime import datetime, timedelta from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceModifiedError from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy @@ -22,7 +23,9 @@ BlobType, ContentSettings, BlobBlock, - StandardBlobTier + StandardBlobTier, + generate_blob_sas, + BlobSasPermissions ) from azure.storage.blob.aio import ( @@ -77,6 +80,24 @@ def _teardown(self, FILE_PATH): def _get_blob_reference(self): return self.get_resource_name(TEST_BLOB_PREFIX) + def _get_blob_with_special_chars_reference(self): + return 'भारत¥test/testsubÐirÍ/'+self.get_resource_name('srcÆblob') + + async def _create_source_blob_url_with_special_chars(self, tags=None): + blob_name = self._get_blob_with_special_chars_reference() + blob = self.bsc.get_blob_client(self.container_name, blob_name) + await blob.upload_blob(self.get_random_bytes(8 * 1024)) + sas_token_for_special_chars = generate_blob_sas( + blob.account_name, + blob.container_name, + blob.blob_name, + snapshot=blob.snapshot, + account_key=blob.credential.account_key, + permission=BlobSasPermissions(read=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + return BlobClient.from_blob_url(blob.url, credential=sas_token_for_special_chars).url + async def _create_blob(self, tags=None): blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -115,6 +136,50 @@ async def test_put_block(self, resource_group, location, storage_account, storag # Assert + @GlobalStorageAccountPreparer() + @AsyncStorageTestCase.await_prepared_test + async def test_copy_blob_async(self, resource_group, location, storage_account, storage_account_key): + await self._setup(storage_account, storage_account_key) + dest_blob = await self._create_blob() + source_blob_url = await self._create_source_blob_url_with_special_chars() + + # Act + copy_props = await dest_blob.start_copy_from_url(source_blob_url, requires_sync=True) + + # Assert + self.assertIsNotNone(copy_props) + self.assertIsNotNone(copy_props['copy_id']) + self.assertEqual('success', copy_props['copy_status']) + + @GlobalStorageAccountPreparer() + @AsyncStorageTestCase.await_prepared_test + async def test_put_block_from_url_and_commit(self, resource_group, location, storage_account, storage_account_key): + await self._setup(storage_account, storage_account_key) + dest_blob = await self._create_blob() + source_blob_url = await self._create_source_blob_url_with_special_chars() + split = 4 * 1024 + # Act part 1: make put block from url calls + await dest_blob.stage_block_from_url( + block_id=1, + source_url=source_blob_url, + source_offset=0, + source_length=split) + await dest_blob.stage_block_from_url( + block_id=2, + source_url=source_blob_url, + source_offset=split, + source_length=split) + + # Assert blocks + committed, uncommitted = await dest_blob.get_block_list('all') + self.assertEqual(len(uncommitted), 2) + self.assertEqual(len(committed), 0) + # Act part 2: commit the blocks + await dest_blob.commit_block_list(['1', '2']) + committed, uncommitted = await dest_blob.get_block_list('all') + self.assertEqual(len(uncommitted), 0) + self.assertEqual(len(committed), 2) + @GlobalStorageAccountPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_with_response(self, resource_group, location, storage_account, storage_account_key): diff --git a/sdk/storage/azure-storage-blob/tests/test_block_blob_sync_copy.py b/sdk/storage/azure-storage-blob/tests/test_block_blob_sync_copy.py index 56c44211ac70a..4164e08de32a0 100644 --- a/sdk/storage/azure-storage-blob/tests/test_block_blob_sync_copy.py +++ b/sdk/storage/azure-storage-blob/tests/test_block_blob_sync_copy.py @@ -1,3 +1,5 @@ +# coding: utf-8 + # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for @@ -29,8 +31,12 @@ class StorageBlockBlobTest(StorageTestCase): def _setup(self, storage_account, key): + account_url = self.account_url(storage_account, "blob") + if not isinstance(account_url, str): + account_url = account_url.encode('utf-8') + key = key.encode('utf-8') self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + account_url, credential=key, connection_data_block_size=4 * 1024, max_single_put_size=32 * 1024, @@ -40,12 +46,17 @@ def _setup(self, storage_account, key): # create source blob to be copied from self.source_blob_name = self.get_resource_name('srcblob') + self.source_blob_name_with_special_chars = 'भारत¥test/testsubÐirÍ/'+self.get_resource_name('srcÆblob') self.source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) + self.source_blob_with_special_chars_data = self.get_random_bytes(SOURCE_BLOB_SIZE) blob = self.bsc.get_blob_client(self.container_name, self.source_blob_name) + blob_with_special_chars = self.bsc.get_blob_client(self.container_name, self.source_blob_name_with_special_chars) + if self.is_live: self.bsc.create_container(self.container_name) blob.upload_blob(self.source_blob_data) + blob_with_special_chars.upload_blob(self.source_blob_with_special_chars_data) # generate a SAS so that it is accessible with a URL sas_token = generate_blob_sas( @@ -57,7 +68,19 @@ def _setup(self, storage_account, key): permission=BlobSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), ) + # generate a SAS so that it is accessible with a URL + sas_token_for_special_chars = generate_blob_sas( + blob_with_special_chars.account_name, + blob_with_special_chars.container_name, + blob_with_special_chars.blob_name, + snapshot=blob_with_special_chars.snapshot, + account_key=blob_with_special_chars.credential.account_key, + permission=BlobSasPermissions(read=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) self.source_blob_url = BlobClient.from_blob_url(blob.url, credential=sas_token).url + self.source_blob_url_with_special_chars = BlobClient.from_blob_url( + blob_with_special_chars.url, credential=sas_token_for_special_chars).url @GlobalStorageAccountPreparer() def test_put_block_from_url_and_commit(self, resource_group, location, storage_account, storage_account_key): @@ -91,6 +114,30 @@ def test_put_block_from_url_and_commit(self, resource_group, location, storage_a self.assertEqual(len(content), 8 * 1024) self.assertEqual(content, self.source_blob_data) + dest_blob.stage_block_from_url( + block_id=3, + source_url=self.source_blob_url_with_special_chars, + source_offset=0, + source_length=split) + dest_blob.stage_block_from_url( + block_id=4, + source_url=self.source_blob_url_with_special_chars, + source_offset=split, + source_length=split) + + # Assert blocks + committed, uncommitted = dest_blob.get_block_list('all') + self.assertEqual(len(uncommitted), 2) + self.assertEqual(len(committed), 2) + + # Act part 2: commit the blocks + dest_blob.commit_block_list(['3', '4']) + + # Assert destination blob has right content + content = dest_blob.download_blob().readall() + self.assertEqual(len(content), 8 * 1024) + self.assertEqual(content, self.source_blob_with_special_chars_data) + @GlobalStorageAccountPreparer() def test_put_block_from_url_and_validate_content_md5(self, resource_group, location, storage_account, storage_account_key): self._setup(storage_account, storage_account_key) @@ -145,6 +192,17 @@ def test_copy_blob_sync(self, resource_group, location, storage_account, storage content = dest_blob.download_blob().readall() self.assertEqual(self.source_blob_data, content) + copy_props_with_special_chars = dest_blob.start_copy_from_url(self.source_blob_url_with_special_chars, requires_sync=True) + + # Assert + self.assertIsNotNone(copy_props_with_special_chars) + self.assertIsNotNone(copy_props_with_special_chars['copy_id']) + self.assertEqual('success', copy_props_with_special_chars['copy_status']) + + # Verify content + content = dest_blob.download_blob().readall() + self.assertEqual(self.source_blob_with_special_chars_data, content) + @pytest.mark.playback_test_only @GlobalStorageAccountPreparer() def test_sync_copy_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key): diff --git a/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py index c99a9a9fc1526..b2a7bc6235d86 100644 --- a/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py @@ -272,6 +272,24 @@ async def test_create_blob_with_question_mark(self, resource_group, location, st content = data.decode('utf-8') self.assertEqual(content, blob_data) + @GlobalStorageAccountPreparer() + @AsyncStorageTestCase.await_prepared_test + async def test_create_blob_with_equal_sign(self, resource_group, location, storage_account, storage_account_key): + # Arrange + await self._setup(storage_account, storage_account_key) + blob_name = '=ques=tion!' + blob_data = u'???' + + # Act + blob = self.bsc.get_blob_client(self.container_name, blob_name) + await blob.upload_blob(blob_data) + + # Assert + stream = await blob.download_blob() + data = await stream.readall() + self.assertIsNotNone(data) + content = data.decode('utf-8') + self.assertEqual(content, blob_data) @GlobalStorageAccountPreparer() @AsyncStorageTestCase.await_prepared_test diff --git a/sdk/storage/azure-storage-blob/tests/test_page_blob.py b/sdk/storage/azure-storage-blob/tests/test_page_blob.py index c08384d0b345e..ec8c669868f3c 100644 --- a/sdk/storage/azure-storage-blob/tests/test_page_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_page_blob.py @@ -68,6 +68,13 @@ def _create_blob(self, bsc, length=512, sequence_number=None, tags=None): blob.create_page_blob(size=length, sequence_number=sequence_number, tags=tags) return blob + def _create_source_blob_with_special_chars(self, bs, data, offset, length): + blob_client = bs.get_blob_client(self.source_container_name, + 'भारत¥test/testsubÐirÍ/'+self.get_resource_name('srcÆblob')) + blob_client.create_page_blob(size=length) + blob_client.upload_page(data, offset=offset, length=length) + return blob_client + def _create_source_blob(self, bs, data, offset, length): blob_client = bs.get_blob_client(self.source_container_name, self.get_resource_name(TEST_BLOB_PREFIX)) @@ -403,10 +410,17 @@ def test_update_page_unicode(self, resource_group, location, storage_account, st @GlobalStorageAccountPreparer() def test_upload_pages_from_url(self, resource_group, location, storage_account, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + account_url = self.account_url(storage_account, "blob") + if not isinstance(account_url, str): + account_url = account_url.encode('utf-8') + storage_account_key = storage_account_key.encode('utf-8') + bsc = BlobServiceClient(account_url, credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) + source_blob_client_with_special_chars = self._create_source_blob_with_special_chars( + bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) + sas = generate_blob_sas( source_blob_client.account_name, source_blob_client.container_name, @@ -416,6 +430,15 @@ def test_upload_pages_from_url(self, resource_group, location, storage_account, permission=BlobSasPermissions(read=True, delete=True), expiry=datetime.utcnow() + timedelta(hours=1)) + sas_token_for_blob_with_special_chars = generate_blob_sas( + source_blob_client_with_special_chars.account_name, + source_blob_client_with_special_chars.container_name, + source_blob_client_with_special_chars.blob_name, + snapshot=source_blob_client_with_special_chars.snapshot, + account_key=source_blob_client_with_special_chars.credential.account_key, + permission=BlobSasPermissions(read=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1)) + destination_blob_client = self._create_blob(bsc, length=SOURCE_BLOB_SIZE) # Act: make update page from url calls @@ -437,6 +460,19 @@ def test_upload_pages_from_url(self, resource_group, location, storage_account, self.assertEqual(blob_properties.get('etag'), resp.get('etag')) self.assertEqual(blob_properties.get('last_modified'), resp.get('last_modified')) + # Act: make update page from url calls + source_with_special_chars_resp = destination_blob_client.upload_pages_from_url( + source_blob_client_with_special_chars.url + "?" + sas_token_for_blob_with_special_chars, offset=0, length=4 * 1024, source_offset=0) + self.assertIsNotNone(source_with_special_chars_resp.get('etag')) + self.assertIsNotNone(source_with_special_chars_resp.get('last_modified')) + + # Assert the destination blob is constructed correctly + blob_properties = destination_blob_client.get_blob_properties() + self.assertEqual(blob_properties.size, SOURCE_BLOB_SIZE) + self.assertBlobEqual(self.container_name, destination_blob_client.blob_name, source_blob_data, bsc) + self.assertEqual(blob_properties.get('etag'), source_with_special_chars_resp.get('etag')) + self.assertEqual(blob_properties.get('last_modified'), source_with_special_chars_resp.get('last_modified')) + @GlobalStorageAccountPreparer() def test_upload_pages_from_url_and_validate_content_md5(self, resource_group, location, storage_account, storage_account_key): # Arrange diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index c9603d07be159..c0caab73309f4 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -1,4 +1,10 @@ # Release History +## 12.1.2 (Unreleased) + + +## 12.1.1 (2020-08-13) +- Patch release to update the minimum dependency requirement. + ## 12.1.0 (2020-08-12) - Added `query_file` API to enable users to select/project on DataLake file data by providing simple query expressions. diff --git a/sdk/storage/azure-storage-file-datalake/GEN1_GEN2_MAPPING.md b/sdk/storage/azure-storage-file-datalake/GEN1_GEN2_MAPPING.md index 026f362dc5d57..6ffda9a77013d 100644 --- a/sdk/storage/azure-storage-file-datalake/GEN1_GEN2_MAPPING.md +++ b/sdk/storage/azure-storage-file-datalake/GEN1_GEN2_MAPPING.md @@ -83,7 +83,7 @@ Return last bytes of file -read_block +read_block Read a block of bytes from an ADL file @@ -116,7 +116,7 @@ Set the Access Control List (ACL) for a file or folder. -modify_acl_entries +modify_acl_entries Modify existing Access Control List (ACL) entries on a file or folder. If the entry does not exist it is added, otherwise it is updated based on the spec passed in. No entries are removed by this process (unlike set_acl). @@ -132,7 +132,7 @@ Probably users can achieve the same purpose by calling set_access_control with related parameters. -remove_acl +remove_acl Remove the entire, non default, ACL from the file or folder, including unnamed entries. Default entries cannot be removed this way, please use remove_default_acl for that. Note: this is not recursive, and applies only to the file or folder specified. @@ -140,7 +140,7 @@ Remove the entire default ACL from the folder. Default entries do not exist on files, if a file is specified, this operation does nothing. Note: this is not recursive, and applies only to the folder specified. -open +open Open a file for reading or writing to. N/A There is no open file operation In ADLS Gen2. However users can do operations to the file directly, eg. append_data, flush_data, download_file diff --git a/sdk/storage/azure-storage-file-datalake/README.md b/sdk/storage/azure-storage-file-datalake/README.md index e2ee6c7920994..7277a60bb1396 100644 --- a/sdk/storage/azure-storage-file-datalake/README.md +++ b/sdk/storage/azure-storage-file-datalake/README.md @@ -14,7 +14,7 @@ This preview package for Python includes ADLS Gen2 specific API support made ava ### Prerequisites * Python 2.7, or 3.5 or later is required to use this package. * You must have an [Azure subscription](https://azure.microsoft.com/free/) and an -[Azure storage account](https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-quickstart-create-account) to use this package. +[Azure storage account](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account) to use this package. ### Install the package Install the Azure DataLake Storage client library for Python with [pip](https://pypi.org/project/pip/): @@ -25,17 +25,20 @@ pip install azure-storage-file-datalake --pre ### Create a storage account If you wish to create a new storage account, you can use the -[Azure Portal](https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-quickstart-create-account#create-an-account-using-the-azure-portal), -[Azure PowerShell](https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-quickstart-create-account#create-an-account-using-powershell), -or [Azure CLI](https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-quickstart-create-account#create-an-account-using-azure-cli): +[Azure Portal](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account#create-an-account-using-the-azure-portal), +[Azure PowerShell](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account#create-an-account-using-powershell), +or [Azure CLI](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account#create-an-account-using-azure-cli): ```bash # Create a new resource group to hold the storage account - # if using an existing resource group, skip this step az group create --name my-resource-group --location westus2 +# Install the extension 'Storage-Preview' +az extension add --name storage-preview + # Create the storage account -az storage account create -n my-storage-account-name -g my-resource-group --hierarchical-namespace true +az storage account create --name my-storage-account-name --resource-group my-resource-group --sku Standard_LRS --kind StorageV2 --hierarchical-namespace true ``` ### Authenticate the client @@ -221,7 +224,7 @@ Several DataLake Storage Python SDK samples are available to you in the SDK's Gi ### Additional documentation Table for [ADLS Gen1 to ADLS Gen2 API Mapping](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/storage/azure-storage-file-datalake/GEN1_GEN2_MAPPING.md) -For more extensive REST documentation on Data Lake Storage Gen2, see the [Data Lake Storage Gen2 documentation](https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/filesystem) on docs.microsoft.com. +For more extensive REST documentation on Data Lake Storage Gen2, see the [Data Lake Storage Gen2 documentation](https://docs.microsoft.com/rest/api/storageservices/datalakestoragegen2/filesystem) on docs.microsoft.com. ## Contributing diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/authentication.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/authentication.py index b11dc57578087..d04c1e4fb539e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/authentication.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/authentication.py @@ -79,7 +79,9 @@ def _get_canonicalized_resource(self, request): uri_path = urlparse(request.http_request.url).path try: if isinstance(request.context.transport, AioHttpTransport) or \ - isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport): + isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport) or \ + isinstance(getattr(getattr(request.context.transport, "_transport", None), "_transport", None), + AioHttpTransport): uri_path = URL(uri_path) return '/' + self.account_name + str(uri_path) except TypeError: diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py index 1aff1291cc522..4cd76a18aff6c 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.1.0" +VERSION = "12.1.2" diff --git a/sdk/storage/azure-storage-file-datalake/samples/README.md b/sdk/storage/azure-storage-file-datalake/samples/README.md index 7114ae2bdebb1..142db60ff3b49 100644 --- a/sdk/storage/azure-storage-file-datalake/samples/README.md +++ b/sdk/storage/azure-storage-file-datalake/samples/README.md @@ -40,7 +40,7 @@ Several DataLake Storage Python SDK samples are available to you in the SDK's Gi ## Prerequisites * Python 2.7, or 3.5 or later is required to use this package * You must have an [Azure subscription](https://azure.microsoft.com/free/) and an -[Azure storage account](https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-quickstart-create-account) to run these samples. +[Azure storage account](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account) to run these samples. ## Setup diff --git a/sdk/storage/azure-storage-file-datalake/setup.py b/sdk/storage/azure-storage-file-datalake/setup.py index 56712fdab2324..c6afe2ba1c74f 100644 --- a/sdk/storage/azure-storage-file-datalake/setup.py +++ b/sdk/storage/azure-storage-file-datalake/setup.py @@ -72,7 +72,7 @@ author_email='ascl@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', @@ -93,7 +93,7 @@ install_requires=[ "azure-core<2.0.0,>=1.6.0", "msrest>=0.6.10", - "azure-storage-blob~=12.4.0b1" + "azure-storage-blob~=12.4.0" ], extras_require={ ":python_version<'3.0'": ['futures', 'azure-storage-nspkg<4.0.0,>=3.0.0'], diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_directory.test_using_oauth_token_credential_to_create_directory.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_directory.test_using_oauth_token_credential_to_create_directory.yaml index 85c4f30bc646f..bede1438811a1 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_directory.test_using_oauth_token_credential_to_create_directory.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_directory.test_using_oauth_token_credential_to_create_directory.yaml @@ -1,6 +1,164 @@ interactions: - request: - body: client_id=68390a19-a897-236b-b453-488abf67b4fc&client_secret=%3A%5BGuwaYeN%5DIIJ%3Fq1XFGWRFSnypwoP415&grant_type=client_credentials&scope=https%3A%2F%2Fstorage.azure.com%2F.default + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0/.well-known/openid-configuration + response: + body: + string: '{"token_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code + id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '1651' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:43:23 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=ArX8CgCJKeBBiLk96TvcGf4; expires=Sat, 26-Sep-2020 19:43:23 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tANQDiBGwHlEZcSRa2s41lHAqO6VnKpuNSl_YZYO2GRVmQpaO5y3vHc7U7_4-V2FSf9DnZBix_LZbKov2hu0xLK2GseVztO7bb8cVjzFkF55NZCEfclbO7vWn8FaXRnqsNvbwpf7ZJrhr8ZYlkdYyZfQOuQTv7SLf2LW1FssDoTPUgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + x-ms-ests-server: + - 2.1.10985.8 - NCUS ProdSlices + x-ms-request-id: + - a5d6ec15-1687-4eb7-b7d9-152080097400 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tANQDiBGwHlEZcSRa2s41lHAqO6VnKpuNSl_YZYO2GRVmQpaO5y3vHc7U7_4-V2FSf9DnZBix_LZbKov2hu0xLK2GseVztO7bb8cVjzFkF55NZCEfclbO7vWn8FaXRnqsNvbwpf7ZJrhr8ZYlkdYyZfQOuQTv7SLf2LW1FssDoTPUgAA; + fpc=ArX8CgCJKeBBiLk96TvcGf4; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=https://login.microsoftonline.com/common/oauth2/authorize + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.microsoftonline.com/common/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '945' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:43:23 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=ArX8CgCJKeBBiLk96TvcGf4; expires=Sat, 26-Sep-2020 19:43:24 GMT; path=/; + secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=corp; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + nel: + - '{"report_to":"network-errors","max_age":86400,"success_fraction":0.001,"failure_fraction":1.0}' + report-to: + - '{"group":"network-errors","max_age":86400,"endpoints":[{"url":"https://ffde.nelreports.net/api/report?cat=estscorp+wst"}]}' + x-ms-ests-server: + - 2.1.10985.8 - WUS2 ProdSlices + x-ms-request-id: + - 6e0e9cbd-4b5c-4176-a1b8-889ffc84eb00 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0/.well-known/openid-configuration + response: + body: + string: '{"token_endpoint":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code + id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '1611' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:43:23 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=Am3shTATcn1GgW_9smTLN8c; expires=Sat, 26-Sep-2020 19:43:24 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tA8sXhKMq7Y8s3PIAq0uWpjoTwVmcYbgd6A-FL5IrfkfYxDRzGy5R_n-QK4AtzqcgW5DLDVEsz50_FFlto5Sty4iBf6c8jHFGjPcItL1p008N6YLpUVcRWfav9rOUBsCxTWhDR15LkYpZsmFERj2gghy61FZwh8AXedcK9MVqvqlUgAA; + domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=corp; path=/; secure; samesite=none; httponly + - stsservicecookie=estscorp; path=/; secure; samesite=none; httponly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + nel: + - '{"report_to":"network-errors","max_age":86400,"success_fraction":0.001,"failure_fraction":1.0}' + report-to: + - '{"group":"network-errors","max_age":86400,"endpoints":[{"url":"https://ffde.nelreports.net/api/report?cat=estscorp+wst"}]}' + x-ms-ests-server: + - 2.1.10985.8 - SAN ProdSlices + x-ms-request-id: + - 03176312-f1a8-4ce0-ae74-fc28f5bf5e01 + status: + code: 200 + message: OK +- request: + body: null headers: Accept: - '*/*' @@ -8,26 +166,143 @@ interactions: - gzip, deflate Connection: - keep-alive + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://sts.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0/.well-known/openid-configuration + response: + body: + string: '{"token_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code + id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '1651' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:43:23 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=An5JSVy1kyVFtDPA9QhBN-I; expires=Sat, 26-Sep-2020 19:43:24 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tAMrtMe9CNNkntlarWvg7R37hVHilDlQAh7zQDu9bc89Lec17GuCfW5d819vnTP-4Ns1H5zPNkrcVMmS3LSZTuYqBp7eUNXiSv5LvCkGA01MJDkzJtGSZqM0w7WtbeEqpV3mpj6_tSF5BJmpD4NjiIuPZUZjkxGDNw7uil3iVOnAcgAA; + domain=.sts.windows.net; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=corp; path=/; secure; samesite=none; httponly + - stsservicecookie=estscorp; path=/; secure; samesite=none; httponly + X-Content-Type-Options: + - nosniff + nel: + - '{"report_to":"network-errors","max_age":86400,"success_fraction":0.001,"failure_fraction":1.0}' + report-to: + - '{"group":"network-errors","max_age":86400,"endpoints":[{"url":"https://ffde.nelreports.net/api/report?cat=estscorp+wst"}]}' + x-ms-ests-server: + - 2.1.10985.8 - SAN ProdSlices + x-ms-request-id: + - 03d5db39-9439-4dd6-9bbf-8b9dfc582401 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0/.well-known/openid-configuration + response: + body: + string: '{"token_endpoint":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code + id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '1621' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:43:24 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=AhifQYkNJ6VNiAU7iech23s; expires=Sat, 26-Sep-2020 19:43:24 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tAc5RlvsLQvIW_M8QKru1RtbePDn_HiSxD39sjSzUDZ7h7fwAcEiQyE4fJNG-IQqY6jp4hgY1d8K32nvStnsA4PVnBVpT-3nBpuewxrFSl9ovLBivz3UYy7mAMw09egNHXLE536uj8isem9I5XCzw6oKTfK9SHJExBR9m_ixXd98QgAA; + domain=.login.microsoft.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + x-ms-ests-server: + - 2.1.10985.8 - SCUS ProdSlices + x-ms-request-id: + - 176377d5-050a-410d-b20e-3bbd2b907500 + status: + code: 200 + message: OK +- request: + body: client_id=68390a19-a897-236b-b453-488abf67b4fc&grant_type=client_credentials&client_info=1&client_secret=3Ujhg7pzkOeE7flc6Z187ugf5/cJnszGPjAiXmcwhaY=&scope=https%3A%2F%2Fstorage.azure.com%2F.default + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive Content-Length: - - '180' + - '188' Content-Type: - application/x-www-form-urlencoded + Cookie: + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tANQDiBGwHlEZcSRa2s41lHAqO6VnKpuNSl_YZYO2GRVmQpaO5y3vHc7U7_4-V2FSf9DnZBix_LZbKov2hu0xLK2GseVztO7bb8cVjzFkF55NZCEfclbO7vWn8FaXRnqsNvbwpf7ZJrhr8ZYlkdYyZfQOuQTv7SLf2LW1FssDoTPUgAA; + fpc=ArX8CgCJKeBBiLk96TvcGf4; stsservicecookie=estsfd; x-ms-gateway-slice=corp User-Agent: - - python-requests/2.22.0 + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + client-request-id: + - 1444602a-5083-4b78-8c74-ae7f1d535ce4 + x-client-cpu: + - x64 + x-client-current-telemetry: + - 1|730,0| + x-client-os: + - win32 + x-client-sku: + - MSAL.Python + x-client-ver: + - 1.3.0 method: POST uri: https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token response: body: - string: '{"token_type":"Bearer","expires_in":3600,"ext_expires_in":3600,"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJCOENlRlZxeWFHckdOdWVoSklpTDRkZmp6dyIsImtpZCI6IkJCOENlRlZxeWFHckdOdWVoSklpTDRkZmp6dyJ9.eyJhdWQiOiJodHRwczovL3N0b3JhZ2UuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3LyIsImlhdCI6MTU3NTQ3NTk1MiwibmJmIjoxNTc1NDc1OTUyLCJleHAiOjE1NzU0Nzk4NTIsImFpbyI6IjQyVmdZQ2o2OG5SVnJiY3dBN2ZuSlFjZjFYdHVBQT09IiwiYXBwaWQiOiI2ODM5MGExOS1hNjQzLTQ1OGItYjcyNi00MDhhYmY2N2I0ZmMiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwib2lkIjoiYzRmNDgyODktYmI4NC00MDg2LWIyNTAtNmY5NGE4ZjY0Y2VlIiwic3ViIjoiYzRmNDgyODktYmI4NC00MDg2LWIyNTAtNmY5NGE4ZjY0Y2VlIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidXRpIjoiM2kzU2hta1Zxa1dKZV9ZOXN4SXdBQSIsInZlciI6IjEuMCJ9.d6cR7q_McOzp-iASiwVbs0N0KpUhtjit4g7zqzFGcrjyLSClvikLtsG4FRiCURj1vDm8V_iB9FMZ6OznTiOeS71C3eRRIeElwK8PXCL88tYz31xm2QO1IxWYO_nlOfQDdXVsdsa5iZr0qKr5rN62A1cnK40umoC8DqcJU7Ol0e1P8VmOEz_HRJFMObabbDOSv_wMmu1sWir0KkcAsLlBPrq_pc2i7u8cnH2Hxq4MJZyxulJFcuZqvtGigQut9bvz3WKZ99D9edL3j8FWil21x6rEpuxZd7zNuLxfKv68FgJgsxLa0Ag-3lCG3WxVQpEpQgUHz4pUjWYZ5zoDggNuBA"}' + string: '{"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImppYk5ia0ZTU2JteFBZck45Q0ZxUms0SzRndyIsImtpZCI6ImppYk5ia0ZTU2JteFBZck45Q0ZxUms0SzRndyJ9.eyJhdWQiOiJodHRwczovL3N0b3JhZ2UuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3LyIsImlhdCI6MTU5ODU1NzEwNCwibmJmIjoxNTk4NTU3MTA0LCJleHAiOjE1OTg2NDM4MDQsImFpbyI6IkUyQmdZSmpQTEdVMzZiYkhYc2ZsUVh1eVpMaTRBQT09IiwiYXBwaWQiOiI2ODM5MGExOS1hNjQzLTQ1OGItYjcyNi00MDhhYmY2N2I0ZmMiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwib2lkIjoiYzRmNDgyODktYmI4NC00MDg2LWIyNTAtNmY5NGE4ZjY0Y2VlIiwicmgiOiIwLkFRRUF2NGo1Y3ZHR3IwR1JxeTE4MEJIYlJ4a0tPV2hEcG90RnR5WkFpcjludFB3YUFBQS4iLCJzdWIiOiJjNGY0ODI4OS1iYjg0LTQwODYtYjI1MC02Zjk0YThmNjRjZWUiLCJ0aWQiOiI3MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDciLCJ1dGkiOiJ3R3l0YzkxUkcwcTVQaXBzelRWMkFBIiwidmVyIjoiMS4wIn0.aKvw67PDCID7yTHzaAv14lAXfJpBIs6dn12kbq5HHReK1V7adcRIVr-FwDAqm0CgddDsPfODg0QQbVjs99HleWDsEgVC1LCpoJ2Bk3GMnQ4oGqxrgna69tn1RIig8s5t8OnbqTvue6ZWQUfbCQqFyv_Nh9zMEQEMTdBI1BQY4zDlhlujAPzMt38aq0-l9Y9Mj_Uwr1hDTo4Fks6-zTS7RScCYs5MJLJPRbmTk1H3tTCQSPbnX9aUICZwXkn3JuyMo_xCUJuehi9bwfm-XfqzG4DjKtTeoibgsClKXEZSuZetwm5JLDy8EGm6xdk5xLrUP-J6gJfgdztZ0mwetVfnRQ"}' headers: Cache-Control: - - no-cache, no-store + - no-store, no-cache Content-Length: - - '1233' + - '1318' Content-Type: - application/json; charset=utf-8 Date: - - Wed, 04 Dec 2019 16:17:32 GMT + - Thu, 27 Aug 2020 19:43:23 GMT Expires: - '-1' P3P: @@ -35,18 +310,22 @@ interactions: Pragma: - no-cache Set-Cookie: - - fpc=AjT4VpG8k-9Oqn7rUwgB7vveSEc1AQAAABzTedUOAAAA; expires=Fri, 03-Jan-2020 - 16:17:32 GMT; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly + - fpc=ArX8CgCJKeBBiLk96TvcGf7eSEc1AQAAANsD2tYOAAAA; expires=Sat, 26-Sep-2020 + 19:43:24 GMT; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: - nosniff + client-request-id: + - 1444602a-5083-4b78-8c74-ae7f1d535ce4 + x-ms-clitelem: + - 1,0,0,, x-ms-ests-server: - - 2.1.9707.16 - NCUS ProdSlices + - 2.1.10985.8 - WUS2 ProdSlices x-ms-request-id: - - 86d22dde-1569-45aa-897b-f63db3123000 + - 73ad6cc0-51dd-4a1b-b93e-2a6ccd357600 status: code: 200 message: OK @@ -62,15 +341,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.1.1 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-client-request-id: - - 936a3c0a-16b1-11ea-afc0-001a7dda7113 + - 919b5c74-e89d-11ea-b6bd-001a7dda7113 x-ms-date: - - Wed, 04 Dec 2019 16:17:32 GMT + - Thu, 27 Aug 2020 19:43:23 GMT x-ms-properties: - '' x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.dfs.core.windows.net/filesystemcc271c2b/directorycc271c2b?resource=directory response: @@ -80,17 +359,17 @@ interactions: Content-Length: - '0' Date: - - Wed, 04 Dec 2019 16:17:32 GMT + - Thu, 27 Aug 2020 19:43:24 GMT ETag: - - '"0x8D778D57815E31D"' + - '"0x8D84AC1768A7CF1"' Last-Modified: - - Wed, 04 Dec 2019 16:17:33 GMT + - Thu, 27 Aug 2020 19:43:25 GMT Server: - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-id: - - 58612a7b-901f-001d-45be-aa4028000000 + - a0b6cfbc-e01f-0028-3faa-7c2c3c000000 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file.test_create_file_using_oauth_token_credential.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file.test_create_file_using_oauth_token_credential.yaml index c2bd9f9b8e65a..9f553426c5be0 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file.test_create_file_using_oauth_token_credential.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file.test_create_file_using_oauth_token_credential.yaml @@ -1,6 +1,162 @@ interactions: - request: - body: client_id=68390a19-a897-236b-b453-488abf67b4fc&client_secret=%3A%5BGuwaYeN%5DIIJ%3Fq1XFGWRFSnypwoP415&grant_type=client_credentials&scope=https%3A%2F%2Fstorage.azure.com%2F.default + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0/.well-known/openid-configuration + response: + body: + string: '{"token_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code + id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '1651' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:44:15 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=AhWOZd3t29dKq4xz4nfTKW0; expires=Sat, 26-Sep-2020 19:44:16 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tAiROcMdTRj99As0iPbqrAZ0MfDIiulTR46Q0plg6aSBUKSBlqy3zWxkLj0r73GFysR199Sq2KZnMUELt-GYhucXwjpC53L0u_vR7bFqyuQk-fuJA0ir8jFG5jxCxfKZ2iwDQKyj-9lEUFucu4QtzWC4jdesI_L0IPAYMbPCD8Zm0gAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + x-ms-ests-server: + - 2.1.10985.8 - EUS ProdSlices + x-ms-request-id: + - f4b8eaf0-306a-4034-ae38-db314f9f6900 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tAiROcMdTRj99As0iPbqrAZ0MfDIiulTR46Q0plg6aSBUKSBlqy3zWxkLj0r73GFysR199Sq2KZnMUELt-GYhucXwjpC53L0u_vR7bFqyuQk-fuJA0ir8jFG5jxCxfKZ2iwDQKyj-9lEUFucu4QtzWC4jdesI_L0IPAYMbPCD8Zm0gAA; + fpc=AhWOZd3t29dKq4xz4nfTKW0; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=https://login.microsoftonline.com/common/oauth2/authorize + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.microsoftonline.com/common/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '945' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:44:15 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=AhWOZd3t29dKq4xz4nfTKW0; expires=Sat, 26-Sep-2020 19:44:16 GMT; path=/; + secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=corp; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + nel: + - '{"report_to":"network-errors","max_age":86400,"success_fraction":0.001,"failure_fraction":1.0}' + report-to: + - '{"group":"network-errors","max_age":86400,"endpoints":[{"url":"https://ffde.nelreports.net/api/report?cat=estscorp+wst"}]}' + x-ms-ests-server: + - 2.1.10985.8 - SAN ProdSlices + x-ms-request-id: + - 4f67a1b3-05b5-4fd4-8f4d-66ec553d6d01 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://sts.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0/.well-known/openid-configuration + response: + body: + string: '{"token_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code + id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '1651' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:44:16 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=An8oYeGPk5dNvtGVVGymjQw; expires=Sat, 26-Sep-2020 19:44:16 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tAG1Zv0wt89MPE8SIpv4HmO3xIMU7rtaw9laKbyCTQW6G7YQCOou3EcWmPnep08JUZFihaVAKHbvqphltTm4Gx8QIuJmEjgHHtQSDB2YpvWwafxWXlr8t-NevKgELaM3CKwJTCtLRsRY2VsxdrWGfHjNHnZC8B-egSpRzGHI685e0gAA; + domain=.sts.windows.net; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=corp; path=/; secure; samesite=none; httponly + - stsservicecookie=estscorp; path=/; secure; samesite=none; httponly + X-Content-Type-Options: + - nosniff + nel: + - '{"report_to":"network-errors","max_age":86400,"success_fraction":0.001,"failure_fraction":1.0}' + report-to: + - '{"group":"network-errors","max_age":86400,"endpoints":[{"url":"https://ffde.nelreports.net/api/report?cat=estscorp+wst"}]}' + x-ms-ests-server: + - 2.1.10985.8 - WUS2 ProdSlices + x-ms-request-id: + - ef688111-dc8e-4a16-8b5e-3b76ab91f100 + status: + code: 200 + message: OK +- request: + body: null headers: Accept: - '*/*' @@ -8,26 +164,145 @@ interactions: - gzip, deflate Connection: - keep-alive + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0/.well-known/openid-configuration + response: + body: + string: '{"token_endpoint":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code + id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoft.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '1621' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:44:16 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=AiuhCGlUHdtFjIiYUm5jSiw; expires=Sat, 26-Sep-2020 19:44:16 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tAlCJ0DKaoU7scca6eRX-lgcvvF3dXcAZJBcCCxWP2Go-DZBtHS9croIOK_yCuibLWebKkQkL9bnlDcf8dkzZZiZooD7Qwb4sZR8_sVlNQZjGnNpdLmSE-xGnk9VYzCI5omsnCJUitilElAiSAY6VqHmm2saCKKk_d1zGn1isqU2YgAA; + domain=.login.microsoft.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + x-ms-ests-server: + - 2.1.10985.8 - SCUS ProdSlices + x-ms-request-id: + - db75844a-78f6-48ec-8795-4a3e0ed67600 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0/.well-known/openid-configuration + response: + body: + string: '{"token_endpoint":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code + id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.windows.net/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}' + headers: + Access-Control-Allow-Methods: + - GET, OPTIONS + Access-Control-Allow-Origin: + - '*' + Cache-Control: + - max-age=86400, private + Content-Length: + - '1611' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 27 Aug 2020 19:44:16 GMT + P3P: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + Set-Cookie: + - fpc=ArRkzBvfEalJn5sVWdp7Dh8; expires=Sat, 26-Sep-2020 19:44:16 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tAtO0xKr9YefLVXjzfgaENBvbWBKX57xQYCBo96UlmvrzcxEjFzWWjCwAshsIwUcP_v02EED2bTDQUK0fpZttU5KTw6IAzjOZ5pgi8MOlVl0JIuShbVAWI6Qu4hIc7I7nuSktxVt5JsBul5L4I4a_e3SrfvAIj2mJPuEvfK-9bzIAgAA; + domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=corp; path=/; secure; samesite=none; httponly + - stsservicecookie=estscorp; path=/; secure; samesite=none; httponly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + nel: + - '{"report_to":"network-errors","max_age":86400,"success_fraction":0.001,"failure_fraction":1.0}' + report-to: + - '{"group":"network-errors","max_age":86400,"endpoints":[{"url":"https://ffde.nelreports.net/api/report?cat=estscorp+wst"}]}' + x-ms-ests-server: + - 2.1.10985.8 - SAN ProdSlices + x-ms-request-id: + - 03d5db39-9439-4dd6-9bbf-8b9d57622401 + status: + code: 200 + message: OK +- request: + body: client_id=68390a19-a897-236b-b453-488abf67b4fc&grant_type=client_credentials&client_info=1&client_secret=3Ujhg7pzkOeE7flc6Z187ugf5/cJnszGPjAiXmcwhaY=&scope=https%3A%2F%2Fstorage.azure.com%2F.default + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive Content-Length: - - '180' + - '188' Content-Type: - application/x-www-form-urlencoded + Cookie: + - esctx=AQABAAAAAAAGV_bv21oQQ4ROqh0_1-tAiROcMdTRj99As0iPbqrAZ0MfDIiulTR46Q0plg6aSBUKSBlqy3zWxkLj0r73GFysR199Sq2KZnMUELt-GYhucXwjpC53L0u_vR7bFqyuQk-fuJA0ir8jFG5jxCxfKZ2iwDQKyj-9lEUFucu4QtzWC4jdesI_L0IPAYMbPCD8Zm0gAA; + fpc=AhWOZd3t29dKq4xz4nfTKW0; stsservicecookie=estsfd; x-ms-gateway-slice=corp User-Agent: - - python-requests/2.22.0 + - azsdk-python-identity/1.5.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + client-request-id: + - 6753ca4f-56cc-4b0c-95dd-2487b97d835c + x-client-cpu: + - x64 + x-client-current-telemetry: + - 1|730,0| + x-client-os: + - win32 + x-client-sku: + - MSAL.Python + x-client-ver: + - 1.3.0 method: POST uri: https://login.microsoftonline.com/32f988bf-54f1-15af-36ab-2d7cd364db47/oauth2/v2.0/token response: body: - string: '{"token_type":"Bearer","expires_in":3600,"ext_expires_in":3600,"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJCOENlRlZxeWFHckdOdWVoSklpTDRkZmp6dyIsImtpZCI6IkJCOENlRlZxeWFHckdOdWVoSklpTDRkZmp6dyJ9.eyJhdWQiOiJodHRwczovL3N0b3JhZ2UuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3LyIsImlhdCI6MTU3NTQ3NjA0OCwibmJmIjoxNTc1NDc2MDQ4LCJleHAiOjE1NzU0Nzk5NDgsImFpbyI6IjQyVmdZT2phdURZcE51blhkdlBBL0pOaDJWYzFBUT09IiwiYXBwaWQiOiI2ODM5MGExOS1hNjQzLTQ1OGItYjcyNi00MDhhYmY2N2I0ZmMiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwib2lkIjoiYzRmNDgyODktYmI4NC00MDg2LWIyNTAtNmY5NGE4ZjY0Y2VlIiwic3ViIjoiYzRmNDgyODktYmI4NC00MDg2LWIyNTAtNmY5NGE4ZjY0Y2VlIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidXRpIjoiV0FJb1RsX29VMDJubU5ieUF2dmZBQSIsInZlciI6IjEuMCJ9.Hb6q5JBOizgV50_nxz2oThSnckfCfnXZOHUAYsj-s_Fu6XQcE81L0TCOr6NkojLqa6OCG1XmGKuYhJlWt_1-Ls-Fswrj-Q5gYSz5yC8vsnDeYYWgB-jMNzTUMqUb-R_XGLneD9cTaRnUEZpp1LaRDcKNGaSLBoCYJvkUsj1sCqxEGnLKWicGuFUz4qR78sMZ8JK4qhXcBItoW5SywdR6fM9YX1VWv64SrIC2QJGtNGazKIyylvYaNAPU6_OtFN51LNO4EsGxx2HNL27AtHcRo9e5GAqDqgdeBJDb80RwoQqcavOjTlDyNe7Zl8mXJTF10Dn88UGGsMonqlH_iYC-RA"}' + string: '{"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImppYk5ia0ZTU2JteFBZck45Q0ZxUms0SzRndyIsImtpZCI6ImppYk5ia0ZTU2JteFBZck45Q0ZxUms0SzRndyJ9.eyJhdWQiOiJodHRwczovL3N0b3JhZ2UuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3LyIsImlhdCI6MTU5ODU1NzE1NywibmJmIjoxNTk4NTU3MTU3LCJleHAiOjE1OTg2NDM4NTcsImFpbyI6IkUyQmdZS2phdERmblZyamtXd21WY3pXTmVxYnpBUT09IiwiYXBwaWQiOiI2ODM5MGExOS1hNjQzLTQ1OGItYjcyNi00MDhhYmY2N2I0ZmMiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwib2lkIjoiYzRmNDgyODktYmI4NC00MDg2LWIyNTAtNmY5NGE4ZjY0Y2VlIiwicmgiOiIwLkFRRUF2NGo1Y3ZHR3IwR1JxeTE4MEJIYlJ4a0tPV2hEcG90RnR5WkFpcjludFB3YUFBQS4iLCJzdWIiOiJjNGY0ODI4OS1iYjg0LTQwODYtYjI1MC02Zjk0YThmNjRjZWUiLCJ0aWQiOiI3MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDciLCJ1dGkiOiJRMDQyelAyaGNFZUtNc3ByRkExeUFBIiwidmVyIjoiMS4wIn0.YdnrY59WIY4Ei4sdYYAutwgN6WiLH6w-cBbYk57XyL5YRrf7kdLBk9DksUudUArrewesj9itVaeB8WcVRtYZCpekRqgOP8lT9KPcc4sBWqwgmGL9EOaeSVPLXIF-hQq11StESFimOF6YIejK_Z-64KOXuXCqQRlVOHZnAGiatzz5UULf9Wa2hgyQ00laLVn4o9cklRAwPWL9g1xtuKP5TYpdFFx_mi3DXyjJAAfb0WhK9vE-r4-ZDMFMFKAaJMcbV6oSldv7hz-byl1JxtrR6q6FJoCAhziHylw-4_YAMuoJdnK9gRUMXN5YZSsCuz93X0V_ynOwRA8w4BYWDJY1rQ"}' headers: Cache-Control: - - no-cache, no-store + - no-store, no-cache Content-Length: - - '1233' + - '1318' Content-Type: - application/json; charset=utf-8 Date: - - Wed, 04 Dec 2019 16:19:07 GMT + - Thu, 27 Aug 2020 19:44:16 GMT Expires: - '-1' P3P: @@ -35,18 +310,22 @@ interactions: Pragma: - no-cache Set-Cookie: - - fpc=AkwEWaKOZNpBtXky1EeutcjeSEc1AQAAAHvTedUOAAAA; expires=Fri, 03-Jan-2020 - 16:19:08 GMT; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=estsfd; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estsfd; path=/; SameSite=None; secure; HttpOnly + - fpc=AhWOZd3t29dKq4xz4nfTKW3eSEc1AQAAABAE2tYOAAAA; expires=Sat, 26-Sep-2020 + 19:44:17 GMT; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: - nosniff + client-request-id: + - 6753ca4f-56cc-4b0c-95dd-2487b97d835c + x-ms-clitelem: + - 1,0,0,, x-ms-ests-server: - - 2.1.9707.16 - WUS ProdSlices + - 2.1.10985.8 - NCUS ProdSlices x-ms-request-id: - - 4e280258-e85f-4d53-a798-d6f202fbdf00 + - cc364e43-a1fd-4770-8a32-ca6b140d7200 status: code: 200 message: OK @@ -62,15 +341,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.0b5 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.1.1 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-client-request-id: - - cc420a78-16b1-11ea-aad8-001a7dda7113 + - b0c57194-e89d-11ea-a525-001a7dda7113 x-ms-date: - - Wed, 04 Dec 2019 16:19:08 GMT + - Thu, 27 Aug 2020 19:44:16 GMT x-ms-properties: - '' x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.dfs.core.windows.net/filesystem73a6167f/file73a6167f?resource=file response: @@ -80,17 +359,17 @@ interactions: Content-Length: - '0' Date: - - Wed, 04 Dec 2019 16:19:08 GMT + - Thu, 27 Aug 2020 19:44:16 GMT ETag: - - '"0x8D778D5B10053EC"' + - '"0x8D84AC195C35579"' Last-Modified: - - Wed, 04 Dec 2019 16:19:08 GMT + - Thu, 27 Aug 2020 19:44:17 GMT Server: - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-id: - - 8fcb852e-601f-0026-60be-aa058c000000 + - 6837e147-501f-0002-16aa-7cf32c000000 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md index 01d6ae2abed4a..784aa8b70daca 100644 --- a/sdk/storage/azure-storage-file-share/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 12.2.1 (Unreleased) + + +## 12.2.0 (2020-08-13) +**Stable release of preview features** +- Preview feature `undelete_share` on FileShareServiceClient. + ## 12.2.0b1 (2020-07-07) **New features** - Added `undelete_share` on FileShareServiceClient so that users can restore deleted share on share soft delete enabled account. Users can also list deleted shares when `list_shares` by specifying `include_deleted=True`. diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_serialize.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_serialize.py index c0755118477ed..769eb975bed2d 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_serialize.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_serialize.py @@ -54,6 +54,7 @@ def get_source_conditions(kwargs): source_if_none_match=if_none_match or kwargs.pop('source_if_none_match', None) ) + def get_access_conditions(lease): # type: (Optional[Union[ShareLeaseClient, str]]) -> Union[LeaseAccessConditions, None] try: diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/authentication.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/authentication.py index b11dc57578087..d04c1e4fb539e 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/authentication.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/authentication.py @@ -79,7 +79,9 @@ def _get_canonicalized_resource(self, request): uri_path = urlparse(request.http_request.url).path try: if isinstance(request.context.transport, AioHttpTransport) or \ - isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport): + isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport) or \ + isinstance(getattr(getattr(request.context.transport, "_transport", None), "_transport", None), + AioHttpTransport): uri_path = URL(uri_path) return '/' + self.account_name + str(uri_path) except TypeError: diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py index dd22d879d99de..c7e18b39cee7a 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.2.0b1" +VERSION = "12.2.1" diff --git a/sdk/storage/azure-storage-file-share/setup.py b/sdk/storage/azure-storage-file-share/setup.py index 74655734004e7..e4cc87aae80a8 100644 --- a/sdk/storage/azure-storage-file-share/setup.py +++ b/sdk/storage/azure-storage-file-share/setup.py @@ -58,7 +58,7 @@ author_email='ascl@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share', classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py index 6190a2b53933f..f8e626370263f 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py @@ -158,7 +158,7 @@ def from_connection_string( credential=None, # type: Any **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> QueueClient """Create QueueClient from a Connection String. :param str conn_str: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/authentication.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/authentication.py index b11dc57578087..d04c1e4fb539e 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/authentication.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/authentication.py @@ -79,7 +79,9 @@ def _get_canonicalized_resource(self, request): uri_path = urlparse(request.http_request.url).path try: if isinstance(request.context.transport, AioHttpTransport) or \ - isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport): + isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport) or \ + isinstance(getattr(getattr(request.context.transport, "_transport", None), "_transport", None), + AioHttpTransport): uri_path = URL(uri_path) return '/' + self.account_name + str(uri_path) except TypeError: diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index b05318280d6af..3796300ccc894 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -52,4 +51,4 @@ extends: - name: azure_mgmt_storagesync safeName: azuremgmtstoragesync - name: azure_mgmt_storageimportexport - safeName: azuremgmtstorageimportexport \ No newline at end of file + safeName: azuremgmtstorageimportexport diff --git a/sdk/subscription/ci.yml b/sdk/subscription/ci.yml index f26e35d853620..4df043ccb87e3 100644 --- a/sdk/subscription/ci.yml +++ b/sdk/subscription/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: subscription Artifacts: - name: azure_mgmt_subscription - safeName: azuremgmtsubscription \ No newline at end of file + safeName: azuremgmtsubscription diff --git a/sdk/support/ci.yml b/sdk/support/ci.yml index 542e7f85ee3d5..9d04577caa690 100644 --- a/sdk/support/ci.yml +++ b/sdk/support/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: support Artifacts: - name: azure_mgmt_support - safeName: azuremgmtsupport \ No newline at end of file + safeName: azuremgmtsupport diff --git a/sdk/synapse/ci.yml b/sdk/synapse/ci.yml index 5d8e432985c10..53f55fb146a67 100644 --- a/sdk/synapse/ci.yml +++ b/sdk/synapse/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -40,4 +39,4 @@ extends: - name: azure_synapse_nspkg safeName: azuresynapsenspkg - name: azure_mgmt_synapse - safeName: azuremgmtsynapse \ No newline at end of file + safeName: azuremgmtsynapse diff --git a/sdk/tables/azure-data-tables/MANIFEST.in b/sdk/tables/azure-data-tables/MANIFEST.in index 428787a39347f..c6292d45f925a 100644 --- a/sdk/tables/azure-data-tables/MANIFEST.in +++ b/sdk/tables/azure-data-tables/MANIFEST.in @@ -1,6 +1,7 @@ +recursive-include tests *.py *.yaml include *.md include azure/__init__.py include azure/data/__init__.py include LICENSE.txt recursive-include tests *.py -recursive-include samples *.py *.md +recursive-include samples *.py *.md \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/README.md b/sdk/tables/azure-data-tables/README.md index 02ea72a9fab98..06bfc6ce8d6b7 100644 --- a/sdk/tables/azure-data-tables/README.md +++ b/sdk/tables/azure-data-tables/README.md @@ -1,83 +1,76 @@ # Azure Data Tables client library for Python -Azure Data Tables is a NoSQL data storing service that can be accessed from anywhere in the world via authenticated calls using HTTP or HTTPS. -Tables scale as needed to support the amount of data inserted, and allow for the storing of data with non-complex accessing. -Tables scale as needed to support the amount of data inserted, and allow for the storing of data with non-complex accessing. +Azure Data Tables is a NoSQL data storage service that can be accessed from anywhere in the world via authenticated calls using HTTP or HTTPS. +Tables scales as needed to support the amount of data inserted, and allow for the storing of data with non-complex accessing. The Azure Data Tables client can be used to access Azure Storage or Cosmos accounts. -Common uses of Azure Data Tables include: - -* Storing structured data in the form of tables -* Quickly querying data using a clustered index - -[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) | [Package (PyPI)](https://pypi.org) | [API reference documentation](https://aka.ms/azsdk/python/tables/docs) | [Product documentation](https://docs.microsoft.com/azure/storage/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) +[Source code][source_code] | [Package (PyPI)][Tables_pypi] | [API reference documentation][Tables_ref_docs] | [Samples][Tables_samples] ## Getting started +The Azure Data Tables can be accessed using an Azure Storage or a CosmosDB account. ### Prerequisites * Python 2.7, or 3.5 or later is required to use this package. -* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an -[Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) to use this package - or you must have a [Azure Cosmos Account](https://docs.microsoft.com/en-us/azure/cosmos-db/account-overview). - -### Install the package -Install the Azure Data Tables client library for Python with [pip](https://pypi.org/project/pip/): - -```bash -pip install --pre azure-data-tables -``` +* You must have an [Azure subscription][azure_subscription] and either + * an [Azure storage account][azure_storage_account] or + * an [Azure Cosmos Account][azure_cosmos_account]. -### Create a storage account -If you wish to create a new cosmos storage account, you can use the [Azure Cosmos DB](https://docs.microsoft.com/en-us/azure/cosmos-db/create-cosmosdb-resources-portal) -If you wish to create a new storage account, you can use the -[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal), -[Azure PowerShell](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell), -or [Azure CLI](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli): +#### Create a storage account +If you wish to create a new storage account, you can use [Azure Portal][azure_portal_create_account], +[Azure PowerShell][azure_powershell_create_account], or [Azure CLI][azure_cli_create_account]: ```bash # Create a new resource group to hold the storage account - # if using an existing resource group, skip this step az group create --name MyResourceGroup --location westus2 - # Create the storage account -az storage account create -n mystorageaccount -g MyResourceGroup +az storage account create -n MyStorageAccount -g MyResourceGroup ``` -### Create the client +#### Creating a Cosmos DB +If you wish to create a new cosmos storage account, you can use [Azure Cosmos DB][azure_create_cosmos]. +Create a Cosmos DB account `MyCosmosDBDatabaseAccount` in resource group `MyResourceGroup` in the subscription `MySubscription` and a table named `MyTableName` in the account. +```bash +az cosmosdb create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --subscription MySubscription +az cosmosdb table create --name MyTableName --resource-group MyResourceGroup --acount-name MyCosmosDBDatabaseAccount +``` + + +### Install the package +Install the Azure Data Tables client library for Python with [pip][pip_link]: + +```bash +pip install --pre azure-data-tables +``` + + +#### Create the client The Azure Data Tables client library for Python allows you to interact with two types of resources: the -account and tables, and entities. Interaction with these resources starts with an instance of a [client](#clients). -To create a client object, you will need the account's table service endpoint URL and a credential that allows -you to access the account: +tables in your account, and the entities within the tables. Interaction with these resources starts with an +instance of a [client](#clients). To create a client object, you will need the account's table service +endpoint URL and a credential that allows you to access the account: ```python from azure.data.tables import TableServiceClient - service = TableServiceClient(account_url="https://.table.core.windows.net/", credential=credential) ``` -#### Looking up the account URL -You can find the account's table service URL using the -[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints), -[Azure PowerShell](https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount), -or [Azure CLI](https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show): - ```bash # Get the table service URL for the account az storage account show -n mystorageaccount -g MyResourceGroup --query "primaryEndpoints.table" ``` #### Types of credentials -The `credential` parameter may be provided in a number of different forms, depending on the type of -[authorization](https://docs.microsoft.com/azure/storage/common/storage-auth) you wish to use: -1. To use a [shared access signature (SAS) token](https://docs.microsoft.com/azure/storage/common/storage-sas-overview), - provide the token as a string. If your account URL includes the SAS token, omit the credential parameter. - You can generate a SAS token from the Azure Portal under "Shared access signature" or use one of the `generate_sas()` +The `credential` parameter may be provided in a number of different forms, depending on the type of authorization you wish to use: + +##### Creating the client from a SAS token +To use a [shared access signature (SAS) token][azure_sas_token], provide the token as a string. If your account URL includes the SAS token, omit the credential parameter. You can generate a SAS token from the Azure Portal under [Shared access signature](https://docs.microsoft.com/en-us/rest/api/storageservices/create-service-sas) or use one of the `generate_*_sas()` functions to create a sas token for the account or table: ```python from datetime import datetime, timedelta from azure.data.tables import TableServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions - + sas_token = generate_account_sas( account_name="", account_key="", @@ -85,41 +78,56 @@ The `credential` parameter may be provided in a number of different forms, depen permission=AccountSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1) ) - + table_service_client = TableServiceClient(account_url="https://.table.core.windows.net", credential=sas_token) ``` -2. To use an account [shared key](https://docs.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/) - (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the "Access Keys" - section or by running the following Azure CLI command: +##### Creating the client from a shared key +To use an account [shared key][azure_shared_key] (aka account key or access key), provide the key as a string. This can be found in the [Azure Portal][azure_portal_account_url] under the "Access Keys" section or by running the following Azure CLI command: - ```az storage account keys list -g MyResourceGroup -n mystorageaccount``` +```az storage account keys list -g MyResourceGroup -n MyStorageAccount``` - Use the key as the credential parameter to authenticate the client: - ```python +Use the key as the credential parameter to authenticate the client: +```python from azure.data.tables import TableServiceClient service = TableServiceClient(account_url="https://.table.core.windows.net", credential="") - ``` +``` -#### Creating the client from a connection string +##### Creating the client from a connection string Depending on your use case and authorization method, you may prefer to initialize a client instance with a -connection string instead of providing the account URL and credential separately. To do this, pass the +connection string instead of providing the account URL and credential separately. To do this, pass the connection string to the client's `from_connection_string` class method: ```python -from azure.data.tables import TableServiceClient - -connection_string = "DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net" -service = TableServiceClient.from_connection_string(conn_str=connection_string) + from azure.data.tables import TableServiceClient + connection_string = "DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net" + service = TableServiceClient.from_connection_string(conn_str=connection_string) ``` The connection string to your account can be found in the Azure Portal under the "Access Keys" section or by running the following CLI command: ```bash -az storage account show-connection-string -g MyResourceGroup -n mystorageaccount +az storage account show-connection-string -g MyResourceGroup -n MyStorageAccount +``` + +#### Looking up the account URL +You can find the account's table service URL using the +[Azure Portal][azure_portal_account_url], +[Azure PowerShell][azure_powershell_account_url], +or [Azure CLI][azure_cli_account_url]: + +```bash +# Get the table service URL for the account +az storage account show -n MyStorageAccount -g MyResourceGroup --query "primaryEndpoints.table" ``` ## Key concepts +Common uses of the Table service included: +* Storing TBs of structured data capable of serving web scale applications +* Storing datasets that do not require complex joins, foreign keys, or stored procedures and can be de-normalized for fast access +* Quickly querying data using a clustered index +* Accessing data using the OData protocol and LINQ filter expressions + The following components make up the Azure Data Tables Service: * The account * A table within the account, which contains a set of entities @@ -129,24 +137,25 @@ The Azure Data Tables client library for Python allows you to interact with each use of a dedicated client object. ### Clients -Two different clients are provided to to interact with the various components of the Table Service: -1. [TableServiceClient](https://aka.ms/azsdk/python/tables/docs) - +Two different clients are provided to interact with the various components of the Table Service: +1. `TableServiceClient` - this client represents interaction with the Azure account itself, and allows you to acquire preconfigured client instances to access the tables within. It provides operations to retrieve and configure the account properties as well as query, create, and delete tables within the account. To perform operations on a specific table, retrieve a client using the `get_table_client` method. -2. [TableClient](https://aka.ms/azsdk/python/tables/docs) - +2. `TableClient` - this client represents interaction with a specific table (which need not exist yet). It provides operations to create, delete, or update a table and includes operations to query, get, and upsert entities within it. - + ### Entities +Entities are similar to rows. An entity has a primary key, a row key and a set of properties. A property is a name value pair, similar to a column. * **Create** - Adds an entity to the table. * **Delete** - Deletes an entity from the table. * **Update** - Updates an entities information by either merging or replacing the existing entity. * **Query** - Queries existing entities in a table based off of the QueryOptions (OData). * **Get** - Gets a specific entity from a table by partition and row key. -* **Upsert** - Merges or replaces an entity in a table, or if the entity does not exist, inserts the entity. +* **Upsert** - Merges or replaces an entity in a table, or if the entity does not exist, inserts the entity. ## Examples @@ -162,7 +171,6 @@ Create a table in your account ```python from azure.data.tables import TableServiceClient - table_service_client = TableServiceClient.from_connection_string(conn_str="") table_service_client.create_table(table_name="myTable") ``` @@ -172,9 +180,7 @@ Create entities in the table ```python from azure.data.tables import TableClient - my_entity = {'PartitionKey':'part','RowKey':'row'} - table_client = TableClient.from_connection_string(conn_str="", table_name="myTable") entity = table_client.create_entity(entity=my_entity) ``` @@ -184,16 +190,15 @@ Querying entities in the table ```python from azure.data.tables import TableClient - -my_filter = "text eq Marker" - +my_filter = "text eq 'Marker'" table_client = TableClient.from_connection_string(conn_str="", table_name="mytable") entity = table_client.query_entities(filter=my_filter) ``` + ## Optional Configuration -Optional keyword arguments can be passed in at the client and per-operation level. The azure-core [reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html) describes available configurations for retries, logging, transport protocols, and more. +Optional keyword arguments can be passed in at the client and per-operation level. The azure-core [reference documentation][azure_core_ref_docs] describes available configurations for retries, logging, transport protocols, and more. ### Retry Policy configuration @@ -230,13 +235,26 @@ the client level to enable it for all requests. ## Troubleshooting + ### General -Azure Data Tables clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md). -All Table service operations will throw a `HttpResponseError` on failure with helpful [error codes](https://docs.microsoft.com/en-us/rest/api/storageservices/table-service-error-codes). +Azure Data Tables clients raise exceptions defined in [Azure Core][azure_core_readme]. +When you interact with the Azure table library using the Python SDK, errors returned by the service respond ot the same HTTP status codes for [REST API][tables_rest] requests. The Table service operations will throw a `HttpResponseError` on failure with helpful [error codes][tables_error_codes]. +For examples, if you try to create a table that already exists, a `409` error is returned indicating "Conflict". +```python +service_client = TableServiceClient(connection_string) + +# Create the table if it does not already exist +tc = service_client.create_table_if_not_exists(table_name) + +try: + service_client.create_table(table_name) +except HttpResponseError: + print("Table with name {} already exists".format(table_name)) +``` ### Logging This library uses the standard -[logging](https://docs.python.org/3/library/logging.html) library for logging. +[logging][python_logging] library for logging. Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO level. @@ -246,9 +264,8 @@ headers, can be enabled on a client with the `logging_enable` argument: import sys import logging from azure.data.tables import TableServiceClient - -# Create a logger for the 'azure.data.tables' SDK -logger = logging.getLogger('azure.data.tables') +# Create a logger for the 'azure' SDK +logger = logging.getLogger('azure') logger.setLevel(logging.DEBUG) # Configure a console output @@ -262,38 +279,72 @@ service_client = TableServiceClient.from_connection_string("your_connection_stri Similarly, `logging_enable` can enable detailed logging for a single operation, even when it isn't enabled for the client: ```py -service_client.get_service_stats(logging_enable=True) +service_client.create_entity(entity=my_entity, logging_enable=True) ``` ## Next steps -Get started with our [Table samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk). - -Several Azure Data Tables Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Tables: - -* [table_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) - Examples found in this article: - * From a connection string - * From a shared access key - * From a shared access signature token -* [table_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) - Examples found in this article: - * Get and set service properties - * List tables in a account - * Create and delete a table from the service - * Get the TableClient -* [table_samples_client.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) - Examples found in this article: - * Client creation - * Create a table - * Create and Delete entities - * Query entities - * Update entities - * Upsert entities - +Get started with our [Table samples][tables_samples]. + +Several Azure Data Tables Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Tables. + +### Common Scenarios +These code samples show common scenario operations with the Azure Data tables client library. The async versions of the samples (the python sample files appended with _async) show asynchronous operations with Tables and require Python 3.5 or later. + +* Create and delete tables: [sample_create_delete_table.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py)) +* List and query tables: [sample_query_tables.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_query_tables.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py)) +* Insert and delete entities: [sample_insert_delete_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py)) +* Query and list entities: [sample_query_tables.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_query_tables.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py)) +* Update, upsert, and merge entities: [sample_update_upsert_merge_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py)) + ### Additional documentation -For more extensive documentation on Azure Data Tables, see the [Azure Data Tables documentation](https://docs.microsoft.com/azure/storage/tables/) on docs.microsoft.com. +For more extensive documentation on Azure Data Tables, see the [Azure Data Tables documentation][Tables_product_doc] on docs.microsoft.com. + +## Known Issues +A list of currently known issues relating to Cosmos DB table endpoints can be found [here](https://aka.ms/tablesknownissues). ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +This project has adopted the [Microsoft Open Source Code of Conduct][msft_oss_coc]. For more information see the [Code of Conduct FAQ][msft_oss_coc_faq] or contact [opencode@microsoft.com][contact_msft_oss] with any additional questions or comments. + + +[source_code]:https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables +[Tables_pypi]:https://aka.ms/azsdk/python/tablespypi +[Tables_ref_docs]:https://aka.ms/azsdk/python/tablesgitdocs +[Tables_product_doc]:https://docs.microsoft.com/en-us/azure/cosmos-db/table-introduction +[Tables_samples]:https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples + +[azure_subscription]:https://azure.microsoft.com/en-us/free/ +[azure_storage_account]:https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal +[azure_cosmos_account]: https://docs.microsoft.com/en-us/azure/cosmos-db/account-overview +[pip_link]:https://pypi.org/project/pip/ + +[azure_create_cosmos]:https://docs.microsoft.com/en-us/azure/cosmos-db/create-cosmosdb-resources-portal +[azure_portal_create_account]:https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal +[azure_powershell_create_account]:https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-powershell +[azure_cli_create_account]: https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-cli + +[azure_cli_account_url]:https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show +[azure_powershell_account_url]:https://docs.microsoft.com/en-us/powershell/module/az.storage/get-azstorageaccount?view=azps-4.6.1 +[azure_portal_account_url]:https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview#storage-account-endpoints + +[azure_sas_token]:https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview +[azure_shared_key]:https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key + + +[azure_core_ref_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html +[azure_core_readme]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md + +[python_logging]: https://docs.python.org/3/library/logging.html +[tables_error_codes]: https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes + +[msft_oss_coc]:https://opensource.microsoft.com/codeofconduct/ +[msft_oss_coc_faq]:https://opensource.microsoft.com/codeofconduct/faq/ +[contact_msft_oss]:mailto:opencode@microsoft.com + +[tables_rest]: https://docs.microsoft.com/en-us/rest/api/storageservices/table-service-rest-api + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/tables/azure-data-tables/README.png) diff --git a/sdk/tables/azure-data-tables/azure/__init__.py b/sdk/tables/azure-data-tables/azure/__init__.py index 59cb701465720..0d1f7edf5dc63 100644 --- a/sdk/tables/azure-data-tables/azure/__init__.py +++ b/sdk/tables/azure-data-tables/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: str +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore diff --git a/sdk/tables/azure-data-tables/azure/data/__init__.py b/sdk/tables/azure-data-tables/azure/data/__init__.py index 59cb701465720..0d1f7edf5dc63 100644 --- a/sdk/tables/azure-data-tables/azure/data/__init__.py +++ b/sdk/tables/azure-data-tables/azure/data/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: str +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore diff --git a/sdk/tables/azure-data-tables/azure/data/tables/__init__.py b/sdk/tables/azure-data-tables/azure/data/tables/__init__.py index 5424c62cb7cab..4a424ceaf5525 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/__init__.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/__init__.py @@ -19,7 +19,7 @@ CorsRule, UpdateMode, SASProtocol, - Table, + TableItem, LocationMode, ResourceTypes, AccountSasPermissions, @@ -47,7 +47,7 @@ 'generate_account_sas', 'CorsRule', 'UpdateMode', - 'Table', + 'TableItem', 'TableEntity', 'EntityProperty', 'EdmType', diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py index af7a125d5082f..49eb7f5bf3f73 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py @@ -50,11 +50,12 @@ StorageRequestHook, StorageResponseHook, StorageLoggingPolicy, - StorageHosts, ExponentialRetry, + StorageHosts, + TablesRetryPolicy, ) -from ._version import VERSION from ._error import _process_table_error from ._models import PartialBatchErrorException +from ._sdk_moniker import SDK_MONIKER _LOGGER = logging.getLogger(__name__) @@ -337,7 +338,7 @@ def format_shared_key_credential(account, credential): return credential -def parse_connection_str(conn_str, credential, service): +def parse_connection_str(conn_str, credential, service, keyword_args): conn_str = conn_str.rstrip(";") conn_settings = [s.split("=", 1) for s in conn_str.split(";")] if any(len(tup) != 2 for tup in conn_settings): @@ -378,16 +379,20 @@ def parse_connection_str(conn_str, credential, service): ) except KeyError: raise ValueError("Connection string missing required connection details.") - return primary, secondary, credential + + if 'secondary_hostname' not in keyword_args: + keyword_args['secondary_hostname'] = secondary + + return primary, credential def create_configuration(**kwargs): # type: (**Any) -> Configuration config = Configuration(**kwargs) config.headers_policy = StorageHeadersPolicy(**kwargs) - config.user_agent_policy = UserAgentPolicy( - sdk_moniker="storage-{}/{}".format(kwargs.pop('storage_sdk'), VERSION), **kwargs) - config.retry_policy = kwargs.get("retry_policy") or ExponentialRetry(**kwargs) + config.user_agent_policy = UserAgentPolicy(sdk_moniker=SDK_MONIKER, **kwargs) + # sdk_moniker="storage-{}/{}".format(kwargs.pop('storage_sdk'), VERSION), **kwargs) + config.retry_policy = kwargs.get("retry_policy") or TablesRetryPolicy(**kwargs) config.logging_policy = StorageLoggingPolicy(**kwargs) config.proxy_policy = ProxyPolicy(**kwargs) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_constants.py b/sdk/tables/azure-data-tables/azure/data/tables/_constants.py index c8f85fca9e14f..7994a03f43ae6 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_constants.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_constants.py @@ -3,15 +3,8 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import platform import sys -from ._generated.version import VERSION - -# UserAgent string sample: 'Azure-Storage/0.37.0-0.38.0 (Python CPython 3.4.2; Windows 8)' -# First version(0.37.0) is the common package, and the second version(0.38.0) is the service package -USER_AGENT_STRING_SUFFIX = '(Python {} {}; {} {})'.format(platform.python_implementation(), - platform.python_version(), platform.system(), - platform.release()) +from ._generated._version import VERSION # default values for common package, in case it is used directly DEFAULT_X_MS_VERSION = '2018-03-28' diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py b/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py index fa65406bcbded..2d79e2023a6c5 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py @@ -16,7 +16,6 @@ from ._entity import EntityProperty, EdmType, TableEntity from ._common_conversion import _decode_base64_to_bytes -from ._generated.models import TableProperties from ._error import TableErrorCode if TYPE_CHECKING: @@ -62,11 +61,11 @@ def _deserialize_table_creation(response, _, headers): def _from_entity_binary(value): - return EntityProperty(EdmType.BINARY, _decode_base64_to_bytes(value)) + return EntityProperty(_decode_base64_to_bytes(value)) def _from_entity_int32(value): - return EntityProperty(EdmType.INT32, int(value)) + return EntityProperty(int(value)) zero = datetime.timedelta(0) # same as 00:00 @@ -160,7 +159,7 @@ def _convert_to_entity(entry_element): mtype = edmtypes.get(name) # Add type for Int32 - if type(value) is int: # pylint:disable=C0123 + if type(value) is int and mtype is None: # pylint:disable=C0123 mtype = EdmType.INT32 # no type info, property should parse automatically @@ -207,3 +206,12 @@ def _return_headers_and_deserialized(response, deserialized, response_headers): def _return_context_and_deserialized(response, deserialized, response_headers): # pylint: disable=unused-argument return response.http_response.location_mode, deserialized, response_headers + + +def _trim_service_metadata(metadata): + # type: (dict[str,str] -> None) + return { + "date": metadata.pop("date", None), + "etag": metadata.pop("etag", None), + "version": metadata.pop("version", None) + } diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_entity.py b/sdk/tables/azure-data-tables/azure/data/tables/_entity.py index faed3d8ae4536..2567d92b62185 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_entity.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_entity.py @@ -4,8 +4,11 @@ # license information. # -------------------------------------------------------------------------- from enum import Enum +from datetime import datetime +from uuid import UUID +import six -from ._error import _ERROR_ATTRIBUTE_MISSING +from ._error import _ERROR_ATTRIBUTE_MISSING, _ERROR_VALUE_TOO_LARGE class TableEntity(dict): @@ -75,17 +78,44 @@ class EntityProperty(object): """ def __init__(self, - type=None, # type: Union[str,EdmType] # pylint:disable=W0622 - value=None # type: Any - ): + value=None, # type: Any + type=None, # type: Union[str,EdmType] # pylint:disable=W0622 + ): """ Represents an Azure Table. Returned by list_tables. :param Union[str, EdmType] type: The type of the property. :param Any value: The value of the property. """ - self.type = type self.value = value + if type is not None: + self.type = type + elif isinstance(value, six.text_type): + try: + self.value = UUID(value) + self.type = EdmType.GUID + except ValueError: + self.type = EdmType.STRING + elif isinstance(value, six.binary_type): + self.type = EdmType.BINARY + elif isinstance(value, bool): + self.type = EdmType.BOOLEAN + elif isinstance(value, six.integer_types): + if value.bit_length() <= 32: + self.type = EdmType.INT32 + else: + raise TypeError(_ERROR_VALUE_TOO_LARGE.format(str(value), EdmType.INT32)) + elif isinstance(value, datetime): + self.type = EdmType.DATETIME + elif isinstance(value, float): + self.type = EdmType.DOUBLE + else: + raise ValueError( + """Type of {} could not be inferred. Acceptable types are bytes, int, uuid.UUID, + datetime, string, int32, int64, float, and boolean. Refer to + azure.data.tables.EdmType for more information. + """.format(value) + ) class EdmType(str, Enum): diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/__init__.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/__init__.py index 38dbb2a7267bb..62c47d0d219e4 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/__init__.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/__init__.py @@ -1,14 +1,19 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- from ._azure_table import AzureTable +from ._version import VERSION + +__version__ = VERSION __all__ = ['AzureTable'] try: - from ._patch import patch_sdk + from ._patch import patch_sdk # type: ignore patch_sdk() except ImportError: pass diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/_azure_table.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/_azure_table.py index b9331513f6f5c..7d6f16f78721b 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/_azure_table.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/_azure_table.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- @@ -23,12 +25,11 @@ class AzureTable(object): """AzureTable. :ivar table: TableOperations operations - :vartype table: azure_table.operations.TableOperations + :vartype table: azure.data.tables.operations.TableOperations :ivar service: ServiceOperations operations - :vartype service: azure_table.operations.ServiceOperations - :param url: The URL of the service account or table that is the targe of the desired operation. + :vartype service: azure.data.tables.operations.ServiceOperations + :param url: The URL of the service account or table that is the target of the desired operation. :type url: 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/tables/azure-data-tables/azure/data/tables/_generated/_configuration.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/_configuration.py index f822bc3d1ad04..833b1374a2a0e 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/_configuration.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/_configuration.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- @@ -9,11 +11,12 @@ 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 -VERSION = "unknown" class AzureTableConfiguration(Configuration): """Configuration for AzureTable. @@ -21,7 +24,7 @@ class AzureTableConfiguration(Configuration): Note that all parameters used to create this instance are saved as instance attributes. - :param url: The URL of the service account or table that is the targe of the desired operation. + :param url: The URL of the service account or table that is the target of the desired operation. :type url: str """ @@ -37,7 +40,7 @@ def __init__( self.url = url self.version = "2019-02-02" - kwargs.setdefault('sdk_moniker', 'azuretable/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'data-tables/{}'.format(VERSION)) self._configure(**kwargs) def _configure( @@ -49,6 +52,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/_version.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/_version.py new file mode 100644 index 0000000000000..0a99d31fccc0e --- /dev/null +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2019-02-02" diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/__init__.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/__init__.py index 4c1512d94a8a1..5029783fe86b6 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/__init__.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/__init__.py @@ -1,10 +1,10 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# 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. +# -------------------------------------------------------------------------- + +from ._azure_table import AzureTable __all__ = ['AzureTable'] - -from ._azure_table_async import AzureTable - - diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_azure_table.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_azure_table.py new file mode 100644 index 0000000000000..c2f6e6333d444 --- /dev/null +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_azure_table.py @@ -0,0 +1,57 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core import AsyncPipelineClient +from msrest import Deserializer, Serializer + +from ._configuration import AzureTableConfiguration +from .operations import TableOperations +from .operations import ServiceOperations +from .. import models + + +class AzureTable(object): + """AzureTable. + + :ivar table: TableOperations operations + :vartype table: azure.data.tables.aio.operations.TableOperations + :ivar service: ServiceOperations operations + :vartype service: azure.data.tables.aio.operations.ServiceOperations + :param url: The URL of the service account or table that is the target of the desired operation. + :type url: str + """ + + def __init__( + self, + url: str, + **kwargs: Any + ) -> None: + base_url = '{url}' + self._config = AzureTableConfiguration(url, **kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.table = TableOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AzureTable": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_azure_table_async.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_azure_table_async.py deleted file mode 100644 index 1b3c4d87d19cc..0000000000000 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_azure_table_async.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core import AsyncPipelineClient -from msrest import Deserializer, Serializer - -from ._configuration_async import AzureTableConfiguration -from .operations_async import TableOperations -from .operations_async import ServiceOperations -from .. import models - - -class AzureTable(object): - """AzureTable. - - :ivar table: TableOperations operations - :vartype table: azure_table.aio.operations_async.TableOperations - :ivar service: ServiceOperations operations - :vartype service: azure_table.aio.operations_async.ServiceOperations - :param url: The URL of the service account or table that is the targe of the desired operation. - :type url: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - url: str, - **kwargs: Any - ) -> None: - base_url = '{url}' - self._config = AzureTableConfiguration(url, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.table = TableOperations( - self._client, self._config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "AzureTable": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration.py new file mode 100644 index 0000000000000..f77481ec16262 --- /dev/null +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration.py @@ -0,0 +1,53 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from .._version import VERSION + + +class AzureTableConfiguration(Configuration): + """Configuration for AzureTable. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param url: The URL of the service account or table that is the target of the desired operation. + :type url: str + """ + + def __init__( + self, + url: str, + **kwargs: Any + ) -> None: + if url is None: + raise ValueError("Parameter 'url' must not be None.") + super(AzureTableConfiguration, self).__init__(**kwargs) + + self.url = url + self.version = "2019-02-02" + kwargs.setdefault('sdk_moniker', 'data-tables/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration_async.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration_async.py deleted file mode 100644 index d2581e2463c92..0000000000000 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration_async.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies - -VERSION = "unknown" - -class AzureTableConfiguration(Configuration): - """Configuration for AzureTable. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param url: The URL of the service account or table that is the targe of the desired operation. - :type url: str - """ - - def __init__( - self, - url: str, - **kwargs: Any - ) -> None: - if url is None: - raise ValueError("Parameter 'url' must not be None.") - super(AzureTableConfiguration, self).__init__(**kwargs) - - self.url = url - self.version = "2019-02-02" - kwargs.setdefault('sdk_moniker', 'azuretable/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/__init__.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/__init__.py new file mode 100644 index 0000000000000..774e1c0d97a45 --- /dev/null +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/__init__.py @@ -0,0 +1,15 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._table_operations import TableOperations +from ._service_operations import ServiceOperations + +__all__ = [ + 'TableOperations', + 'ServiceOperations', +] diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_service_operations.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_service_operations.py new file mode 100644 index 0000000000000..bc2008e9e7557 --- /dev/null +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_service_operations.py @@ -0,0 +1,252 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations: + """ServiceOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.data.tables.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def set_properties( + self, + table_service_properties: "models.TableServiceProperties", + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + **kwargs + ) -> None: + """Sets properties for an account's Table service endpoint, including properties for Analytics and + CORS (Cross-Origin Resource Sharing) rules. + + :param table_service_properties: The Table Service properties. + :type table_service_properties: ~azure.data.tables.models.TableServiceProperties + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + restype = "service" + comp = "properties" + content_type = kwargs.pop("content_type", "application/xml") + accept = "application/xml" + + # Construct URL + url = self.set_properties.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['restype'] = self._serialize.query("restype", restype, 'str') + query_parameters['comp'] = self._serialize.query("comp", comp, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(table_service_properties, 'TableServiceProperties', is_xml=True) + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + + if cls: + return cls(pipeline_response, None, response_headers) + + set_properties.metadata = {'url': '/'} # type: ignore + + async def get_properties( + self, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + **kwargs + ) -> "models.TableServiceProperties": + """Gets the properties of an account's Table service, including properties for Analytics and CORS + (Cross-Origin Resource Sharing) rules. + + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TableServiceProperties, or the result of cls(response) + :rtype: ~azure.data.tables.models.TableServiceProperties + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TableServiceProperties"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + restype = "service" + comp = "properties" + accept = "application/xml" + + # Construct URL + url = self.get_properties.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['restype'] = self._serialize.query("restype", restype, 'str') + query_parameters['comp'] = self._serialize.query("comp", comp, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + deserialized = self._deserialize('TableServiceProperties', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get_properties.metadata = {'url': '/'} # type: ignore + + async def get_statistics( + self, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + **kwargs + ) -> "models.TableServiceStats": + """Retrieves statistics related to replication for the Table service. It is only available on the + secondary location endpoint when read-access geo-redundant replication is enabled for the + account. + + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TableServiceStats, or the result of cls(response) + :rtype: ~azure.data.tables.models.TableServiceStats + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TableServiceStats"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + restype = "service" + comp = "stats" + accept = "application/xml" + + # Construct URL + url = self.get_statistics.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['restype'] = self._serialize.query("restype", restype, 'str') + query_parameters['comp'] = self._serialize.query("comp", comp, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + deserialized = self._deserialize('TableServiceStats', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get_statistics.metadata = {'url': '/'} # type: ignore diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_table_operations.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_table_operations.py new file mode 100644 index 0000000000000..ba6c4969fc15e --- /dev/null +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_table_operations.py @@ -0,0 +1,1046 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class TableOperations: + """TableOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.data.tables.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def query( + self, + request_id_parameter: Optional[str] = None, + next_table_name: Optional[str] = None, + query_options: Optional["models.QueryOptions"] = None, + **kwargs + ) -> "models.TableQueryResponse": + """Queries tables under the given account. + + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param next_table_name: A table query continuation token from a previous call. + :type next_table_name: str + :param query_options: Parameter group. + :type query_options: ~azure.data.tables.models.QueryOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TableQueryResponse, or the result of cls(response) + :rtype: ~azure.data.tables.models.TableQueryResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TableQueryResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _format = None + _top = None + _select = None + _filter = None + if query_options is not None: + _format = query_options.format + _top = query_options.top + _select = query_options.select + _filter = query_options.filter + data_service_version = "3.0" + accept = "application/json;odata=minimalmetadata" + + # Construct URL + url = self.query.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if _format is not None: + query_parameters['$format'] = self._serialize.query("format", _format, 'str') + if _top is not None: + query_parameters['$top'] = self._serialize.query("top", _top, 'int', minimum=0) + if _select is not None: + query_parameters['$select'] = self._serialize.query("select", _select, 'str') + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + if next_table_name is not None: + query_parameters['NextTableName'] = self._serialize.query("next_table_name", next_table_name, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['x-ms-continuation-NextTableName']=self._deserialize('str', response.headers.get('x-ms-continuation-NextTableName')) + deserialized = self._deserialize('TableQueryResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + query.metadata = {'url': '/Tables'} # type: ignore + + async def create( + self, + table_properties: "models.TableProperties", + request_id_parameter: Optional[str] = None, + response_preference: Optional[Union[str, "models.ResponseFormat"]] = None, + query_options: Optional["models.QueryOptions"] = None, + **kwargs + ) -> Optional["models.TableResponse"]: + """Creates a new table under the given account. + + :param table_properties: The Table properties. + :type table_properties: ~azure.data.tables.models.TableProperties + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param response_preference: Specifies whether the response should include the inserted entity + in the payload. Possible values are return-no-content and return-content. + :type response_preference: str or ~azure.data.tables.models.ResponseFormat + :param query_options: Parameter group. + :type query_options: ~azure.data.tables.models.QueryOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TableResponse, or the result of cls(response) + :rtype: ~azure.data.tables.models.TableResponse or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TableResponse"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _format = None + if query_options is not None: + _format = query_options.format + data_service_version = "3.0" + content_type = kwargs.pop("content_type", "application/json;odata=nometadata") + accept = "application/json;odata=minimalmetadata" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if _format is not None: + query_parameters['$format'] = self._serialize.query("format", _format, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') + if response_preference is not None: + header_parameters['Prefer'] = self._serialize.header("response_preference", response_preference, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(table_properties, 'TableProperties') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + deserialized = None + if response.status_code == 201: + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['Preference-Applied']=self._deserialize('str', response.headers.get('Preference-Applied')) + deserialized = self._deserialize('TableResponse', pipeline_response) + + if response.status_code == 204: + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['Preference-Applied']=self._deserialize('str', response.headers.get('Preference-Applied')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create.metadata = {'url': '/Tables'} # type: ignore + + async def delete( + self, + table: str, + request_id_parameter: Optional[str] = None, + **kwargs + ) -> None: + """Operation permanently deletes the specified table. + + :param table: The name of the table. + :type table: str + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + + if cls: + return cls(pipeline_response, None, response_headers) + + delete.metadata = {'url': '/Tables(\'{table}\')'} # type: ignore + + async def query_entities( + self, + table: str, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + next_partition_key: Optional[str] = None, + next_row_key: Optional[str] = None, + query_options: Optional["models.QueryOptions"] = None, + **kwargs + ) -> "models.TableEntityQueryResponse": + """Queries entities in a table. + + :param table: The name of the table. + :type table: str + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param next_partition_key: An entity query continuation token from a previous call. + :type next_partition_key: str + :param next_row_key: An entity query continuation token from a previous call. + :type next_row_key: str + :param query_options: Parameter group. + :type query_options: ~azure.data.tables.models.QueryOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TableEntityQueryResponse, or the result of cls(response) + :rtype: ~azure.data.tables.models.TableEntityQueryResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TableEntityQueryResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _format = None + _top = None + _select = None + _filter = None + if query_options is not None: + _format = query_options.format + _top = query_options.top + _select = query_options.select + _filter = query_options.filter + data_service_version = "3.0" + accept = "application/json;odata=minimalmetadata" + + # Construct URL + url = self.query_entities.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + if _format is not None: + query_parameters['$format'] = self._serialize.query("format", _format, 'str') + if _top is not None: + query_parameters['$top'] = self._serialize.query("top", _top, 'int', minimum=0) + if _select is not None: + query_parameters['$select'] = self._serialize.query("select", _select, 'str') + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + if next_partition_key is not None: + query_parameters['NextPartitionKey'] = self._serialize.query("next_partition_key", next_partition_key, 'str') + if next_row_key is not None: + query_parameters['NextRowKey'] = self._serialize.query("next_row_key", next_row_key, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['x-ms-continuation-NextPartitionKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextPartitionKey')) + response_headers['x-ms-continuation-NextRowKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextRowKey')) + deserialized = self._deserialize('TableEntityQueryResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + query_entities.metadata = {'url': '/{table}()'} # type: ignore + + async def query_entities_with_partition_and_row_key( + self, + table: str, + partition_key: str, + row_key: str, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + query_options: Optional["models.QueryOptions"] = None, + **kwargs + ) -> Dict[str, object]: + """Queries entities in a table. + + :param table: The name of the table. + :type table: str + :param partition_key: The partition key of the entity. + :type partition_key: str + :param row_key: The row key of the entity. + :type row_key: str + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param query_options: Parameter group. + :type query_options: ~azure.data.tables.models.QueryOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: dict mapping str to object, or the result of cls(response) + :rtype: dict[str, object] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, object]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _format = None + _select = None + _filter = None + if query_options is not None: + _format = query_options.format + _select = query_options.select + _filter = query_options.filter + data_service_version = "3.0" + accept = "application/json;odata=minimalmetadata" + + # Construct URL + url = self.query_entities_with_partition_and_row_key.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + 'partitionKey': self._serialize.url("partition_key", partition_key, 'str'), + 'rowKey': self._serialize.url("row_key", row_key, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + if _format is not None: + query_parameters['$format'] = self._serialize.query("format", _format, 'str') + if _select is not None: + query_parameters['$select'] = self._serialize.query("select", _select, 'str') + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + response_headers['x-ms-continuation-NextPartitionKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextPartitionKey')) + response_headers['x-ms-continuation-NextRowKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextRowKey')) + deserialized = self._deserialize('{object}', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + query_entities_with_partition_and_row_key.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore + + async def update_entity( + self, + table: str, + partition_key: str, + row_key: str, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + if_match: Optional[str] = None, + table_entity_properties: Optional[Dict[str, object]] = None, + query_options: Optional["models.QueryOptions"] = None, + **kwargs + ) -> None: + """Update entity in a table. + + :param table: The name of the table. + :type table: str + :param partition_key: The partition key of the entity. + :type partition_key: str + :param row_key: The row key of the entity. + :type row_key: str + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param if_match: Match condition for an entity to be updated. If specified and a matching + entity is not found, an error will be raised. To force an unconditional update, set to the + wildcard character (*). If not specified, an insert will be performed when no existing entity + is found to update and a replace will be performed if an existing entity is found. + :type if_match: str + :param table_entity_properties: The properties for the table entity. + :type table_entity_properties: dict[str, object] + :param query_options: Parameter group. + :type query_options: ~azure.data.tables.models.QueryOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _format = None + if query_options is not None: + _format = query_options.format + data_service_version = "3.0" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_entity.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + 'partitionKey': self._serialize.url("partition_key", partition_key, 'str'), + 'rowKey': self._serialize.url("row_key", row_key, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + if _format is not None: + query_parameters['$format'] = self._serialize.query("format", _format, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if table_entity_properties is not None: + body_content = self._serialize.body(table_entity_properties, '{object}') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + + if cls: + return cls(pipeline_response, None, response_headers) + + update_entity.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore + + async def merge_entity( + self, + table: str, + partition_key: str, + row_key: str, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + if_match: Optional[str] = None, + table_entity_properties: Optional[Dict[str, object]] = None, + query_options: Optional["models.QueryOptions"] = None, + **kwargs + ) -> None: + """Merge entity in a table. + + :param table: The name of the table. + :type table: str + :param partition_key: The partition key of the entity. + :type partition_key: str + :param row_key: The row key of the entity. + :type row_key: str + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param if_match: Match condition for an entity to be updated. If specified and a matching + entity is not found, an error will be raised. To force an unconditional update, set to the + wildcard character (*). If not specified, an insert will be performed when no existing entity + is found to update and a merge will be performed if an existing entity is found. + :type if_match: str + :param table_entity_properties: The properties for the table entity. + :type table_entity_properties: dict[str, object] + :param query_options: Parameter group. + :type query_options: ~azure.data.tables.models.QueryOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _format = None + if query_options is not None: + _format = query_options.format + data_service_version = "3.0" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.merge_entity.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + 'partitionKey': self._serialize.url("partition_key", partition_key, 'str'), + 'rowKey': self._serialize.url("row_key", row_key, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + if _format is not None: + query_parameters['$format'] = self._serialize.query("format", _format, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if table_entity_properties is not None: + body_content = self._serialize.body(table_entity_properties, '{object}') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + + if cls: + return cls(pipeline_response, None, response_headers) + + merge_entity.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore + + async def delete_entity( + self, + table: str, + partition_key: str, + row_key: str, + if_match: str, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + query_options: Optional["models.QueryOptions"] = None, + **kwargs + ) -> None: + """Deletes the specified entity in a table. + + :param table: The name of the table. + :type table: str + :param partition_key: The partition key of the entity. + :type partition_key: str + :param row_key: The row key of the entity. + :type row_key: str + :param if_match: Match condition for an entity to be deleted. If specified and a matching + entity is not found, an error will be raised. To force an unconditional delete, set to the + wildcard character (*). + :type if_match: str + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param query_options: Parameter group. + :type query_options: ~azure.data.tables.models.QueryOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _format = None + if query_options is not None: + _format = query_options.format + data_service_version = "3.0" + accept = "application/json;odata=minimalmetadata" + + # Construct URL + url = self.delete_entity.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + 'partitionKey': self._serialize.url("partition_key", partition_key, 'str'), + 'rowKey': self._serialize.url("row_key", row_key, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + if _format is not None: + query_parameters['$format'] = self._serialize.query("format", _format, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + + if cls: + return cls(pipeline_response, None, response_headers) + + delete_entity.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore + + async def insert_entity( + self, + table: str, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + response_preference: Optional[Union[str, "models.ResponseFormat"]] = None, + table_entity_properties: Optional[Dict[str, object]] = None, + query_options: Optional["models.QueryOptions"] = None, + **kwargs + ) -> Optional[Dict[str, object]]: + """Insert entity in a table. + + :param table: The name of the table. + :type table: str + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param response_preference: Specifies whether the response should include the inserted entity + in the payload. Possible values are return-no-content and return-content. + :type response_preference: str or ~azure.data.tables.models.ResponseFormat + :param table_entity_properties: The properties for the table entity. + :type table_entity_properties: dict[str, object] + :param query_options: Parameter group. + :type query_options: ~azure.data.tables.models.QueryOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: dict mapping str to object, or the result of cls(response) + :rtype: dict[str, object] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Dict[str, object]]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _format = None + if query_options is not None: + _format = query_options.format + data_service_version = "3.0" + content_type = kwargs.pop("content_type", "application/json;odata=nometadata") + accept = "application/json;odata=minimalmetadata" + + # Construct URL + url = self.insert_entity.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + if _format is not None: + query_parameters['$format'] = self._serialize.query("format", _format, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') + if response_preference is not None: + header_parameters['Prefer'] = self._serialize.header("response_preference", response_preference, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if table_entity_properties is not None: + body_content = self._serialize.body(table_entity_properties, '{object}') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + deserialized = None + if response.status_code == 201: + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + response_headers['Preference-Applied']=self._deserialize('str', response.headers.get('Preference-Applied')) + response_headers['Content-Type']=self._deserialize('str', response.headers.get('Content-Type')) + deserialized = self._deserialize('{object}', pipeline_response) + + if response.status_code == 204: + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + response_headers['Preference-Applied']=self._deserialize('str', response.headers.get('Preference-Applied')) + response_headers['Content-Type']=self._deserialize('str', response.headers.get('Content-Type')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + insert_entity.metadata = {'url': '/{table}'} # type: ignore + + async def get_access_policy( + self, + table: str, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + **kwargs + ) -> List["models.SignedIdentifier"]: + """Retrieves details about any stored access policies specified on the table that may be used with + Shared Access Signatures. + + :param table: The name of the table. + :type table: str + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of SignedIdentifier, or the result of cls(response) + :rtype: list[~azure.data.tables.models.SignedIdentifier] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["models.SignedIdentifier"]] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + comp = "acl" + accept = "application/xml" + + # Construct URL + url = self.get_access_policy.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + query_parameters['comp'] = self._serialize.query("comp", comp, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + deserialized = self._deserialize('[SignedIdentifier]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get_access_policy.metadata = {'url': '/{table}'} # type: ignore + + async def set_access_policy( + self, + table: str, + timeout: Optional[int] = None, + request_id_parameter: Optional[str] = None, + table_acl: Optional[List["models.SignedIdentifier"]] = None, + **kwargs + ) -> None: + """Sets stored access policies for the table that may be used with Shared Access Signatures. + + :param table: The name of the table. + :type table: str + :param timeout: The timeout parameter is expressed in seconds. + :type timeout: int + :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character + limit that is recorded in the analytics logs when analytics logging is enabled. + :type request_id_parameter: str + :param table_acl: The acls for the table. + :type table_acl: list[~azure.data.tables.models.SignedIdentifier] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + comp = "acl" + content_type = kwargs.pop("content_type", "application/xml") + accept = "application/xml" + + # Construct URL + url = self.set_access_policy.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'table': self._serialize.url("table", table, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + query_parameters['comp'] = self._serialize.query("comp", comp, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + serialization_ctxt = {'xml': {'name': 'SignedIdentifiers', 'wrapped': True, 'itemsName': 'SignedIdentifier'}} + if table_acl is not None: + body_content = self._serialize.body(table_acl, '[SignedIdentifier]', is_xml=True, serialization_ctxt=serialization_ctxt) + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + + if cls: + return cls(pipeline_response, None, response_headers) + + set_access_policy.metadata = {'url': '/{table}'} # type: ignore diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/__init__.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/__init__.py deleted file mode 100644 index 90d9a50594445..0000000000000 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._table_operations_async import TableOperations -from ._service_operations_async import ServiceOperations - -__all__ = [ - 'TableOperations', - 'ServiceOperations', -] diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/_service_operations_async.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/_service_operations_async.py deleted file mode 100644 index b9a2d2b3d6646..0000000000000 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/_service_operations_async.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, 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 -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ServiceOperations: - """ServiceOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure_table.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def set_properties( - self, - table_service_properties: "models.TableServiceProperties", - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - **kwargs - ) -> None: - """Sets properties for an account's Table service endpoint, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. - - :param table_service_properties: The Table Service properties. - :type table_service_properties: ~azure_table.models.TableServiceProperties - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - restype = "service" - comp = "properties" - content_type = kwargs.pop("content_type", "application/xml") - - # Construct URL - url = self.set_properties.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['restype'] = self._serialize.query("restype", restype, 'str') - query_parameters['comp'] = self._serialize.query("comp", comp, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(table_service_properties, 'TableServiceProperties', is_xml=True) - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - - if cls: - return cls(pipeline_response, None, response_headers) - - set_properties.metadata = {'url': '/'} # type: ignore - - async def get_properties( - self, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - **kwargs - ) -> "models.TableServiceProperties": - """Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. - - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableServiceProperties, or the result of cls(response) - :rtype: ~azure_table.models.TableServiceProperties - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TableServiceProperties"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - restype = "service" - comp = "properties" - - # Construct URL - url = self.get_properties.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['restype'] = self._serialize.query("restype", restype, 'str') - query_parameters['comp'] = self._serialize.query("comp", comp, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = 'application/xml' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - deserialized = self._deserialize('TableServiceProperties', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - get_properties.metadata = {'url': '/'} # type: ignore - - async def get_statistics( - self, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - **kwargs - ) -> "models.TableServiceStats": - """Retrieves statistics related to replication for the Table service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the account. - - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableServiceStats, or the result of cls(response) - :rtype: ~azure_table.models.TableServiceStats - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TableServiceStats"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - restype = "service" - comp = "stats" - - # Construct URL - url = self.get_statistics.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['restype'] = self._serialize.query("restype", restype, 'str') - query_parameters['comp'] = self._serialize.query("comp", comp, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = 'application/xml' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - deserialized = self._deserialize('TableServiceStats', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - get_statistics.metadata = {'url': '/'} # type: ignore diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/_table_operations_async.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/_table_operations_async.py deleted file mode 100644 index 80d2a09252d77..0000000000000 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations_async/_table_operations_async.py +++ /dev/null @@ -1,1043 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class TableOperations: - """TableOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure_table.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def query( - self, - request_id_parameter: Optional[str] = None, - next_table_name: Optional[str] = None, - query_options: Optional["models.QueryOptions"] = None, - **kwargs - ) -> "models.TableQueryResponse": - """Queries tables under the given account. - - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param next_table_name: A table query continuation token from a previous call. - :type next_table_name: str - :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableQueryResponse, or the result of cls(response) - :rtype: ~azure_table.models.TableQueryResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TableQueryResponse"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _format = None - _top = None - _select = None - _filter = None - if query_options is not None: - _format = query_options.format - _top = query_options.top - _select = query_options.select - _filter = query_options.filter - data_service_version = "3.0" - - # Construct URL - url = self.query.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if _format is not None: - query_parameters['$format'] = self._serialize.query("format", _format, 'str') - if _top is not None: - query_parameters['$top'] = self._serialize.query("top", _top, 'int', minimum=0) - if _select is not None: - query_parameters['$select'] = self._serialize.query("select", _select, 'str') - if _filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') - if next_table_name is not None: - query_parameters['NextTableName'] = self._serialize.query("next_table_name", next_table_name, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['x-ms-continuation-NextTableName']=self._deserialize('str', response.headers.get('x-ms-continuation-NextTableName')) - deserialized = self._deserialize('TableQueryResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - query.metadata = {'url': '/Tables'} # type: ignore - - async def create( - self, - table_properties: "models.TableProperties", - request_id_parameter: Optional[str] = None, - response_preference: Optional[Union[str, "models.ResponseFormat"]] = None, - query_options: Optional["models.QueryOptions"] = None, - **kwargs - ) -> "models.TableResponse": - """Creates a new table under the given account. - - :param table_properties: The Table properties. - :type table_properties: ~azure_table.models.TableProperties - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param response_preference: Specifies whether the response should include the inserted entity - in the payload. Possible values are return-no-content and return-content. - :type response_preference: str or ~azure_table.models.ResponseFormat - :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableResponse, or the result of cls(response) - :rtype: ~azure_table.models.TableResponse or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TableResponse"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _format = None - if query_options is not None: - _format = query_options.format - data_service_version = "3.0" - content_type = kwargs.pop("content_type", "application/json;odata=nometadata") - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if _format is not None: - query_parameters['$format'] = self._serialize.query("format", _format, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - if response_preference is not None: - header_parameters['Prefer'] = self._serialize.header("response_preference", response_preference, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(table_properties, 'TableProperties') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [201, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - deserialized = None - if response.status_code == 201: - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['Preference-Applied']=self._deserialize('str', response.headers.get('Preference-Applied')) - deserialized = self._deserialize('TableResponse', pipeline_response) - - if response.status_code == 204: - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['Preference-Applied']=self._deserialize('str', response.headers.get('Preference-Applied')) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - create.metadata = {'url': '/Tables'} # type: ignore - - async def delete( - self, - table: str, - request_id_parameter: Optional[str] = None, - **kwargs - ) -> None: - """Operation permanently deletes the specified table. - - :param table: The name of the table. - :type table: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - delete.metadata = {'url': '/Tables(\'{table}\')'} # type: ignore - - async def query_entities( - self, - table: str, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - next_partition_key: Optional[str] = None, - next_row_key: Optional[str] = None, - query_options: Optional["models.QueryOptions"] = None, - **kwargs - ) -> "models.TableEntityQueryResponse": - """Queries entities in a table. - - :param table: The name of the table. - :type table: str - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param next_partition_key: An entity query continuation token from a previous call. - :type next_partition_key: str - :param next_row_key: An entity query continuation token from a previous call. - :type next_row_key: str - :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableEntityQueryResponse, or the result of cls(response) - :rtype: ~azure_table.models.TableEntityQueryResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TableEntityQueryResponse"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _format = None - _top = None - _select = None - _filter = None - if query_options is not None: - _format = query_options.format - _top = query_options.top - _select = query_options.select - _filter = query_options.filter - data_service_version = "3.0" - - # Construct URL - url = self.query_entities.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if _format is not None: - query_parameters['$format'] = self._serialize.query("format", _format, 'str') - if _top is not None: - query_parameters['$top'] = self._serialize.query("top", _top, 'int', minimum=0) - if _select is not None: - query_parameters['$select'] = self._serialize.query("select", _select, 'str') - if _filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') - if next_partition_key is not None: - query_parameters['NextPartitionKey'] = self._serialize.query("next_partition_key", next_partition_key, 'str') - if next_row_key is not None: - query_parameters['NextRowKey'] = self._serialize.query("next_row_key", next_row_key, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['x-ms-continuation-NextPartitionKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextPartitionKey')) - response_headers['x-ms-continuation-NextRowKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextRowKey')) - deserialized = self._deserialize('TableEntityQueryResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - query_entities.metadata = {'url': '/{table}()'} # type: ignore - - async def query_entities_with_partition_and_row_key( - self, - table: str, - partition_key: str, - row_key: str, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - query_options: Optional["models.QueryOptions"] = None, - **kwargs - ) -> "models.TableEntityQueryResponse": - """Queries entities in a table. - - :param table: The name of the table. - :type table: str - :param partition_key: The partition key of the entity. - :type partition_key: str - :param row_key: The row key of the entity. - :type row_key: str - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableEntityQueryResponse, or the result of cls(response) - :rtype: ~azure_table.models.TableEntityQueryResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TableEntityQueryResponse"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _format = None - _select = None - _filter = None - if query_options is not None: - _format = query_options.format - _select = query_options.select - _filter = query_options.filter - data_service_version = "3.0" - - # Construct URL - url = self.query_entities_with_partition_and_row_key.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - 'partitionKey': self._serialize.url("partition_key", partition_key, 'str'), - 'rowKey': self._serialize.url("row_key", row_key, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if _format is not None: - query_parameters['$format'] = self._serialize.query("format", _format, 'str') - if _select is not None: - query_parameters['$select'] = self._serialize.query("select", _select, 'str') - if _filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['x-ms-continuation-NextPartitionKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextPartitionKey')) - response_headers['x-ms-continuation-NextRowKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextRowKey')) - deserialized = self._deserialize('TableEntityQueryResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - query_entities_with_partition_and_row_key.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore - - async def update_entity( - self, - table: str, - partition_key: str, - row_key: str, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - if_match: Optional[str] = None, - table_entity_properties: Optional[Dict[str, object]] = None, - query_options: Optional["models.QueryOptions"] = None, - **kwargs - ) -> None: - """Update entity in a table. - - :param table: The name of the table. - :type table: str - :param partition_key: The partition key of the entity. - :type partition_key: str - :param row_key: The row key of the entity. - :type row_key: str - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param if_match: Match condition for an entity to be updated. If specified and a matching - entity is not found, an error will be raised. To force an unconditional update, set to the - wildcard character (*). If not specified, an insert will be performed when no existing entity - is found to update and a replace will be performed if an existing entity is found. - :type if_match: str - :param table_entity_properties: The properties for the table entity. - :type table_entity_properties: dict[str, object] - :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _format = None - if query_options is not None: - _format = query_options.format - data_service_version = "3.0" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.update_entity.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - 'partitionKey': self._serialize.url("partition_key", partition_key, 'str'), - 'rowKey': self._serialize.url("row_key", row_key, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if _format is not None: - query_parameters['$format'] = self._serialize.query("format", _format, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - if table_entity_properties is not None: - body_content = self._serialize.body(table_entity_properties, '{object}') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - - if cls: - return cls(pipeline_response, None, response_headers) - - update_entity.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore - - async def merge_entity( - self, - table: str, - partition_key: str, - row_key: str, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - if_match: Optional[str] = None, - table_entity_properties: Optional[Dict[str, object]] = None, - query_options: Optional["models.QueryOptions"] = None, - **kwargs - ) -> None: - """Merge entity in a table. - - :param table: The name of the table. - :type table: str - :param partition_key: The partition key of the entity. - :type partition_key: str - :param row_key: The row key of the entity. - :type row_key: str - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param if_match: Match condition for an entity to be updated. If specified and a matching - entity is not found, an error will be raised. To force an unconditional update, set to the - wildcard character (*). If not specified, an insert will be performed when no existing entity - is found to update and a merge will be performed if an existing entity is found. - :type if_match: str - :param table_entity_properties: The properties for the table entity. - :type table_entity_properties: dict[str, object] - :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _format = None - if query_options is not None: - _format = query_options.format - data_service_version = "3.0" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.merge_entity.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - 'partitionKey': self._serialize.url("partition_key", partition_key, 'str'), - 'rowKey': self._serialize.url("row_key", row_key, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if _format is not None: - query_parameters['$format'] = self._serialize.query("format", _format, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - if table_entity_properties is not None: - body_content = self._serialize.body(table_entity_properties, '{object}') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - - if cls: - return cls(pipeline_response, None, response_headers) - - merge_entity.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore - - async def delete_entity( - self, - table: str, - partition_key: str, - row_key: str, - if_match: str, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - query_options: Optional["models.QueryOptions"] = None, - **kwargs - ) -> None: - """Deletes the specified entity in a table. - - :param table: The name of the table. - :type table: str - :param partition_key: The partition key of the entity. - :type partition_key: str - :param row_key: The row key of the entity. - :type row_key: str - :param if_match: Match condition for an entity to be deleted. If specified and a matching - entity is not found, an error will be raised. To force an unconditional delete, set to the - wildcard character (*). - :type if_match: str - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _format = None - if query_options is not None: - _format = query_options.format - data_service_version = "3.0" - - # Construct URL - url = self.delete_entity.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - 'partitionKey': self._serialize.url("partition_key", partition_key, 'str'), - 'rowKey': self._serialize.url("row_key", row_key, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if _format is not None: - query_parameters['$format'] = self._serialize.query("format", _format, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - delete_entity.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore - - async def insert_entity( - self, - table: str, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - response_preference: Optional[Union[str, "models.ResponseFormat"]] = None, - table_entity_properties: Optional[Dict[str, object]] = None, - query_options: Optional["models.QueryOptions"] = None, - **kwargs - ) -> Dict[str, object]: - """Insert entity in a table. - - :param table: The name of the table. - :type table: str - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param response_preference: Specifies whether the response should include the inserted entity - in the payload. Possible values are return-no-content and return-content. - :type response_preference: str or ~azure_table.models.ResponseFormat - :param table_entity_properties: The properties for the table entity. - :type table_entity_properties: dict[str, object] - :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: dict mapping str to object, or the result of cls(response) - :rtype: dict[str, object] or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, object]] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - - _format = None - if query_options is not None: - _format = query_options.format - data_service_version = "3.0" - content_type = kwargs.pop("content_type", "application/json;odata=nometadata") - - # Construct URL - url = self.insert_entity.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if _format is not None: - query_parameters['$format'] = self._serialize.query("format", _format, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - if response_preference is not None: - header_parameters['Prefer'] = self._serialize.header("response_preference", response_preference, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - if table_entity_properties is not None: - body_content = self._serialize.body(table_entity_properties, '{object}') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [201, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - deserialized = None - if response.status_code == 201: - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Preference-Applied']=self._deserialize('str', response.headers.get('Preference-Applied')) - response_headers['Content-Type']=self._deserialize('str', response.headers.get('Content-Type')) - deserialized = self._deserialize('{object}', pipeline_response) - - if response.status_code == 204: - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Preference-Applied']=self._deserialize('str', response.headers.get('Preference-Applied')) - response_headers['Content-Type']=self._deserialize('str', response.headers.get('Content-Type')) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - insert_entity.metadata = {'url': '/{table}'} # type: ignore - - async def get_access_policy( - self, - table: str, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - **kwargs - ) -> List["models.SignedIdentifier"]: - """Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. - - :param table: The name of the table. - :type table: str - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of SignedIdentifier, or the result of cls(response) - :rtype: list[~azure_table.models.SignedIdentifier] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["models.SignedIdentifier"]] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - comp = "acl" - - # Construct URL - url = self.get_access_policy.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - query_parameters['comp'] = self._serialize.query("comp", comp, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = 'application/xml' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - deserialized = self._deserialize('[SignedIdentifier]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - get_access_policy.metadata = {'url': '/{table}'} # type: ignore - - async def set_access_policy( - self, - table: str, - timeout: Optional[int] = None, - request_id_parameter: Optional[str] = None, - table_acl: Optional[List["models.SignedIdentifier"]] = None, - **kwargs - ) -> None: - """Sets stored access policies for the table that may be used with Shared Access Signatures. - - :param table: The name of the table. - :type table: str - :param timeout: The timeout parameter is expressed in seconds. - :type timeout: int - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when analytics logging is enabled. - :type request_id_parameter: str - :param table_acl: The acls for the table. - :type table_acl: list[~azure_table.models.SignedIdentifier] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} - error_map.update(kwargs.pop('error_map', {})) - comp = "acl" - content_type = kwargs.pop("content_type", "application/xml") - - # Construct URL - url = self.set_access_policy.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'table': self._serialize.url("table", table, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - query_parameters['comp'] = self._serialize.query("comp", comp, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/xml' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - serialization_ctxt = {'xml': {'name': 'SignedIdentifiers', 'wrapped': True, 'itemsName': 'SignedIdentifier'}} - if table_acl is not None: - body_content = self._serialize.body(table_acl, '[SignedIdentifier]', is_xml=True, serialization_ctxt=serialization_ctxt) - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TableServiceError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - set_access_policy.metadata = {'url': '/{table}'} # type: ignore diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/__init__.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/__init__.py index 944581fccd98a..bec7bb2e5155e 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/__init__.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- @@ -19,6 +21,8 @@ from ._models_py3 import TableResponse from ._models_py3 import TableResponseProperties from ._models_py3 import TableServiceError + from ._models_py3 import TableServiceErrorOdataError + from ._models_py3 import TableServiceErrorOdataErrorMessage from ._models_py3 import TableServiceProperties from ._models_py3 import TableServiceStats except (SyntaxError, ImportError): @@ -36,6 +40,8 @@ from ._models import TableResponse # type: ignore from ._models import TableResponseProperties # type: ignore from ._models import TableServiceError # type: ignore + from ._models import TableServiceErrorOdataError # type: ignore + from ._models import TableServiceErrorOdataErrorMessage # type: ignore from ._models import TableServiceProperties # type: ignore from ._models import TableServiceStats # type: ignore @@ -60,6 +66,8 @@ 'TableResponse', 'TableResponseProperties', 'TableServiceError', + 'TableServiceErrorOdataError', + 'TableServiceErrorOdataErrorMessage', 'TableServiceProperties', 'TableServiceStats', 'GeoReplicationStatusType', diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_azure_table_enums.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_azure_table_enums.py index ef8e90bd92c9f..7685b428f163d 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_azure_table_enums.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_azure_table_enums.py @@ -1,26 +1,46 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- -from enum import Enum +from enum import Enum, EnumMeta +from six import with_metaclass -class GeoReplicationStatusType(str, Enum): +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class GeoReplicationStatusType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The status of the secondary location. """ - live = "live" - bootstrap = "bootstrap" - unavailable = "unavailable" + LIVE = "live" + BOOTSTRAP = "bootstrap" + UNAVAILABLE = "unavailable" -class OdataMetadataFormat(str, Enum): +class OdataMetadataFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - application_json_odata_nometadata = "application/json;odata=nometadata" - application_json_odata_minimalmetadata = "application/json;odata=minimalmetadata" - application_json_odata_fullmetadata = "application/json;odata=fullmetadata" + APPLICATION_JSON_ODATA_NOMETADATA = "application/json;odata=nometadata" + APPLICATION_JSON_ODATA_MINIMALMETADATA = "application/json;odata=minimalmetadata" + APPLICATION_JSON_ODATA_FULLMETADATA = "application/json;odata=fullmetadata" -class ResponseFormat(str, Enum): +class ResponseFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - return_no_content = "return-no-content" - return_content = "return-content" + RETURN_NO_CONTENT = "return-no-content" + RETURN_CONTENT = "return-content" diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models.py index 3ca6eee7318e7..a3a42b3c7a28f 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- @@ -14,9 +16,9 @@ class AccessPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param start: Required. The start datetime from which the policy is active. - :type start: ~datetime.datetime + :type start: str :param expiry: Required. The datetime that the policy expires. - :type expiry: ~datetime.datetime + :type expiry: str :param permission: Required. The permissions for the acl policy. :type permission: str """ @@ -37,8 +39,8 @@ class AccessPolicy(msrest.serialization.Model): } def __init__( - self, - **kwargs + self, + **kwargs ): super(AccessPolicy, self).__init__(**kwargs) self.start = kwargs['start'] @@ -109,7 +111,7 @@ class GeoReplication(msrest.serialization.Model): :param status: Required. The status of the secondary location. Possible values include: "live", "bootstrap", "unavailable". - :type status: str or ~azure_table.models.GeoReplicationStatusType + :type status: str or ~azure.data.tables.models.GeoReplicationStatusType :param last_sync_time: Required. A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads. @@ -152,7 +154,7 @@ class Logging(msrest.serialization.Model): :param write: Required. Indicates whether all write requests should be logged. :type write: bool :param retention_policy: Required. The retention policy. - :type retention_policy: ~azure_table.models.RetentionPolicy + :type retention_policy: ~azure.data.tables.models.RetentionPolicy """ _validation = { @@ -199,7 +201,7 @@ class Metrics(msrest.serialization.Model): API operations. :type include_apis: bool :param retention_policy: The retention policy. - :type retention_policy: ~azure_table.models.RetentionPolicy + :type retention_policy: ~azure.data.tables.models.RetentionPolicy """ _validation = { @@ -233,7 +235,7 @@ class QueryOptions(msrest.serialization.Model): :param format: Specifies the media type for the response. Possible values include: "application/json;odata=nometadata", "application/json;odata=minimalmetadata", "application/json;odata=fullmetadata". - :type format: str or ~azure_table.models.OdataMetadataFormat + :type format: str or ~azure.data.tables.models.OdataMetadataFormat :param top: Maximum number of records to return. :type top: int :param select: Select expression using OData notation. Limits the columns on each record to @@ -306,13 +308,12 @@ class SignedIdentifier(msrest.serialization.Model): :param id: Required. A unique id. :type id: str - :param access_policy: Required. The access policy. - :type access_policy: ~azure_table.models.AccessPolicy + :param access_policy: The access policy. + :type access_policy: ~azure.data.tables.models.AccessPolicy """ _validation = { 'id': {'required': True}, - 'access_policy': {'required': True}, } _attribute_map = { @@ -324,12 +325,12 @@ class SignedIdentifier(msrest.serialization.Model): } def __init__( - self, - **kwargs + self, + **kwargs ): super(SignedIdentifier, self).__init__(**kwargs) self.id = kwargs['id'] - self.access_policy = kwargs['access_policy'] + self.access_policy = kwargs.get('access_policy', None) class TableEntityQueryResponse(msrest.serialization.Model): @@ -380,7 +381,7 @@ class TableQueryResponse(msrest.serialization.Model): :param odata_metadata: The metadata response of the table. :type odata_metadata: str :param value: List of tables. - :type value: list[~azure_table.models.TableResponseProperties] + :type value: list[~azure.data.tables.models.TableResponseProperties] """ _attribute_map = { @@ -462,15 +463,12 @@ def __init__( class TableServiceError(msrest.serialization.Model): """Table Service error. - :param message: The error message. - :type message: str + :param odata_error: The odata error. + :type odata_error: ~azure.data.tables.models.TableServiceErrorOdataError """ _attribute_map = { - 'message': {'key': 'Message', 'type': 'str', 'xml': {'name': 'Message'}}, - } - _xml_map = { - + 'odata_error': {'key': 'odata\\.error', 'type': 'TableServiceErrorOdataError'}, } def __init__( @@ -478,22 +476,69 @@ def __init__( **kwargs ): super(TableServiceError, self).__init__(**kwargs) + self.odata_error = kwargs.get('odata_error', None) + + +class TableServiceErrorOdataError(msrest.serialization.Model): + """The odata error. + + :param code: The service error code. The error codes possible are listed in: + https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes. + :type code: str + :param message: The service error message. + :type message: ~azure.data.tables.models.TableServiceErrorOdataErrorMessage + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'TableServiceErrorOdataErrorMessage'}, + } + + def __init__( + self, + **kwargs + ): + super(TableServiceErrorOdataError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) +class TableServiceErrorOdataErrorMessage(msrest.serialization.Model): + """The service error message. + + :param lang: Language code of the error message. + :type lang: str + :param value: The error message. + :type value: str + """ + + _attribute_map = { + 'lang': {'key': 'lang', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TableServiceErrorOdataErrorMessage, self).__init__(**kwargs) + self.lang = kwargs.get('lang', None) + self.value = kwargs.get('value', None) + + class TableServiceProperties(msrest.serialization.Model): """Table Service Properties. :param logging: Azure Analytics Logging settings. - :type logging: ~azure_table.models.Logging + :type logging: ~azure.data.tables.models.Logging :param hour_metrics: A summary of request statistics grouped by API in hourly aggregates for tables. - :type hour_metrics: ~azure_table.models.Metrics + :type hour_metrics: ~azure.data.tables.models.Metrics :param minute_metrics: A summary of request statistics grouped by API in minute aggregates for tables. - :type minute_metrics: ~azure_table.models.Metrics + :type minute_metrics: ~azure.data.tables.models.Metrics :param cors: The set of CORS rules. - :type cors: list[~azure_table.models.CorsRule] + :type cors: list[~azure.data.tables.models.CorsRule] """ _attribute_map = { @@ -521,7 +566,7 @@ class TableServiceStats(msrest.serialization.Model): """Stats for the service. :param geo_replication: Geo-Replication information for the Secondary Storage Service. - :type geo_replication: ~azure_table.models.GeoReplication + :type geo_replication: ~azure.data.tables.models.GeoReplication """ _attribute_map = { diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models_py3.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models_py3.py index 001b3ff92b4be..8469471af9bcd 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models_py3.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models_py3.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- @@ -19,9 +21,9 @@ class AccessPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param start: Required. The start datetime from which the policy is active. - :type start: ~datetime.datetime + :type start: str :param expiry: Required. The datetime that the policy expires. - :type expiry: ~datetime.datetime + :type expiry: str :param permission: Required. The permissions for the acl policy. :type permission: str """ @@ -44,8 +46,8 @@ class AccessPolicy(msrest.serialization.Model): def __init__( self, *, - start: datetime.datetime, - expiry: datetime.datetime, + start: str, + expiry: str, permission: str, **kwargs ): @@ -124,7 +126,7 @@ class GeoReplication(msrest.serialization.Model): :param status: Required. The status of the secondary location. Possible values include: "live", "bootstrap", "unavailable". - :type status: str or ~azure_table.models.GeoReplicationStatusType + :type status: str or ~azure.data.tables.models.GeoReplicationStatusType :param last_sync_time: Required. A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads. @@ -170,7 +172,7 @@ class Logging(msrest.serialization.Model): :param write: Required. Indicates whether all write requests should be logged. :type write: bool :param retention_policy: Required. The retention policy. - :type retention_policy: ~azure_table.models.RetentionPolicy + :type retention_policy: ~azure.data.tables.models.RetentionPolicy """ _validation = { @@ -223,7 +225,7 @@ class Metrics(msrest.serialization.Model): API operations. :type include_apis: bool :param retention_policy: The retention policy. - :type retention_policy: ~azure_table.models.RetentionPolicy + :type retention_policy: ~azure.data.tables.models.RetentionPolicy """ _validation = { @@ -262,7 +264,7 @@ class QueryOptions(msrest.serialization.Model): :param format: Specifies the media type for the response. Possible values include: "application/json;odata=nometadata", "application/json;odata=minimalmetadata", "application/json;odata=fullmetadata". - :type format: str or ~azure_table.models.OdataMetadataFormat + :type format: str or ~azure.data.tables.models.OdataMetadataFormat :param top: Maximum number of records to return. :type top: int :param select: Select expression using OData notation. Limits the columns on each record to @@ -343,13 +345,12 @@ class SignedIdentifier(msrest.serialization.Model): :param id: Required. A unique id. :type id: str - :param access_policy: Required. The access policy. - :type access_policy: ~azure_table.models.AccessPolicy + :param access_policy: The access policy. + :type access_policy: ~azure.data.tables.models.AccessPolicy """ _validation = { 'id': {'required': True}, - 'access_policy': {'required': True}, } _attribute_map = { @@ -364,7 +365,7 @@ def __init__( self, *, id: str, - access_policy: "AccessPolicy", + access_policy: Optional["AccessPolicy"] = None, **kwargs ): super(SignedIdentifier, self).__init__(**kwargs) @@ -425,7 +426,7 @@ class TableQueryResponse(msrest.serialization.Model): :param odata_metadata: The metadata response of the table. :type odata_metadata: str :param value: List of tables. - :type value: list[~azure_table.models.TableResponseProperties] + :type value: list[~azure.data.tables.models.TableResponseProperties] """ _attribute_map = { @@ -521,40 +522,90 @@ def __init__( class TableServiceError(msrest.serialization.Model): """Table Service error. - :param message: The error message. - :type message: str + :param odata_error: The odata error. + :type odata_error: ~azure.data.tables.models.TableServiceErrorOdataError """ _attribute_map = { - 'message': {'key': 'Message', 'type': 'str', 'xml': {'name': 'Message'}}, - } - _xml_map = { - + 'odata_error': {'key': 'odata\\.error', 'type': 'TableServiceErrorOdataError'}, } def __init__( self, *, - message: Optional[str] = None, + odata_error: Optional["TableServiceErrorOdataError"] = None, **kwargs ): super(TableServiceError, self).__init__(**kwargs) + self.odata_error = odata_error + + +class TableServiceErrorOdataError(msrest.serialization.Model): + """The odata error. + + :param code: The service error code. The error codes possible are listed in: + https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes. + :type code: str + :param message: The service error message. + :type message: ~azure.data.tables.models.TableServiceErrorOdataErrorMessage + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'TableServiceErrorOdataErrorMessage'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional["TableServiceErrorOdataErrorMessage"] = None, + **kwargs + ): + super(TableServiceErrorOdataError, self).__init__(**kwargs) + self.code = code self.message = message +class TableServiceErrorOdataErrorMessage(msrest.serialization.Model): + """The service error message. + + :param lang: Language code of the error message. + :type lang: str + :param value: The error message. + :type value: str + """ + + _attribute_map = { + 'lang': {'key': 'lang', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + lang: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + super(TableServiceErrorOdataErrorMessage, self).__init__(**kwargs) + self.lang = lang + self.value = value + + class TableServiceProperties(msrest.serialization.Model): """Table Service Properties. :param logging: Azure Analytics Logging settings. - :type logging: ~azure_table.models.Logging + :type logging: ~azure.data.tables.models.Logging :param hour_metrics: A summary of request statistics grouped by API in hourly aggregates for tables. - :type hour_metrics: ~azure_table.models.Metrics + :type hour_metrics: ~azure.data.tables.models.Metrics :param minute_metrics: A summary of request statistics grouped by API in minute aggregates for tables. - :type minute_metrics: ~azure_table.models.Metrics + :type minute_metrics: ~azure.data.tables.models.Metrics :param cors: The set of CORS rules. - :type cors: list[~azure_table.models.CorsRule] + :type cors: list[~azure.data.tables.models.CorsRule] """ _attribute_map = { @@ -587,7 +638,7 @@ class TableServiceStats(msrest.serialization.Model): """Stats for the service. :param geo_replication: Geo-Replication information for the Secondary Storage Service. - :type geo_replication: ~azure_table.models.GeoReplication + :type geo_replication: ~azure.data.tables.models.GeoReplication """ _attribute_map = { diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/__init__.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/__init__.py index 1298fa41c6f8d..774e1c0d97a45 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/__init__.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_service_operations.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_service_operations.py index be2f182e168af..bed1744e802d0 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_service_operations.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_service_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -26,7 +28,7 @@ class ServiceOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure_table.models + :type models: ~azure.data.tables.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,10 +51,11 @@ def set_properties( **kwargs # type: Any ): # type: (...) -> None - """Sets properties for an account's Table service endpoint, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. + """Sets properties for an account's Table service endpoint, including properties for Analytics and + CORS (Cross-Origin Resource Sharing) rules. :param table_service_properties: The Table Service properties. - :type table_service_properties: ~azure_table.models.TableServiceProperties + :type table_service_properties: ~azure.data.tables.models.TableServiceProperties :param timeout: The timeout parameter is expressed in seconds. :type timeout: int :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character @@ -69,6 +72,7 @@ def set_properties( restype = "service" comp = "properties" content_type = kwargs.pop("content_type", "application/xml") + accept = "application/xml" # Construct URL url = self.set_properties.metadata['url'] # type: ignore @@ -90,13 +94,12 @@ def set_properties( if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(table_service_properties, 'TableServiceProperties', is_xml=True) body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -122,7 +125,8 @@ def get_properties( **kwargs # type: Any ): # type: (...) -> "models.TableServiceProperties" - """Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. + """Gets the properties of an account's Table service, including properties for Analytics and CORS + (Cross-Origin Resource Sharing) rules. :param timeout: The timeout parameter is expressed in seconds. :type timeout: int @@ -131,7 +135,7 @@ def get_properties( :type request_id_parameter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TableServiceProperties, or the result of cls(response) - :rtype: ~azure_table.models.TableServiceProperties + :rtype: ~azure.data.tables.models.TableServiceProperties :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.TableServiceProperties"] @@ -139,6 +143,7 @@ def get_properties( error_map.update(kwargs.pop('error_map', {})) restype = "service" comp = "properties" + accept = "application/xml" # Construct URL url = self.get_properties.metadata['url'] # type: ignore @@ -159,9 +164,8 @@ def get_properties( header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = 'application/xml' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -190,7 +194,9 @@ def get_statistics( **kwargs # type: Any ): # type: (...) -> "models.TableServiceStats" - """Retrieves statistics related to replication for the Table service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the account. + """Retrieves statistics related to replication for the Table service. It is only available on the + secondary location endpoint when read-access geo-redundant replication is enabled for the + account. :param timeout: The timeout parameter is expressed in seconds. :type timeout: int @@ -199,7 +205,7 @@ def get_statistics( :type request_id_parameter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TableServiceStats, or the result of cls(response) - :rtype: ~azure_table.models.TableServiceStats + :rtype: ~azure.data.tables.models.TableServiceStats :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.TableServiceStats"] @@ -207,6 +213,7 @@ def get_statistics( error_map.update(kwargs.pop('error_map', {})) restype = "service" comp = "stats" + accept = "application/xml" # Construct URL url = self.get_statistics.metadata['url'] # type: ignore @@ -227,9 +234,8 @@ def get_statistics( header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = 'application/xml' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_table_operations.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_table_operations.py index 9686ea5448326..10821cbb327d7 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_table_operations.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_table_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator}) +# 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. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -26,7 +28,7 @@ class TableOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure_table.models + :type models: ~azure.data.tables.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,10 +59,10 @@ def query( :param next_table_name: A table query continuation token from a previous call. :type next_table_name: str :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions + :type query_options: ~azure.data.tables.models.QueryOptions :keyword callable cls: A custom type or function that will be passed the direct response :return: TableQueryResponse, or the result of cls(response) - :rtype: ~azure_table.models.TableQueryResponse + :rtype: ~azure.data.tables.models.TableQueryResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.TableQueryResponse"] @@ -77,6 +79,7 @@ def query( _select = query_options.select _filter = query_options.filter data_service_version = "3.0" + accept = "application/json;odata=minimalmetadata" # Construct URL url = self.query.metadata['url'] # type: ignore @@ -104,16 +107,16 @@ def query( if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize(models.TableServiceError, response) + raise HttpResponseError(response=response, model=error) response_headers = {} response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) @@ -137,25 +140,25 @@ def create( query_options=None, # type: Optional["models.QueryOptions"] **kwargs # type: Any ): - # type: (...) -> "models.TableResponse" + # type: (...) -> Optional["models.TableResponse"] """Creates a new table under the given account. :param table_properties: The Table properties. - :type table_properties: ~azure_table.models.TableProperties + :type table_properties: ~azure.data.tables.models.TableProperties :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. :type request_id_parameter: str :param response_preference: Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. - :type response_preference: str or ~azure_table.models.ResponseFormat + :type response_preference: str or ~azure.data.tables.models.ResponseFormat :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions + :type query_options: ~azure.data.tables.models.QueryOptions :keyword callable cls: A custom type or function that will be passed the direct response :return: TableResponse, or the result of cls(response) - :rtype: ~azure_table.models.TableResponse or None + :rtype: ~azure.data.tables.models.TableResponse or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TableResponse"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TableResponse"]] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) @@ -164,6 +167,7 @@ def create( _format = query_options.format data_service_version = "3.0" content_type = kwargs.pop("content_type", "application/json;odata=nometadata") + accept = "application/json;odata=minimalmetadata" # Construct URL url = self.create.metadata['url'] # type: ignore @@ -186,14 +190,12 @@ def create( if response_preference is not None: header_parameters['Prefer'] = self._serialize.header("response_preference", response_preference, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(table_properties, 'TableProperties') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -247,6 +249,7 @@ def delete( cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) + accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore @@ -264,8 +267,8 @@ def delete( header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -311,10 +314,10 @@ def query_entities( :param next_row_key: An entity query continuation token from a previous call. :type next_row_key: str :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions + :type query_options: ~azure.data.tables.models.QueryOptions :keyword callable cls: A custom type or function that will be passed the direct response :return: TableEntityQueryResponse, or the result of cls(response) - :rtype: ~azure_table.models.TableEntityQueryResponse + :rtype: ~azure.data.tables.models.TableEntityQueryResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.TableEntityQueryResponse"] @@ -331,6 +334,7 @@ def query_entities( _select = query_options.select _filter = query_options.filter data_service_version = "3.0" + accept = "application/json;odata=minimalmetadata" # Construct URL url = self.query_entities.metadata['url'] # type: ignore @@ -363,9 +367,8 @@ def query_entities( if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -400,7 +403,7 @@ def query_entities_with_partition_and_row_key( query_options=None, # type: Optional["models.QueryOptions"] **kwargs # type: Any ): - # type: (...) -> "models.TableEntityQueryResponse" + # type: (...) -> Dict[str, object] """Queries entities in a table. :param table: The name of the table. @@ -415,13 +418,13 @@ def query_entities_with_partition_and_row_key( limit that is recorded in the analytics logs when analytics logging is enabled. :type request_id_parameter: str :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions + :type query_options: ~azure.data.tables.models.QueryOptions :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableEntityQueryResponse, or the result of cls(response) - :rtype: ~azure_table.models.TableEntityQueryResponse + :return: dict mapping str to object, or the result of cls(response) + :rtype: dict[str, object] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TableEntityQueryResponse"] + cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, object]] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) @@ -433,6 +436,7 @@ def query_entities_with_partition_and_row_key( _select = query_options.select _filter = query_options.filter data_service_version = "3.0" + accept = "application/json;odata=minimalmetadata" # Construct URL url = self.query_entities_with_partition_and_row_key.metadata['url'] # type: ignore @@ -461,9 +465,8 @@ def query_entities_with_partition_and_row_key( if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -481,7 +484,7 @@ def query_entities_with_partition_and_row_key( response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) response_headers['x-ms-continuation-NextPartitionKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextPartitionKey')) response_headers['x-ms-continuation-NextRowKey']=self._deserialize('str', response.headers.get('x-ms-continuation-NextRowKey')) - deserialized = self._deserialize('TableEntityQueryResponse', pipeline_response) + deserialized = self._deserialize('{object}', pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) @@ -523,7 +526,7 @@ def update_entity( :param table_entity_properties: The properties for the table entity. :type table_entity_properties: dict[str, object] :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions + :type query_options: ~azure.data.tables.models.QueryOptions :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -538,6 +541,7 @@ def update_entity( _format = query_options.format data_service_version = "3.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_entity.metadata['url'] # type: ignore @@ -565,8 +569,8 @@ def update_entity( if if_match is not None: header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] if table_entity_properties is not None: body_content = self._serialize.body(table_entity_properties, '{object}') @@ -574,7 +578,6 @@ def update_entity( body_content = None body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -629,7 +632,7 @@ def merge_entity( :param table_entity_properties: The properties for the table entity. :type table_entity_properties: dict[str, object] :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions + :type query_options: ~azure.data.tables.models.QueryOptions :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -644,6 +647,7 @@ def merge_entity( _format = query_options.format data_service_version = "3.0" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.merge_entity.metadata['url'] # type: ignore @@ -671,8 +675,8 @@ def merge_entity( if if_match is not None: header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] if table_entity_properties is not None: body_content = self._serialize.body(table_entity_properties, '{object}') @@ -680,7 +684,6 @@ def merge_entity( body_content = None body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -731,7 +734,7 @@ def delete_entity( limit that is recorded in the analytics logs when analytics logging is enabled. :type request_id_parameter: str :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions + :type query_options: ~azure.data.tables.models.QueryOptions :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -745,6 +748,7 @@ def delete_entity( if query_options is not None: _format = query_options.format data_service_version = "3.0" + accept = "application/json;odata=minimalmetadata" # Construct URL url = self.delete_entity.metadata['url'] # type: ignore @@ -770,8 +774,8 @@ def delete_entity( header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') header_parameters['DataServiceVersion'] = self._serialize.header("data_service_version", data_service_version, 'str') header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -802,7 +806,7 @@ def insert_entity( query_options=None, # type: Optional["models.QueryOptions"] **kwargs # type: Any ): - # type: (...) -> Dict[str, object] + # type: (...) -> Optional[Dict[str, object]] """Insert entity in a table. :param table: The name of the table. @@ -814,17 +818,17 @@ def insert_entity( :type request_id_parameter: str :param response_preference: Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. - :type response_preference: str or ~azure_table.models.ResponseFormat + :type response_preference: str or ~azure.data.tables.models.ResponseFormat :param table_entity_properties: The properties for the table entity. :type table_entity_properties: dict[str, object] :param query_options: Parameter group. - :type query_options: ~azure_table.models.QueryOptions + :type query_options: ~azure.data.tables.models.QueryOptions :keyword callable cls: A custom type or function that will be passed the direct response :return: dict mapping str to object, or the result of cls(response) :rtype: dict[str, object] or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, object]] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Dict[str, object]]] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) @@ -833,6 +837,7 @@ def insert_entity( _format = query_options.format data_service_version = "3.0" content_type = kwargs.pop("content_type", "application/json;odata=nometadata") + accept = "application/json;odata=minimalmetadata" # Construct URL url = self.insert_entity.metadata['url'] # type: ignore @@ -858,9 +863,8 @@ def insert_entity( if response_preference is not None: header_parameters['Prefer'] = self._serialize.header("response_preference", response_preference, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json;odata=minimalmetadata' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] if table_entity_properties is not None: body_content = self._serialize.body(table_entity_properties, '{object}') @@ -868,7 +872,6 @@ def insert_entity( body_content = None body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -912,7 +915,8 @@ def get_access_policy( **kwargs # type: Any ): # type: (...) -> List["models.SignedIdentifier"] - """Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. + """Retrieves details about any stored access policies specified on the table that may be used with + Shared Access Signatures. :param table: The name of the table. :type table: str @@ -923,13 +927,14 @@ def get_access_policy( :type request_id_parameter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: list of SignedIdentifier, or the result of cls(response) - :rtype: list[~azure_table.models.SignedIdentifier] + :rtype: list[~azure.data.tables.models.SignedIdentifier] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[List["models.SignedIdentifier"]] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) comp = "acl" + accept = "application/xml" # Construct URL url = self.get_access_policy.metadata['url'] # type: ignore @@ -950,9 +955,8 @@ def get_access_policy( header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = 'application/xml' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -994,7 +998,7 @@ def set_access_policy( limit that is recorded in the analytics logs when analytics logging is enabled. :type request_id_parameter: str :param table_acl: The acls for the table. - :type table_acl: list[~azure_table.models.SignedIdentifier] + :type table_acl: list[~azure.data.tables.models.SignedIdentifier] :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -1005,6 +1009,7 @@ def set_access_policy( error_map.update(kwargs.pop('error_map', {})) comp = "acl" content_type = kwargs.pop("content_type", "application/xml") + accept = "application/xml" # Construct URL url = self.set_access_policy.metadata['url'] # type: ignore @@ -1026,9 +1031,8 @@ def set_access_policy( if request_id_parameter is not None: header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/xml' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] serialization_ctxt = {'xml': {'name': 'SignedIdentifiers', 'wrapped': True, 'itemsName': 'SignedIdentifier'}} if table_acl is not None: @@ -1037,7 +1041,6 @@ def set_access_policy( body_content = None body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/version.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/version.py deleted file mode 100644 index 6298121700000..0000000000000 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/version.py +++ /dev/null @@ -1,13 +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. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2019-07-07" - diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_models.py b/sdk/tables/azure-data-tables/azure/data/tables/_models.py index 5dbb662aff4e1..71069a449ed28 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_models.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_models.py @@ -298,8 +298,7 @@ def _get_next_cb(self, continuation_token, **kwargs): def _extract_data_cb(self, get_next_return): self.location_mode, self._response, self._headers = get_next_return - props_list = [] - props_list = [Table(t) for t in self._response.value] + props_list = [TableItem(t, self._headers) for t in self._response.value] return self._headers['x-ms-continuation-NextTableName'] or None, props_list @@ -458,15 +457,25 @@ def service_properties_deserialize(generated): } -class Table(object): +class TableItem(object): """ - Represents an Azure Table. Returned by list_tables. + Represents an Azure TableItem. Returned by TableServiceClient.list_tables + and TableServiceClient.query_tables. :ivar str name: The name of the table. + :ivar str api_version: The API version included in the service call + :ivar str date: The date the service call was made """ - def __init__(self, table): + def __init__( + self, + table, # type: str + headers=None # type: dict[str,str] + ): + # type: (...) -> None self.table_name = table + self.api_version = headers.pop('version', None) + self.date = headers.pop('date', None) or headers.pop('Date', None) class TablePayloadFormat(object): diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_policies.py b/sdk/tables/azure-data-tables/azure/data/tables/_policies.py index 732779f3943be..9114217bf2865 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_policies.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_policies.py @@ -36,7 +36,8 @@ SansIOHTTPPolicy, NetworkTraceLoggingPolicy, HTTPPolicy, - RequestHistory + RequestHistory, + RetryPolicy ) from azure.core.exceptions import AzureError, ServiceRequestError, ServiceResponseError @@ -353,18 +354,61 @@ def on_response(self, request, response): ) -class StorageRetryPolicy(HTTPPolicy): +class TablesRetryPolicy(RetryPolicy): """ - The base class for Exponential and Linear retries containing shared code. + A base class for retry policies for the Table Client and Table Service Client """ + def __init__( + self, + initial_backoff=15, # type: int + increment_base=3, # type: int + retry_total=10, # type: int + retry_to_secondary=False, # type: bool + random_jitter_range=3, # type: int + **kwargs # type: Any + ): + """ + Build a TablesRetryPolicy object. - def __init__(self, **kwargs): - self.total_retries = kwargs.pop('retry_total', 10) + :param int initial_backoff: + The initial backoff interval, in seconds, for the first retry. + :param int increment_base: + The base, in seconds, to increment the initial_backoff by after the + first retry. + :param int retry_total: total number of retries + :param bool retry_to_secondary: + Whether the request should be retried to secondary, if able. This should + only be enabled of RA-GRS accounts are used and potentially stale data + can be handled. + :param int random_jitter_range: + A number in seconds which indicates a range to jitter/randomize for the back-off interval. + For example, a random_jitter_range of 3 results in the back-off interval x to vary between x+3 and x-3. + """ + self.initial_backoff = initial_backoff + self.increment_base = increment_base + self.random_jitter_range = random_jitter_range + self.total_retries = retry_total self.connect_retries = kwargs.pop('retry_connect', 3) self.read_retries = kwargs.pop('retry_read', 3) self.status_retries = kwargs.pop('retry_status', 3) - self.retry_to_secondary = kwargs.pop('retry_to_secondary', False) - super(StorageRetryPolicy, self).__init__() + self.retry_to_secondary = retry_to_secondary + super(TablesRetryPolicy, self).__init__(**kwargs) + + def get_backoff_time(self, settings): + """ + Calculates how long to sleep before retrying. + :param dict settings: + :keyword callable cls: A custom type or function that will be passed the direct response + :return: + An integer indicating how long to wait before retrying the request, + or None to indicate no retry should be performed. + :rtype: int or None + """ + random_generator = random.Random() + backoff = self.initial_backoff + (0 if settings['count'] == 0 else pow(self.increment_base, settings['count'])) + random_range_start = backoff - self.random_jitter_range if backoff > self.random_jitter_range else 0 + random_range_end = backoff + self.random_jitter_range + return random_generator.uniform(random_range_start, random_range_end) def _set_next_host_location(self, settings, request): # pylint: disable=no-self-use """ @@ -384,7 +428,7 @@ def _set_next_host_location(self, settings, request): # pylint: disable=no-self updated = url._replace(netloc=settings['hosts'].get(settings['mode'])) request.url = updated.geturl() - def configure_retries(self, request): # pylint: disable=no-self-use + def configure_retries(self, request): # pylint: disable=no-self-use, arguments-differ # type: (...)-> dict """ :param Any request: @@ -414,17 +458,8 @@ def configure_retries(self, request): # pylint: disable=no-self-use 'history': [] } - def get_backoff_time(self, settings, **kwargs): # pylint: disable=unused-argument,no-self-use - """ Formula for computing the current backoff. - Should be calculated by child class. - :param Any settings: - :keyword callable cls: A custom type or function that will be passed the direct response - :rtype: float - """ - return 0 - - def sleep(self, settings, transport): - # type: (...)->None + def sleep(self, settings, transport): # pylint: disable=arguments-differ + # type: (...) -> None """ :param Any settings: :param Any transport: @@ -435,7 +470,7 @@ def sleep(self, settings, transport): return transport.sleep(backoff) - def increment(self, settings, request, response=None, error=None, **kwargs): # pylint:disable=W0613 + def increment(self, settings, request, response=None, error=None, **kwargs): # pylint:disable=unused-argument, arguments-differ # type: (...)->None """Increment the retry counters. @@ -531,7 +566,7 @@ def send(self, request): return response -class ExponentialRetry(StorageRetryPolicy): +class ExponentialRetry(TablesRetryPolicy): """Exponential retry.""" def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, @@ -565,10 +600,9 @@ def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, super(ExponentialRetry, self).__init__( retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) - def get_backoff_time(self, settings, **kwargs): + def get_backoff_time(self, settings): """ Calculates how long to sleep before retrying. - :param **kwargs: :param dict settings: :keyword callable cls: A custom type or function that will be passed the direct response :return: @@ -583,7 +617,7 @@ def get_backoff_time(self, settings, **kwargs): return random_generator.uniform(random_range_start, random_range_end) -class LinearRetry(StorageRetryPolicy): +class LinearRetry(TablesRetryPolicy): """Linear retry.""" def __init__(self, backoff=15, retry_total=3, retry_to_secondary=False, random_jitter_range=3, **kwargs): @@ -608,7 +642,7 @@ def __init__(self, backoff=15, retry_total=3, retry_to_secondary=False, random_j super(LinearRetry, self).__init__( retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) - def get_backoff_time(self, settings, **kwargs): + def get_backoff_time(self, settings): """ Calculates how long to sleep before retrying. diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_sdk_moniker.py b/sdk/tables/azure-data-tables/azure/data/tables/_sdk_moniker.py new file mode 100644 index 0000000000000..8a7571636b37c --- /dev/null +++ b/sdk/tables/azure-data-tables/azure/data/tables/_sdk_moniker.py @@ -0,0 +1,11 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._version import VERSION + +SDK_MONIKER = "data-tables/{}".format(VERSION) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_serialize.py b/sdk/tables/azure-data-tables/azure/data/tables/_serialize.py index f937d68f3b72c..8352b7f26f032 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_serialize.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_serialize.py @@ -42,6 +42,8 @@ def _get_match_headers(kwargs, match_param, etag_param): raise ValueError("'{}' specified without '{}'.".format(match_param, etag_param)) elif match_condition == MatchConditions.IfMissing: if_none_match = '*' + elif match_condition == MatchConditions.Unconditionally: + if_none_match = '*' elif match_condition is None: if kwargs.get(etag_param): raise ValueError("'{}' specified without '{}'.".format(etag_param, match_param)) @@ -133,6 +135,15 @@ def _to_entity_int64(value): return EdmType.INT64, str(value) +def _to_entity_int(value): + ivalue = int(value) + if ivalue.bit_length() <= 32: + return _to_entity_int32(value) + if ivalue.bit_length() <= 64: + return _to_entity_int64(value) + raise TypeError(_ERROR_VALUE_TOO_LARGE.format(str(value), EdmType.INT64)) + + def _to_entity_str(value): return None, value @@ -144,7 +155,7 @@ def _to_entity_none(value): # pylint:disable=W0613 # Conversion from Python type to a function which returns a tuple of the # type string and content string. _PYTHON_TO_ENTITY_CONVERSIONS = { - int: _to_entity_int64, + int: _to_entity_int32, bool: _to_entity_bool, datetime: _to_entity_datetime, float: _to_entity_float, diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py index a8ee3a33c2129..a9646ed546e58 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py @@ -17,18 +17,22 @@ from azure.core.exceptions import HttpResponseError, ResourceNotFoundError from azure.core.tracing.decorator import distributed_trace -from ._deserialize import _convert_to_entity +from ._deserialize import _convert_to_entity, _trim_service_metadata from ._entity import TableEntity from ._generated import AzureTable -from ._generated.models import AccessPolicy, SignedIdentifier, TableProperties, QueryOptions +from ._generated.models import ( + AccessPolicy, + SignedIdentifier, + TableProperties, + QueryOptions +) from ._serialize import _get_match_headers, _add_entity_properties from ._base_client import parse_connection_str from ._table_client_base import TableClientBase from ._serialize import serialize_iso from ._deserialize import _return_headers_and_deserialized from ._error import _process_table_error -from ._version import VERSION -from ._models import TableEntityPropertiesPaged, UpdateMode, Table +from ._models import TableEntityPropertiesPaged, UpdateMode class TableClient(TableClientBase): @@ -59,7 +63,6 @@ def __init__( """ super(TableClient, self).__init__(account_url, table_name, credential=credential, **kwargs) self._client = AzureTable(self.url, pipeline=self._pipeline) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access @classmethod def from_connection_string( @@ -77,12 +80,19 @@ def from_connection_string( :type table_name: str :returns: A table client. :rtype: ~azure.data.tables.TableClient + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_client.py + :start-after: [START create_table_client] + :end-before: [END create_table_client] + :language: python + :dedent: 8 + :caption: Authenticating a TableServiceClient from a connection_string """ - account_url, secondary, credential = parse_connection_str( - conn_str=conn_str, credential=None, service='table') - if 'secondary_hostname' not in kwargs: - kwargs['secondary_hostname'] = secondary - return cls(account_url, table_name=table_name, credential=credential, **kwargs) # type: ignore + account_url, credential = parse_connection_str( + conn_str=conn_str, credential=None, service='table', keyword_args=kwargs) + return cls(account_url, table_name=table_name, credential=credential, **kwargs) @classmethod def from_table_url(cls, table_url, credential=None, **kwargs): @@ -128,7 +138,7 @@ def get_table_access_policy( self, **kwargs # type: Any ): - # type: (...) -> dict[str,AccessPolicy] + # type: (...) -> Dict[str,AccessPolicy] """Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. @@ -150,7 +160,7 @@ def get_table_access_policy( @distributed_trace def set_table_access_policy( self, - signed_identifiers, # type: dict[str,AccessPolicy] + signed_identifiers, # type: Dict[str,AccessPolicy] **kwargs): # type: (...) -> None """Sets stored access policies for the table that may be used with Shared Access Signatures. @@ -182,17 +192,28 @@ def create_table( self, **kwargs # type: Any ): - # type: (...) -> Table + # type: (...) -> Dict[str,str] """Creates a new table under the current account. - :return: Table created - :rtype: Table + :return: Dictionary of operation metadata returned from service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table.py + :start-after: [START create_table_from_table_client] + :end-before: [END create_table_from_table_client] + :language: python + :dedent: 8 + :caption: Creating a table from the TableClient object """ table_properties = TableProperties(table_name=self.table_name, **kwargs) try: - table = self._client.table.create(table_properties) - return Table(table=table) + metadata, _ = self._client.table.create( + table_properties, + cls=kwargs.pop('cls', _return_headers_and_deserialized)) + return _trim_service_metadata(metadata) except HttpResponseError as error: _process_table_error(error) @@ -206,6 +227,15 @@ def delete_table( :return: None :rtype: None + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table.py + :start-after: [START delete_table_from_table_client] + :end-before: [END delete_table_from_table_client] + :language: python + :dedent: 8 + :caption: Deleting a table from the TableClient object """ try: self._client.table.delete(table=self.table_name, **kwargs) @@ -231,17 +261,27 @@ def delete_entity( :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_insert_delete_entities.py + :start-after: [START delete_entity] + :end-before: [END delete_entity] + :language: python + :dedent: 8 + :caption: Deleting an entity to a Table """ - if_match, if_not_match = _get_match_headers(kwargs=dict(kwargs, etag=kwargs.pop('etag', None), + if_match, _ = _get_match_headers(kwargs=dict(kwargs, etag=kwargs.pop('etag', None), match_condition=kwargs.pop('match_condition', None)), etag_param='etag', match_param='match_condition') + try: self._client.table.delete_entity( table=self.table_name, partition_key=partition_key, row_key=row_key, - if_match=if_match or if_not_match or '*', + if_match=if_match or '*', **kwargs) except HttpResponseError as error: _process_table_error(error) @@ -249,43 +289,50 @@ def delete_entity( @distributed_trace def create_entity( self, - entity, # type: Union[TableEntity, dict[str,str]] + entity, # type: Union[TableEntity, Dict[str,str]] **kwargs # type: Any ): - # type: (...) -> TableEntity + # type: (...) -> Dict[str,str] """Insert entity in a table. :param entity: The properties for the table entity. :type entity: Union[TableEntity, dict[str,str]] - :return: TableEntity mapping str to azure.data.tables.EntityProperty - :rtype: ~azure.data.tables.TableEntity + :return: Dictionary mapping operation metadata returned from the service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_insert_delete_entities.py + :start-after: [START create_entity] + :end-before: [END create_entity] + :language: python + :dedent: 8 + :caption: Creating and adding an entity to a Table """ if "PartitionKey" in entity and "RowKey" in entity: entity = _add_entity_properties(entity) - # TODO: Remove - and run test to see what happens with the service else: raise ValueError('PartitionKey and RowKey were not provided in entity') try: - inserted_entity = self._client.table.insert_entity( + metadata, _ = self._client.table.insert_entity( table=self.table_name, table_entity_properties=entity, - **kwargs - ) - properties = _convert_to_entity(inserted_entity) - return properties + cls=kwargs.pop('cls', _return_headers_and_deserialized), + **kwargs) + return _trim_service_metadata(metadata) except ResourceNotFoundError as error: _process_table_error(error) @distributed_trace def update_entity( # pylint:disable=R1710 self, - entity, # type: Union[TableEntity, dict[str,str]] + entity, # type: Union[TableEntity, Dict[str,str]] mode=UpdateMode.MERGE, # type: UpdateMode **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> Dict[str,str] """Update entity in a table. :param entity: The properties for the table entity. @@ -296,12 +343,21 @@ def update_entity( # pylint:disable=R1710 :keyword str row_key: The row key of the entity. :keyword str etag: Etag of the entity :keyword ~azure.core.MatchConditions match_condition: MatchCondition - :return: None - :rtype: None + :return: Dictionary mapping operation metadata returned from the service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_update_upsert_merge_entities.py + :start-after: [START update_entity] + :end-before: [END update_entity] + :language: python + :dedent: 8 + :caption: Updating an already exiting entity in a Table """ - if_match, if_not_match = _get_match_headers(kwargs=dict(kwargs, etag=kwargs.pop('etag', None), + if_match, _ = _get_match_headers(kwargs=dict(kwargs, etag=kwargs.pop('etag', None), match_condition=kwargs.pop('match_condition', None)), etag_param='etag', match_param='match_condition') @@ -309,20 +365,28 @@ def update_entity( # pylint:disable=R1710 row_key = entity['RowKey'] entity = _add_entity_properties(entity) try: + metadata = None if mode is UpdateMode.REPLACE: - self._client.table.update_entity( + metadata, _ = self._client.table.update_entity( table=self.table_name, partition_key=partition_key, row_key=row_key, table_entity_properties=entity, - if_match=if_match or if_not_match or "*", + if_match=if_match or "*", + cls=kwargs.pop('cls', _return_headers_and_deserialized), **kwargs) elif mode is UpdateMode.MERGE: - self._client.table.merge_entity(table=self.table_name, partition_key=partition_key, - row_key=row_key, if_match=if_match or if_not_match or "*", - table_entity_properties=entity, **kwargs) + metadata, _ = self._client.table.merge_entity( + table=self.table_name, + partition_key=partition_key, + row_key=row_key, + if_match=if_match or "*", + table_entity_properties=entity, + cls=kwargs.pop('cls', _return_headers_and_deserialized), + **kwargs) else: raise ValueError('Mode type is not supported') + return _trim_service_metadata(metadata) except HttpResponseError as error: _process_table_error(error) @@ -339,6 +403,15 @@ def list_entities( :return: Query of table entities :rtype: ItemPaged[TableEntity] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_update_upsert_merge_entities.py + :start-after: [START query_entities] + :end-before: [END query_entities] + :language: python + :dedent: 8 + :caption: List all entities held within a table """ user_select = kwargs.pop('select', None) if user_select and not isinstance(user_select, str): @@ -370,6 +443,15 @@ def query_entities( :return: Query of table entities :rtype: ItemPaged[TableEntity] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_query_table.py + :start-after: [START query_entities] + :end-before: [END query_entities] + :language: python + :dedent: 8 + :caption: Query entities held within a table """ parameters = kwargs.pop('parameters', None) filter = self._parameter_filter_substitution(parameters, filter) # pylint: disable = W0622 @@ -397,15 +479,15 @@ def get_entity( row_key, # type: str **kwargs # type: Any ): - # type: (...) -> TableEntity + # type: (...) -> Dict[str,str] """Queries entities in a table. :param partition_key: The partition key of the entity. :type partition_key: str :param row_key: The row key of the entity. :type row_key: str - :return: Entity mapping str to azure.data.tables.EntityProperty - :rtype: ~azure.data.tables.TableEntity + :return: Dictionary mapping operation metadata returned from the service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError """ try: @@ -413,7 +495,8 @@ def get_entity( partition_key=partition_key, row_key=row_key, **kwargs) - properties = _convert_to_entity(entity.additional_properties) + + properties = _convert_to_entity(entity) return properties except HttpResponseError as error: _process_table_error(error) @@ -421,20 +504,29 @@ def get_entity( @distributed_trace def upsert_entity( # pylint:disable=R1710 self, - entity, # type: Union[TableEntity, dict[str,str]] + entity, # type: Union[TableEntity, Dict[str,str]] mode=UpdateMode.MERGE, # type: UpdateMode **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> Dict[str,str] """Update/Merge or Insert entity into table. :param entity: The properties for the table entity. :type entity: Union[TableEntity, dict[str,str]] :param mode: Merge or Replace and Insert on fail :type mode: ~azure.data.tables.UpdateMode - :return: None - :rtype: None + :return: Dictionary mapping operation metadata returned from the service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_update_upsert_merge_entities.py + :start-after: [START upsert_entity] + :end-before: [END upsert_entity] + :language: python + :dedent: 8 + :caption: Update/merge or insert an entity into a table """ partition_key = entity['PartitionKey'] @@ -442,25 +534,30 @@ def upsert_entity( # pylint:disable=R1710 entity = _add_entity_properties(entity) try: + metadata = None if mode is UpdateMode.MERGE: - self._client.table.merge_entity( + metadata, _ = self._client.table.merge_entity( table=self.table_name, partition_key=partition_key, row_key=row_key, table_entity_properties=entity, + cls=kwargs.pop('cls', _return_headers_and_deserialized), **kwargs ) elif mode is UpdateMode.REPLACE: - self._client.table.update_entity( + metadata, _ = self._client.table.update_entity( table=self.table_name, partition_key=partition_key, row_key=row_key, table_entity_properties=entity, + cls=kwargs.pop('cls', _return_headers_and_deserialized), **kwargs) else: - raise ValueError('Mode type is not supported') + raise ValueError("""Update mode {} is not supported. + For a list of supported modes see the UpdateMode enum""".format(mode)) + return _trim_service_metadata(metadata) except ResourceNotFoundError: - self.create_entity( + return self.create_entity( partition_key=partition_key, row_key=row_key, table_entity_properties=entity, diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py index 1c4c94303ef66..556dfe51531bc 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py @@ -6,11 +6,11 @@ import functools from typing import Any, Union -from azure.core.exceptions import HttpResponseError +from azure.core.exceptions import HttpResponseError, ResourceExistsError from azure.core.paging import ItemPaged from azure.core.tracing.decorator import distributed_trace from azure.core.pipeline import Pipeline -from ._models import Table +from ._models import TableItem from ._generated import AzureTable from ._generated.models import TableProperties, TableServiceProperties, QueryOptions @@ -18,7 +18,6 @@ from ._base_client import parse_connection_str, TransportWrapper from ._models import LocationMode from ._error import _process_table_error -from ._version import VERSION from ._table_client import TableClient from ._table_service_client_base import TableServiceClientBase @@ -43,11 +42,26 @@ def __init__( key. :type credential: str :returns: None + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_authentication.py + :start-after: [START auth_from_sas] + :end-before: [END auth_from_sas] + :language: python + :dedent: 8 + :caption: Authenticating a TableServiceClient from a Shared Access Key + + .. literalinclude:: ../samples/sample_authentication.py + :start-after: [START auth_from_shared_key] + :end-before: [END auth_from_shared_key] + :language: python + :dedent: 8 + :caption: Authenticating a TableServiceClient from a Shared Account Key """ super(TableServiceClient, self).__init__(account_url, service='table', credential=credential, **kwargs) self._client = AzureTable(self.url, pipeline=self._pipeline) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access @classmethod def from_connection_string( @@ -61,11 +75,18 @@ def from_connection_string( :type conn_str: str :returns: A Table service client. :rtype: ~azure.data.tables.TableServiceClient + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_authentication.py + :start-after: [START auth_from_connection_string] + :end-before: [END auth_from_connection_string] + :language: python + :dedent: 8 + :caption: Authenticating a TableServiceClient from a connection_string """ - account_url, secondary, credential = parse_connection_str( - conn_str=conn_str, credential=None, service='table') - if 'secondary_hostname' not in kwargs: - kwargs['secondary_hostname'] = secondary + account_url, credential = parse_connection_str( + conn_str=conn_str, credential=None, service='table', keyword_args=kwargs) return cls(account_url, credential=credential, **kwargs) @distributed_trace @@ -153,11 +174,53 @@ def create_table( :return: TableClient :rtype: ~azure.data.tables.TableClient :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table.py + :start-after: [START create_table_from_tc] + :end-before: [END create_table_from_tc] + :language: python + :dedent: 8 + :caption: Creating a table from the TableServiceClient object """ table = self.get_table_client(table_name=table_name) table.create_table(**kwargs) return table + @distributed_trace + def create_table_if_not_exists( + self, + table_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> TableClient + """Creates a new table if it does not currently exist. + If the table currently exists, the current table is + returned. + + :param table_name: The Table name. + :type table_name: str + :return: TableClient + :rtype: ~azure.data.tables.TableClient + :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table.py + :start-after: [START create_table_if_not_exists] + :end-before: [END create_table_if_not_exists] + :language: python + :dedent: 8 + :caption: Deleting a table from the TableServiceClient object + """ + table = self.get_table_client(table_name=table_name) + try: + table.create_table(**kwargs) + except ResourceExistsError: + pass + return table + @distributed_trace def delete_table( self, @@ -171,6 +234,15 @@ def delete_table( :type table_name: str :return: None :rtype: None + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table.py + :start-after: [START delete_table_from_tc] + :end-before: [END delete_table_from_tc] + :language: python + :dedent: 8 + :caption: Deleting a table from the TableServiceClient object """ table = self.get_table_client(table_name=table_name) table.delete_table(**kwargs) @@ -181,7 +253,7 @@ def query_tables( filter, # pylint: disable=W0622 **kwargs # type: Any ): - # type: (...) -> ItemPaged[Table] + # type: (...) -> ItemPaged[TableItem] """Queries tables under the given account. :param filter: Specify a filter to return certain tables :type filter: str @@ -189,8 +261,17 @@ def query_tables( :keyword Union[str, list(str)] select: Specify desired properties of a table to return certain tables :keyword dict parameters: Dictionary for formatting query with additional, user defined parameters :return: A query of tables - :rtype: ItemPaged[Table] + :rtype: ItemPaged[TableItem] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_query_tables.py + :start-after: [START tsc_query_tables] + :end-before: [END tsc_query_tables] + :language: python + :dedent: 8 + :caption: Querying tables in a storage account """ parameters = kwargs.pop('parameters', None) filter = self._parameter_filter_substitution(parameters, filter) # pylint: disable=W0622 @@ -213,14 +294,23 @@ def list_tables( self, **kwargs # type: Any ): - # type: (...) -> ItemPaged[Table] + # type: (...) -> ItemPaged[TableItem] """Queries tables under the given account. :keyword int results_per_page: Number of tables per page in return ItemPaged :keyword Union[str, list(str)] select: Specify desired properties of a table to return certain tables :return: A query of tables - :rtype: ItemPaged[Table] + :rtype: ItemPaged[TableItem] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_query_tables.py + :start-after: [START tsc_list_tables] + :end-before: [END tsc_list_tables] + :language: python + :dedent: 8 + :caption: Listing all tables in a storage account """ user_select = kwargs.pop('select', None) if user_select and not isinstance(user_select, str): diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_models.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_models.py index fa19a7a1a4fdf..62d0dd6b1047e 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_models.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_models.py @@ -10,7 +10,7 @@ _return_context_and_deserialized, _convert_to_entity ) -from .._models import Table +from .._models import TableItem from .._error import _process_table_error class TablePropertiesPaged(AsyncPageIterator): @@ -47,7 +47,7 @@ async def _get_next_cb(self, continuation_token, **kwargs): async def _extract_data_cb(self, get_next_return): self.location_mode, self._response, self._headers = get_next_return - props_list = [Table(t) for t in self._response.value] + props_list = [TableItem(t, self._headers) for t in self._response.value] return self._headers['x-ms-continuation-NextTableName'] or None, props_list diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_policies_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_policies_async.py index 88695af888aa8..fe855465a0b8f 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_policies_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_policies_async.py @@ -9,10 +9,10 @@ import logging from typing import Any, TYPE_CHECKING -from azure.core.pipeline.policies import AsyncHTTPPolicy +from azure.core.pipeline.policies import AsyncHTTPPolicy, AsyncRetryPolicy from azure.core.exceptions import AzureError -from .._policies import is_retry, StorageRetryPolicy +from .._policies import is_retry, TablesRetryPolicy if TYPE_CHECKING: from azure.core.pipeline import PipelineRequest, PipelineResponse @@ -78,12 +78,56 @@ async def send(self, request): request.context['response_callback'] = response_callback return response -class AsyncStorageRetryPolicy(StorageRetryPolicy): - """ - The base class for Exponential and Linear retries containing shared code. - """ - async def sleep(self, settings, transport): # pylint: disable =W0236 +class AsyncTablesRetryPolicy(AsyncRetryPolicy, TablesRetryPolicy): + """Exponential retry.""" + + def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, + retry_to_secondary=False, random_jitter_range=3, **kwargs): + ''' + Constructs an Exponential retry object. The initial_backoff is used for + the first retry. Subsequent retries are retried after initial_backoff + + increment_power^retry_count seconds. For example, by default the first retry + occurs after 15 seconds, the second after (15+3^1) = 18 seconds, and the + third after (15+3^2) = 24 seconds. + + :param int initial_backoff: + The initial backoff interval, in seconds, for the first retry. + :param int increment_base: + The base, in seconds, to increment the initial_backoff by after the + first retry. + :param int max_attempts: + The maximum number of retry attempts. + :param bool retry_to_secondary: + Whether the request should be retried to secondary, if able. This should + only be enabled of RA-GRS accounts are used and potentially stale data + can be handled. + :param int random_jitter_range: + A number in seconds which indicates a range to jitter/randomize for the back-off interval. + For example, a random_jitter_range of 3 results in the back-off interval x to vary between x+3 and x-3. + ''' + self.initial_backoff = initial_backoff + self.increment_base = increment_base + self.random_jitter_range = random_jitter_range + super(AsyncTablesRetryPolicy, self).__init__( + retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) + + def get_backoff_time(self, settings): + """ + Calculates how long to sleep before retrying. + + :return: + An integer indicating how long to wait before retrying the request, + or None to indicate no retry should be performed. + :rtype: int or None + """ + random_generator = random.Random() + backoff = self.initial_backoff + (0 if settings['count'] == 0 else pow(self.increment_base, settings['count'])) + random_range_start = backoff - self.random_jitter_range if backoff > self.random_jitter_range else 0 + random_range_end = backoff + self.random_jitter_range + return random_generator.uniform(random_range_start, random_range_end) + + async def sleep(self, settings, transport): # pylint: disable=W0236, arguments-differ backoff = self.get_backoff_time(settings) if not backoff or backoff < 0: return @@ -99,7 +143,6 @@ async def send(self, request): # pylint: disable =W0236 if is_retry(response, retry_settings['mode']): retries_remaining = self.increment( retry_settings, - request=request.http_request, response=response.http_response) if retries_remaining: await retry_hook( @@ -111,8 +154,7 @@ async def send(self, request): # pylint: disable =W0236 continue break except AzureError as err: - retries_remaining = self.increment( - retry_settings, request=request.http_request, error=err) + retries_remaining = self.increment(retry_settings, error=err) if retries_remaining: await retry_hook( retry_settings, @@ -128,7 +170,7 @@ async def send(self, request): # pylint: disable =W0236 return response -class ExponentialRetry(AsyncStorageRetryPolicy): +class ExponentialRetry(AsyncTablesRetryPolicy): """Exponential retry.""" def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, @@ -161,11 +203,10 @@ def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, super(ExponentialRetry, self).__init__( retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) - def get_backoff_time(self, settings, **kwargs): + def get_backoff_time(self, settings): """ Calculates how long to sleep before retrying. - :param **kwargs: :return: An integer indicating how long to wait before retrying the request, or None to indicate no retry should be performed. @@ -178,7 +219,7 @@ def get_backoff_time(self, settings, **kwargs): return random_generator.uniform(random_range_start, random_range_end) -class LinearRetry(AsyncStorageRetryPolicy): +class LinearRetry(AsyncTablesRetryPolicy): """Linear retry.""" def __init__(self, backoff=15, retry_total=3, retry_to_secondary=False, random_jitter_range=3, **kwargs): @@ -202,7 +243,7 @@ def __init__(self, backoff=15, retry_total=3, retry_to_secondary=False, random_j super(LinearRetry, self).__init__( retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) - def get_backoff_time(self, settings, **kwargs): + def get_backoff_time(self, settings, **kwargs): # pylint: disable=unused-argument """ Calculates how long to sleep before retrying. diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py index 5adb7e22b7b69..9c25f78b59051 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py @@ -9,21 +9,27 @@ Any, ) +try: + from urllib.parse import urlparse, unquote +except ImportError: + from urlparse import urlparse # type: ignore + from urllib2 import unquote # type: ignore + from azure.core.async_paging import AsyncItemPaged from azure.core.exceptions import ResourceNotFoundError, HttpResponseError from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async -from .. import VERSION +from .._base_client import parse_connection_str from .._entity import TableEntity from .._generated.aio import AzureTable from .._generated.models import SignedIdentifier, TableProperties, QueryOptions -from .._models import AccessPolicy, Table +from .._models import AccessPolicy from .._serialize import serialize_iso from .._deserialize import _return_headers_and_deserialized from .._error import _process_table_error from .._models import UpdateMode -from .._deserialize import _convert_to_entity +from .._deserialize import _convert_to_entity, _trim_service_metadata from .._serialize import _add_entity_properties, _get_match_headers from .._table_client_base import TableClientBase from ._base_client_async import AsyncStorageAccountHostsMixin @@ -64,9 +70,77 @@ def __init__( account_url, table_name=table_name, credential=credential, loop=loop, **kwargs ) self._client = AzureTable(self.url, pipeline=self._pipeline, loop=loop) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable = W0212 self._loop = loop + @classmethod + def from_connection_string( + cls, conn_str, # type: str + table_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> TableClient + """Create TableClient from a Connection String. + + :param conn_str: + A connection string to an Azure Storage or Cosmos account. + :type conn_str: str + :param table_name: The table name. + :type table_name: str + :returns: A table client. + :rtype: ~azure.data.tables.TableClient + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_client_async.py + :start-after: [START create_table_client] + :end-before: [END create_table_client] + :language: python + :dedent: 8 + :caption: Creating the TableClient from a connection string. + """ + account_url, credential = parse_connection_str( + conn_str=conn_str, credential=None, service='table', keyword_args=kwargs) + return cls(account_url, table_name=table_name, credential=credential, **kwargs) + + @classmethod + def from_table_url(cls, table_url, credential=None, **kwargs): + # type: (str, Optional[Any], Any) -> TableClient + """A client to interact with a specific Table. + + :param table_url: The full URI to the table, including SAS token if used. + :type table_url: str + :param credential: + The credentials with which to authenticate. This is optional if the + account URL already has a SAS token. The value can be a SAS token string, an account + shared access key. + :type credential: str + :returns: A table client. + :rtype: ~azure.data.tables.TableClient + """ + try: + if not table_url.lower().startswith('http'): + table_url = "https://" + table_url + except AttributeError: + raise ValueError("Table URL must be a string.") + parsed_url = urlparse(table_url.rstrip('/')) + + if not parsed_url.netloc: + raise ValueError("Invalid URL: {}".format(table_url)) + + table_path = parsed_url.path.lstrip('/').split('/') + account_path = "" + if len(table_path) > 1: + account_path = "/" + "/".join(table_path[:-1]) + account_url = "{}://{}{}?{}".format( + parsed_url.scheme, + parsed_url.netloc.rstrip('/'), + account_path, + parsed_url.query) + table_name = unquote(table_path[-1]) + if not table_name: + raise ValueError("Invalid URL. Please provide a URL with a valid table name") + return cls(account_url, table_name=table_name, credential=credential, **kwargs) + @distributed_trace_async async def get_table_access_policy( self, @@ -126,16 +200,27 @@ async def create_table( self, **kwargs # type: Any ): - # type: (...) -> Table + # type: (...) -> Dict[str,str] """Creates a new table under the given account. - :return: Table created - :rtype: Table + :return: Dictionary of operation metadata returned from service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table_async.py + :start-after: [START create_table] + :end-before: [END create_table] + :language: python + :dedent: 8 + :caption: Creating a table from the TableClient object. """ table_properties = TableProperties(table_name=self.table_name, **kwargs) try: - table = await self._client.table.create(table_properties) - return Table(table) + metadata, _ = await self._client.table.create( + table_properties, + cls=kwargs.pop('cls', _return_headers_and_deserialized)) + return _trim_service_metadata(metadata) except HttpResponseError as error: _process_table_error(error) @@ -148,6 +233,15 @@ async def delete_table( """Creates a new table under the given account. :return: None :rtype: None + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table_async.py + :start-after: [START delete_table] + :end-before: [END delete_table] + :language: python + :dedent: 8 + :caption: Deleting a table from the TableClient object. """ try: await self._client.table.delete(table=self.table_name, **kwargs) @@ -172,8 +266,17 @@ async def delete_entity( :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_insert_delete_entities_async.py + :start-after: [START delete_entity] + :end-before: [END delete_entity] + :language: python + :dedent: 8 + :caption: Adding an entity to a Table """ - if_match, if_not_match = _get_match_headers(kwargs=dict(kwargs, etag=kwargs.pop('etag', None), + if_match, _ = _get_match_headers(kwargs=dict(kwargs, etag=kwargs.pop('etag', None), match_condition=kwargs.pop('match_condition', None)), etag_param='etag', match_param='match_condition') try: @@ -181,7 +284,7 @@ async def delete_entity( table=self.table_name, partition_key=partition_key, row_key=row_key, - if_match=if_match or if_not_match or '*', + if_match=if_match or '*', **kwargs) except HttpResponseError as error: _process_table_error(error) @@ -189,42 +292,49 @@ async def delete_entity( @distributed_trace_async async def create_entity( self, - entity, # type: Union[TableEntity, dict[str,str]] + entity, # type: Union[TableEntity, Dict[str,str]] **kwargs # type: Any ): - # type: (...) -> TableEntity + # type: (...) -> Dict[str,str] """Insert entity in a table. :param entity: The properties for the table entity. :type entity: dict[str, str] - :return: TableEntity mapping str to azure.data.tables.EntityProperty - :rtype: ~azure.data.tables.TableEntity + :return: Dictionary of operation metadata returned from service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError - """ - if entity: - if "PartitionKey" in entity and "RowKey" in entity: - entity = _add_entity_properties(entity) - else: - raise ValueError('PartitionKey and RowKey were not provided in entity') + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_insert_delete_entities_async.py + :start-after: [START create_entity] + :end-before: [END create_entity] + :language: python + :dedent: 8 + :caption: Adding an entity to a Table + """ + if "PartitionKey" in entity and "RowKey" in entity: + entity = _add_entity_properties(entity) + else: + raise ValueError('PartitionKey and RowKey were not provided in entity') try: - inserted_entity = await self._client.table.insert_entity( + metadata, _ = await self._client.table.insert_entity( table=self.table_name, table_entity_properties=entity, + cls=kwargs.pop('cls', _return_headers_and_deserialized), **kwargs ) - properties = _convert_to_entity(inserted_entity) - return properties + return _trim_service_metadata(metadata) except ResourceNotFoundError as error: _process_table_error(error) @distributed_trace_async async def update_entity( self, - entity, # type: Union[TableEntity, dict[str,str]] + entity, # type: Union[TableEntity, Dict[str,str]] mode=UpdateMode.MERGE, # type: UpdateMode **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> Dict[str,str] """Update entity in a table. :param mode: Merge or Replace entity :type mode: ~azure.data.tables.UpdateMode @@ -238,11 +348,20 @@ async def update_entity( :type etag: str :param match_condition: MatchCondition :type match_condition: ~azure.core.MatchConditions - :return: None - :rtype: None + :return: Dictionary of operation metadata returned from service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_update_upsert_merge_entities_async.py + :start-after: [START update_entity] + :end-before: [END update_entity] + :language: python + :dedent: 8 + :caption: Querying entities from a TableClient """ - if_match, if_not_match = _get_match_headers(kwargs=dict(kwargs, etag=kwargs.pop('etag', None), + if_match, _ = _get_match_headers(kwargs=dict(kwargs, etag=kwargs.pop('etag', None), match_condition=kwargs.pop('match_condition', None)), etag_param='etag', match_param='match_condition') @@ -250,20 +369,27 @@ async def update_entity( row_key = entity['RowKey'] entity = _add_entity_properties(entity) try: + metadata = None if mode is UpdateMode.REPLACE: - await self._client.table.update_entity( + metadata, _ = await self._client.table.update_entity( table=self.table_name, partition_key=partition_key, row_key=row_key, table_entity_properties=entity, - if_match=if_match or if_not_match or "*", + if_match=if_match or "*", + cls=kwargs.pop('cls', _return_headers_and_deserialized), **kwargs) elif mode is UpdateMode.MERGE: - await self._client.table.merge_entity(table=self.table_name, partition_key=partition_key, - row_key=row_key, if_match=if_match or if_not_match or "*", - table_entity_properties=entity, **kwargs) + metadata, _ = await self._client.table.merge_entity( + table=self.table_name, + partition_key=partition_key, + row_key=row_key, + if_match=if_match or "*", + cls=kwargs.pop('cls', _return_headers_and_deserialized), + table_entity_properties=entity, **kwargs) else: raise ValueError('Mode type is not supported') + return _trim_service_metadata(metadata) except HttpResponseError as error: _process_table_error(error) @@ -280,6 +406,15 @@ def list_entities( :return: Query of table entities :rtype: AsyncItemPaged[TableEntity] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_update_upsert_merge_entities_async.py + :start-after: [START list_entities] + :end-before: [END list_entities] + :language: python + :dedent: 8 + :caption: Querying entities from a TableClient """ user_select = kwargs.pop('select', None) if user_select and not isinstance(user_select, str): @@ -311,6 +446,15 @@ def query_entities( :return: Query of table entities :rtype: ItemPaged[TableEntity] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_query_table_async.py + :start-after: [START query_entities] + :end-before: [END query_entities] + :language: python + :dedent: 8 + :caption: Querying entities from a TableClient """ parameters = kwargs.pop('parameters', None) filter = self._parameter_filter_substitution(parameters, filter) # pylint: disable = W0622 @@ -347,13 +491,23 @@ async def get_entity( :return: TableEntity mapping str to azure.data.tables.EntityProperty :rtype: ~azure.data.tables.TableEntity :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_update_upsert_merge_entities.py + :start-after: [START get_entity] + :end-before: [END get_entity] + :language: python + :dedent: 8 + :caption: Getting an entity from PartitionKey and RowKey """ try: entity = await self._client.table.query_entities_with_partition_and_row_key(table=self.table_name, partition_key=partition_key, row_key=row_key, **kwargs) - properties = _convert_to_entity(entity.additional_properties) + + properties = _convert_to_entity(entity) return properties except HttpResponseError as error: _process_table_error(error) @@ -361,20 +515,29 @@ async def get_entity( @distributed_trace_async async def upsert_entity( self, - entity, # type: Union[TableEntity, dict[str,str]] + entity, # type: Union[TableEntity, Dict[str,str]] mode=UpdateMode.MERGE, # type: UpdateMode **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> Dict[str,str] """Update/Merge or Insert entity into table. :param mode: Merge or Replace and Insert on fail :type mode: ~azure.data.tables.UpdateMode :param entity: The properties for the table entity. :type entity: dict[str, str] - :return: Entity mapping str to azure.data.tables.EntityProperty or None - :rtype: None + :return: Dictionary of operation metadata returned from service + :rtype: dict[str,str] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_update_upsert_merge_entities_async.py + :start-after: [START upsert_entity] + :end-before: [END upsert_entity] + :language: python + :dedent: 8 + :caption: Update/Merge or Insert an entity into a table """ partition_key = entity['PartitionKey'] @@ -382,25 +545,30 @@ async def upsert_entity( entity = _add_entity_properties(entity) try: + metadata = None if mode is UpdateMode.MERGE: - await self._client.table.merge_entity( + metadata, _ = await self._client.table.merge_entity( table=self.table_name, partition_key=partition_key, row_key=row_key, table_entity_properties=entity, + cls=kwargs.pop('cls', _return_headers_and_deserialized), **kwargs ) elif mode is UpdateMode.REPLACE: - await self._client.table.update_entity( + metadata, _ = await self._client.table.update_entity( table=self.table_name, partition_key=partition_key, row_key=row_key, table_entity_properties=entity, + cls=kwargs.pop('cls', _return_headers_and_deserialized), **kwargs) else: - raise ValueError('Mode type is not supported') + raise ValueError("""Update mode {} is not supported. + For a list of supported modes see the UpdateMode enum""".format(mode)) + return _trim_service_metadata(metadata) except ResourceNotFoundError: - await self.create_entity( + return await self.create_entity( partition_key=partition_key, row_key=row_key, table_entity_properties=entity, diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py index 1901b0f1903a9..202b81bd17186 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py @@ -11,18 +11,19 @@ ) from azure.core.async_paging import AsyncItemPaged -from azure.core.exceptions import HttpResponseError +from azure.core.exceptions import HttpResponseError, ResourceExistsError from azure.core.pipeline import AsyncPipeline from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async -from .. import VERSION, LocationMode -from .._generated.aio._azure_table_async import AzureTable +from .. import LocationMode +from .._base_client import parse_connection_str +from .._generated.aio._azure_table import AzureTable from .._generated.models import TableServiceProperties, TableProperties, QueryOptions from .._models import service_stats_deserialize, service_properties_deserialize -from .._error import _validate_table_name, _process_table_error +from .._error import _process_table_error from .._table_service_client_base import TableServiceClientBase -from .._models import Table +from .._models import TableItem from ._policies_async import ExponentialRetry from ._table_client_async import TableClient from ._base_client_async import AsyncStorageAccountHostsMixin, AsyncTransportWrapper @@ -53,19 +54,19 @@ class TableServiceClient(AsyncStorageAccountHostsMixin, TableServiceClientBase): .. admonition:: Example: - .. literalinclude:: ../samples/table_samples_authentication_async.py - :start-after: [START async_create_table_service_client] - :end-before: [END async_create_table_service_client] + .. literalinclude:: ../samples/sample_authentication_async.py + :start-after: [START auth_from_shared_key] + :end-before: [END auth_from_shared_key] :language: python :dedent: 8 :caption: Creating the tableServiceClient with an account url and credential. - .. literalinclude:: ../samples/table_samples_authentication_async.py - :start-after: [START async_create_table_service_client_token] - :end-before: [END async_create_table_service_client_token] + .. literalinclude:: ../samples/sample_authentication_async.py + :start-after: [START auth_by_sas] + :end-before: [END auth_by_sas] :language: python :dedent: 8 - :caption: Creating the tableServiceClient with Azure Identity credentials. + :caption: Creating the tableServiceClient with Shared Access Signature. """ def __init__( @@ -83,9 +84,35 @@ def __init__( loop=loop, **kwargs) self._client = AzureTable(url=self.url, pipeline=self._pipeline, loop=loop) # type: ignore - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access self._loop = loop + @classmethod + def from_connection_string( + cls, conn_str, # type: any + **kwargs # type: Any + ): # type: (...) -> TableServiceClient + """Create TableServiceClient from a Connection String. + + :param conn_str: + A connection string to an Azure Storage or Cosmos account. + :type conn_str: str + :returns: A Table service client. + :rtype: ~azure.data.tables.TableServiceClient + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_authentication_async.py + :start-after: [START auth_from_connection_string] + :end-before: [END auth_from_connection_string] + :language: python + :dedent: 8 + :caption: Creating the tableServiceClient from a connection string. + + """ + account_url, credential = parse_connection_str( + conn_str=conn_str, credential=None, service='table', keyword_args=kwargs) + return cls(account_url, credential=credential, **kwargs) + @distributed_trace_async async def get_service_stats(self, **kwargs): # type: (...) -> dict[str,object] @@ -174,12 +201,51 @@ async def create_table( :return: TableClient, or the result of cls(response) :rtype: ~azure.data.tables.TableClient or None :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table_async.py + :start-after: [START create_table] + :end-before: [END create_table] + :language: python + :dedent: 8 + :caption: Creating a table from TableServiceClient. """ - _validate_table_name(table_name) + table = self.get_table_client(table_name=table_name) + await table.create_table(**kwargs) + return table + + @distributed_trace_async + async def create_table_if_not_exists( + self, + table_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> TableClient + """Creates a new table if it does not currently exist. + If the table currently exists, the current table is + returned. + + :param table_name: The Table name. + :type table_name: str + :return: TableClient + :rtype: ~azure.data.tables.aio.TableClient + :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: - table_properties = TableProperties(table_name=table_name, **kwargs) - await self._client.table.create(table_properties=table_properties, **kwargs) - table = self.get_table_client(table=table_name) + .. literalinclude:: ../samples/sample_create_delete_table_async.py + :start-after: [START create_if_not_exists] + :end-before: [END create_if_not_exists] + :language: python + :dedent: 8 + :caption: Creating a table if it does not already exist + """ + table = self.get_table_client(table_name=table_name) + try: + await table.create_table(**kwargs) + except ResourceExistsError: + pass return table @distributed_trace_async @@ -195,24 +261,41 @@ async def delete_table( :type table_name: str :return: None :rtype: ~None - """ - _validate_table_name(table_name) - await self._client.table.delete(table=table_name, **kwargs) + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_create_delete_table_async.py + :start-after: [START delete_table] + :end-before: [END delete_table] + :language: python + :dedent: 8 + :caption: Deleting a table + """ + table = self.get_table_client(table_name=table_name) + await table.delete_table(**kwargs) @distributed_trace def list_tables( self, **kwargs # type: Any ): - # type: (...) -> AsyncItemPaged[Table] + # type: (...) -> AsyncItemPaged[TableItem] """Queries tables under the given account. :keyword int results_per_page: Number of tables per page in return ItemPaged :keyword Union[str, list(str)] select: Specify desired properties of a table to return certain tables :return: AsyncItemPaged - :rtype: ~AsyncItemPaged[Table] + :rtype: ~AsyncItemPaged[TableItem] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_query_tables_async.py + :start-after: [START tsc_list_tables] + :end-before: [END tsc_list_tables] + :language: python + :dedent: 8 + :caption: Listing all tables in an account """ user_select = kwargs.pop('select', None) if user_select and not isinstance(user_select, str): @@ -231,11 +314,10 @@ def list_tables( @distributed_trace def query_tables( - self, - filter, # pylint: disable=W0622 + self, filter, # type: str pylint: disable=W0622 **kwargs # type: Any ): - # type: (...) -> AsyncItemPaged[Table] + # type: (...) -> AsyncItemPaged[TableItem] """Queries tables under the given account. :param filter: Specify a filter to return certain tables :type filter: str @@ -243,8 +325,17 @@ def query_tables( :keyword Union[str, list(str)] select: Specify desired properties of a table to return certain tables :keyword dict parameters: Dictionary for formatting query with additional, user defined parameters :return: A query of tables - :rtype: AsyncItemPaged[Table] + :rtype: AsyncItemPaged[TableItem] :raises: ~azure.core.exceptions.HttpResponseError + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_query_tables_async.py + :start-after: [START tsc_query_tables] + :end-before: [END tsc_query_tables] + :language: python + :dedent: 8 + :caption: Querying tables in an account given specific parameters """ parameters = kwargs.pop('parameters', None) filter = self._parameter_filter_substitution(parameters, filter) # pylint: disable=W0622 @@ -262,24 +353,23 @@ def query_tables( page_iterator_class=TablePropertiesPaged ) - def get_table_client(self, table, **kwargs): - # type: (Union[TableProperties, str], Optional[Any]) -> TableClient + def get_table_client( + self, table_name, # type: str + **kwargs # type: Optional[Any] + ): + # type: (...) -> TableClient """Get a client to interact with the specified table. - The table need not already exist. + The table need not already exist. - :param table: - The queue. This can either be the name of the queue, - or an instance of QueueProperties. - :type table: str or ~azure.storage.table.TableProperties - :returns: A :class:`~azure.data.tables.TableClient` object. - :rtype: ~azure.data.tables.TableClient + :param table: + The queue. This can either be the name of the queue, + or an instance of QueueProperties. + :type table: str or ~azure.storage.table.TableProperties + :returns: A :class:`~azure.data.tables.TableClient` object. + :rtype: ~azure.data.tables.TableClient - """ - try: - table_name = table.name - except AttributeError: - table_name = table + """ _pipeline = AsyncPipeline( transport=AsyncTransportWrapper(self._pipeline._transport), # pylint: disable = protected-access diff --git a/sdk/tables/azure-data-tables/dev_requirements.txt b/sdk/tables/azure-data-tables/dev_requirements.txt index 5547db3c87f7d..4a940812c6839 100644 --- a/sdk/tables/azure-data-tables/dev_requirements.txt +++ b/sdk/tables/azure-data-tables/dev_requirements.txt @@ -3,4 +3,5 @@ ../../core/azure-core cryptography>=2.1.4 aiohttp>=3.0; python_version >= '3.5' - +azure-identity +../azure-data-nspkg \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/samples/README.md b/sdk/tables/azure-data-tables/samples/README.md new file mode 100644 index 0000000000000..a91648d07aa45 --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/README.md @@ -0,0 +1,79 @@ +--- +page_type: sample +languages: + - python +products: + - azure + - azure-table-storage +urlFragment: tables-samples +--- + +# Samples for Azure Tables client library for Python + +These code samples show common scenario operations with the Azure Data Tables client library. +The async versions of the samples require Python 3.5 or later. + +You can authenticate your client with a Tables API key: +* See [sample_authentication.py][sample_authentication] and [sample_authentication_async.py][sample_authentication_async] for how to authenticate in the above cases. + +These sample programs show common scenarios for the Tables client's offerings. + +|**File Name**|**Description**| +|-------------|---------------| +|[sample_create_client.py][create_client] and [sample_create_client_async.py][create_client_async]|Instantiate a table client|Authorizing a `TableServiceClient` object and `TableClient` object| +|[sample_create_delete_table.py][create_delete_table] and [sample_create_delete_table_async.py][create_delete_table_async]|Creating and deleting a table in a storage account| +|[sample_insert_delete_entities.py][insert_delete_entities] and [sample_insert_delete_entities_async.py][insert_delete_entities_async]|Inserting and deleting individual entities in a table| +|[sample_query_tables.py][query_tables] and [sample_query_tables_async.py][query_tables_async]|Querying tables in a storage account| +|[sample_update_upsert_merge_entities.py][update_upsert_merge] and [sample_update_upsert_merge_entities_async.py][update_upsert_merge_async]| Updating, upserting, and merging entities| + + +### Prerequisites +* Python 2.7, or 3.5 or later is required to use this package. +* You must have an [Azure subscription](https://azure.microsoft.com/free/) and either an +[Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) or an [Azure Cosmos Account](https://docs.microsoft.com/azure/cosmos-db/account-overview) to use this package. + +## Setup + +1. Install the Azure Data Tables client library for Python with [pip](https://pypi.org/project/pip/): +```bash +pip install --pre azure-data-tables +``` +2. Clone or download this sample repository +3. Open the sample folder in Visual Studio Code or your IDE of choice. + +## Running the samples + +1. Open a terminal window and `cd` to the directory that the samples are saved in. +2. Set the environment variables specified in the sample file you wish to run. +3. Follow the usage described in the file, e.g. `python sample_create_table.py` + +## Next steps + +Check out the [API reference documentation][api_reference_documentation] to learn more about +what you can do with the Azure Data Tables client library. + + + +[api_reference_documentation]: https://aka.ms/azsdk/python/tables/docs + +[sample_authentication]:https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_authentication.py +[sample_authentication_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_authentication_async.py + +[create_client]:https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_create_client.py +[create_client_async]:https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_create_client_async.py + +[create_delete_table]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py +[create_delete_table_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py + +[insert_delete_entities]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py +[insert_delete_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py + +[query_entities]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_query_table.py +[query_table_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_query_table_async.py + +[query_tables]:https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_query_tables.py +[query_tables_async]:https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py + +[update_upsert_merge]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py +[update_upsert_merge_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/tables/azure-data-tables/README.png) \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_authentication_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_authentication_async.py new file mode 100644 index 0000000000000..e0318f236aee0 --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_authentication_async.py @@ -0,0 +1,90 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_authentication_async.py + +DESCRIPTION: + These samples demonstrate authenticating a client via: + * connection string + * shared access key + * generating a sas token with which the returned signature can be used with + the credential parameter of any TableServiceClient or TableClient + +USAGE: + python sample_authentication_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account + 2) AZURE_STORAGE_ACCOUNT_URL - the Table service account URL + 3) AZURE_STORAGE_ACCOUNT_NAME - the name of the storage account + 4) AZURE_STORAGE_ACCESS_KEY - the storage account access key +""" + + +from datetime import datetime, timedelta +import os +import asyncio + +class TableAuthSamples(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + access_key = os.getenv("AZURE_TABLES_KEY") + account_url = os.getenv("AZURE_TABLES_ACCOUNT_URL") + account_name = os.getenv("AZURE_TABLES_ACCOUNT_NAME") + + async def authentication_by_connection_string(self): + # Instantiate a TableServiceClient using a connection string + # [START auth_from_connection_string] + from azure.data.tables.aio import TableServiceClient + table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) + properties = await table_service.get_service_properties() + print("Connection String: {}".format(properties)) + # [END auth_from_connection_string] + + async def authentication_by_shared_key(self): + # Instantiate a TableServiceClient using a shared access key + # [START auth_from_shared_key] + from azure.data.tables.aio import TableServiceClient + table_service = TableServiceClient(account_url=self.account_url, credential=self.access_key) + properties = await table_service.get_service_properties() + print("Shared Key: {}".format(properties)) + # [END auth_from_shared_key] + + async def authentication_by_shared_access_signature(self): + # Instantiate a TableServiceClient using a connection string + # [START auth_by_sas] + from azure.data.tables.aio import TableServiceClient + table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) + + # Create a SAS token to use for authentication of a client + from azure.data.tables import generate_account_sas, ResourceTypes, AccountSasPermissions + print(self.account_name) + sas_token = generate_account_sas( + self.account_name, + self.access_key, + resource_types=ResourceTypes(service=True), + permission=AccountSasPermissions(read=True), + expiry=datetime.utcnow() + timedelta(hours=1) + ) + + token_auth_table_service = TableServiceClient(account_url=self.account_url, credential=sas_token) + # [END auth_by_sas] + + properties = await table_service.get_service_properties() + print("Shared Access Signature: {}".format(properties)) + + +async def main(): + sample = TableAuthSamples() + await sample.authentication_by_connection_string() + await sample.authentication_by_shared_key() + await sample.authentication_by_shared_access_signature() + + +if __name__ == '__main__': + asyncio.run(main()) \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_create_client_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_create_client_async.py new file mode 100644 index 0000000000000..01a6736b4fffd --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_create_client_async.py @@ -0,0 +1,60 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_create_client_async.py + +DESCRIPTION: + These samples demonstrate authenticating a client via: + * connection string + * shared access key + * generating a sas token with which the returned signature can be used with + the credential parameter of any TableServiceClient or TableClient + +USAGE: + python sample_create_client_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account + 2) AZURE_STORAGE_ACCOUNT_URL - the Table service account URL + 3) AZURE_STORAGE_ACCOUNT_NAME - the name of the storage account + 4) AZURE_STORAGE_ACCESS_KEY - the storage account access key +""" + + +from datetime import datetime, timedelta +import os +import asyncio + + +class CreateClients(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + access_key = os.getenv("AZURE_TABLES_KEY") + account_url = os.getenv("AZURE_TABLES_ACCOUNT_URL") + account_name = os.getenv("AZURE_TABLES_ACCOUNT_NAME") + my_table = os.getenv("AZURE_TABLES_NAME") or "" + + async def create_table_client(self): + # Instantiate a TableServiceClient using a connection string + # [START create_table_client] + from azure.data.tables.aio import TableClient + table_client = TableClient.from_connection_string( + conn_str=self.connection_string, + table_name="tableName" + ) + print("Table name: {}".format(table_client.table_name)) + # [END create_table_client] + + +async def main(): + sample = CreateClients() + await sample.create_table_client() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py new file mode 100644 index 0000000000000..9c2f906f7133b --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_create_delete_table_async.py + +DESCRIPTION: + These samples demonstrate creating and deleting individual tables from the + TableServiceClient and TableClient + +USAGE: + python sample_create_client_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account + 2) AZURE_STORAGE_ACCOUNT_URL - the Table service account URL + 3) AZURE_STORAGE_ACCOUNT_NAME - the name of the storage account + 4) AZURE_STORAGE_ACCESS_KEY - the storage account access key +""" + +import os +import logging +import asyncio + +_LOGGER = logging.getLogger(__name__) + +class CreateDeleteTable(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + access_key = os.getenv("AZURE_TABLES_KEY") + account_url = os.getenv("AZURE_TABLES_ACCOUNT_URL") + account_name = os.getenv("AZURE_TABLES_ACCOUNT_NAME") + table_name = "OfficeSupplies" + + + async def create_table(self): + from azure.data.tables.aio import TableServiceClient + from azure.core.exceptions import ResourceExistsError + + # [START create_table] + table_service_client = TableServiceClient.from_connection_string(self.connection_string) + try: + table_item = await table_service_client.create_table(table_name=self.table_name) + print("Created table {}!".format(table_item.table_name)) + except ResourceExistsError: + print("Table already exists") + # [END create_table] + + async def create_if_not_exists(self): + from azure.data.tables.aio import TableServiceClient + + # [START create_if_not_exists] + table_service_client = TableServiceClient.from_connection_string(self.connection_string) + table_item = TableServiceClient.create_table_if_not_exists(table_name=self.table_name) + print("Table name: {}".format(table_item.table_name)) + # [END create_if_not_exists] + + async def delete_table(self): + from azure.data.tables.aio import TableServiceClient + from azure.core.exceptions import ResourceNotFoundError + + # [START delete_table] + table_service_client = TableServiceClient.from_connection_string(self.connection_string) + try: + await table_service_client.delete_table(table_name=self.table_name) + print("Deleted table {}!".format(self.table_name)) + except ResourceNotFoundError: + print("Table could not be found") + # [END delete_table] + + async def create_from_table_client(self): + from azure.data.table import TableClient + + # [START create_from_table_client] + table_client = TableClient.from_connection_string( + conn_str=self.connection_string, + table_name=self.table_name + ) + try: + table_item = await table_client.create_table() + print("Created table {}!".format(table_item.table_name)) + except ResourceExistsError: + print("Table already exists") + # [END create_from_table_client] + + async def delete_from_table_client(self): + from azure.data.table import TableClient + + # [START delete_from_table_client] + table_client = TableClient.from_connection_string( + conn_str=self.connection_string, + table_name=self.table_name + ) + try: + await table_client.delete_table() + print("Deleted table {}!".format(self.table_name)) + except ResourceExistsError: + print("Table already exists") + # [END delete_from_table_client] + + +async def main(): + sample = CreateDeleteTable() + await sample.create_table() + await sample.delete_table() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py new file mode 100644 index 0000000000000..486d1c62dd7db --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py @@ -0,0 +1,93 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_insert_delete_entities_async.py + +DESCRIPTION: + These samples demonstrate the following: inserting entities into a table + and deleting tables from a table. + +USAGE: + python sample_insert_delete_entities_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + +import os +import asyncio + +class InsertDeleteEntity(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + access_key = os.getenv("AZURE_TABLES_KEY") + account_url = os.getenv("AZURE_TABLES_ACCOUNT_URL") + account_name = os.getenv("AZURE_TABLES_ACCOUNT_NAME") + table_name = "OfficeSupplies" + + entity = { + 'PartitionKey': 'color', + 'RowKey': 'brand', + 'text': 'Marker', + 'color': 'Purple', + 'price': '5' + } + + async def create_entity(self): + from azure.data.tables.aio import TableClient + from azure.core.exceptions import ResourceExistsError, HttpResponseError + + table_client = TableClient.from_connection_string(self.connection_string, self.table_name) + + # Create a table in case it does not already exist + # [START create_entity] + try: + await table_client.create_table() + except HttpResponseError: + print("Table already exists") + + try: + entity = await table_client.create_entity(entity=self.entity) + print(entity) + except ResourceExistsError: + print("Entity already exists") + # [END create_entity] + + + async def delete_entity(self): + from azure.data.tables.aio import TableClient + from azure.core.exceptions import ResourceNotFoundError, ResourceExistsError + from azure.core import MatchConditions + + table_client = TableClient(account_url=self.account_url, credential=self.access_key, table_name=self.table_name) + + # [START delete_entity] + try: + resp = await table_client.create_entity(entity=self.entity) + except ResourceExistsError: + print("Entity already exists!") + + try: + await table_client.delete_entity( + row_key=self.entity["RowKey"], + partition_key=self.entity["PartitionKey"] + ) + print("Successfully deleted!") + except ResourceNotFoundError: + print("Entity does not exists") + # [END delete_entity] + + +async def main(): + ide = InsertDeleteEntity() + await ide.create_entity() + await ide.delete_entity() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_query_table_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_query_table_async.py new file mode 100644 index 0000000000000..5d9de777a1327 --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_query_table_async.py @@ -0,0 +1,85 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_query_table_async.py + +DESCRIPTION: + These samples demonstrate the following: querying a table for entities. + +USAGE: + python sample_query_table_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + +import os +import copy +import random +import asyncio + +class SampleTablesQuery(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + table_name = "OfficeSupplies" + + entity_name = "marker" + + name_filter = "Name eq '{}'".format(entity_name) + + async def _insert_random_entities(self): + from azure.data.tables.aio import TableClient + brands = ["Crayola", "Sharpie", "Chameleon"] + colors = ["red", "blue", "orange", "yellow"] + names = ["marker", "pencil", "pen"] + entity_template = { + "PartitionKey": "pk", + "RowKey": "row", + } + + table_client = TableClient.from_connection_string(self.connection_string, self.table_name) + await table_client.create_table() + + for i in range(10): + e = copy.deepcopy(entity_template) + e["RowKey"] += str(i) + e["Name"] = random.choice(names) + e["Brand"] = random.choice(brands) + e["Color"] = random.choice(colors) + await table_client.create_entity(entity=e) + + + async def sample_query_entities(self): + await self._insert_random_entities() + from azure.data.tables.aio import TableClient + from azure.core.exceptions import HttpResponseError + + table_client = TableClient.from_connection_string(self.connection_string, self.table_name) + # [START query_entities] + try: + entity_name = "marker" + name_filter = "Name eq '{}'".format(entity_name) + queried_entities = table_client.query_entities(filter=name_filter, select=["Brand","Color"]) + + for entity_chosen in queried_entities: + print(entity_chosen) + + except HttpResponseError as e: + pass + # [END query_entities] + finally: + await table_client.delete_table() + + +async def main(): + stq = SampleTablesQuery() + await stq.sample_query_entities() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py new file mode 100644 index 0000000000000..73256373ac0ec --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py @@ -0,0 +1,79 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_query_tables_async.py + +DESCRIPTION: + These samples demonstrate the following: listing and querying all Tables within + a storage account. + +USAGE: + python sample_query_tables_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + +import os +import asyncio + +class QueryTables(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + table_name = "OfficeSupplies" + + async def tables_in_account(self): + # Instantiate the TableServiceClient from a connection string + from azure.data.tables.aio import TableServiceClient + table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) + + await table_service.create_table("mytable1") + await table_service.create_table("mytable2") + + try: + # [START tsc_list_tables] + # List all the tables in the service + list_tables = table_service.list_tables() + print("Listing tables:") + for table in list_tables: + print("\t{}".format(table.table_name)) + # [END tsc_list_tables] + + # [START tsc_query_tables] + # Query for "table1" in the tables created + table_name = "mytable1" + name_filter = "TableName eq '{}'".format(table_name) + queried_tables = table_service.query_tables(filter=name_filter, results_per_page=10) + + print("Queried_tables") + for table in queried_tables: + print("\t{}".format(table.table_name)) + # [END tsc_query_tables] + + finally: + await self.delete_tables() + + async def delete_tables(self): + from azure.data.tables.aio import TableServiceClient + ts = TableServiceClient.from_connection_string(conn_str=self.connection_string) + tables = ["mytable1", "mytable2"] + for table in tables: + try: + await ts.delete_table(table_name=table) + except: + pass + + +async def main(): + sample = QueryTables() + await sample.delete_tables() + await sample.tables_in_account() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py new file mode 100644 index 0000000000000..5df180ad7e069 --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py @@ -0,0 +1,146 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_update_upsert_merge_entities_async.py + +DESCRIPTION: + These samples demonstrate the following: updating, upserting, and merging entities. + +USAGE: + python sample_update_upsert_merge_entities_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + +from datetime import datetime, timedelta +import os +import asyncio + + +class TableEntitySamples(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + + async def create_and_get_entities(self): + # Instantiate a table service client + from azure.data.tables.aio import TableClient + table = TableClient.from_connection_string(self.connection_string, table_name="mytable3") + + # Create the Table + await table.create_table() + + my_entity = { + 'PartitionKey': 'color', + 'RowKey': 'crayola', + 'text': 'Marker', + 'color': 'Purple', + 'price': '5' + } + try: + created_entity = await table.create_entity(entity=my_entity) + print("Created entity: {}".format(created_entity)) + + # [START get_entity] + # Get Entity by partition and row key + got_entity = await table.get_entity(partition_key=my_entity['PartitionKey'], + row_key=my_entity['RowKey']) + print("Received entity: {}".format(got_entity)) + # [END get_entity] + + finally: + # Delete the table + await table.delete_table() + + async def list_all_entities(self): + # Instantiate a table service client + from azure.data.tables.aio import TableClient + table = TableClient.from_connection_string(self.connection_string, table_name="mytable4") + + # Create the table + table.create_table() + + entity = {'PartitionKey': 'color2', 'RowKey': 'sharpie', 'text': 'Marker', 'color': 'Purple', 'price': '5'} + entity1 = {'PartitionKey': 'color2', 'RowKey': 'crayola', 'text': 'Marker', 'color': 'Red', 'price': '3'} + + try: + # Create entities + await table.create_entity(entity=entity) + await table.create_entity(entity=entity1) + # [START list_entities] + # Query the entities in the table + entities = list(table.list_entities()) + + for entity, i in enumerate(entities): + print("Entity #{}: {}".format(entity, i)) + # [END list_entities] + + finally: + # Delete the table + await table.delete_table() + + async def update_entities(self): + # Instantiate a table service client + from azure.data.tables.aio import TableClient + from azure.data.tables import UpdateMode + table = TableClient.from_connection_string(self.connection_string, table_name="mytable6") + + # Create the table and Table Client + await table.create_table() + + entity = {'PartitionKey': 'color', 'RowKey': 'sharpie', 'text': 'Marker', 'color': 'Purple', 'price': '5'} + + try: + # Create entities + created = await table.create_entity(entity=entity) + + # [START upsert_entity] + # Try Replace and then Insert on Fail + insert_entity = await table.upsert_entity(mode=UpdateMode.REPLACE, entity=entity1) + print("Inserted entity: {}".format(insert_entity)) + + # Try merge, and merge since already in table + created.text = "NewMarker" + merged_entity = await table.upsert_entity(mode=UpdateMode.MERGE, entity=entity) + print("Merged entity: {}".format(merged_entity)) + # [END upsert_entity] + + # [START update_entity] + # Update the entity + created.text = "NewMarker" + await table.update_entity(mode=UpdateMode.REPLACE, entity=created) + + # Get the replaced entity + replaced = await table.get_entity( + partition_key=created.PartitionKey, row_key=created.RowKey) + print("Replaced entity: {}".format(replaced)) + + # Merge the entity + replaced.color = "Blue" + await table.update_entity(mode=UpdateMode.MERGE, entity=replaced) + + # Get the merged entity + merged = await table.get_entity( + partition_key=replaced.PartitionKey, row_key=replaced.RowKey) + print("Merged entity: {}".format(merged)) + # [END update_entity] + + finally: + # Delete the table + await table.delete_table() + + +async def main(): + sample = TableEntitySamples() + await sample.create_and_get_entities() + await sample.list_all_entities() + await sample.update_entities() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/tables/azure-data-tables/samples/create_query_entities.py b/sdk/tables/azure-data-tables/samples/create_query_entities.py deleted file mode 100644 index 7277f7c9e0672..0000000000000 --- a/sdk/tables/azure-data-tables/samples/create_query_entities.py +++ /dev/null @@ -1,30 +0,0 @@ -class CreateODataQuery(object): - connection_string = "DefaultEndpointsProtocol=https;AccountName=example;AccountKey" \ - "=fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==;EndpointSuffix=core.windows.net " - account_url = "https://example.table.core.windows.net/" - account_name = "example" - access_key = "fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==" - - partition_key = "color" - row_key = "brand" - # Creating query filter for that table - table_name = "Office Supplies" - entity_name = "marker" - name_filter = "EntityName eq '{}'".format(entity_name) - - def sample_query_entities(self): - - from azure.data.tables import TableClient - from azure.core.exceptions import HttpResponseError - - table_client = TableClient(account_url=self.account_url, credential=self.access_key, table_name=self.table_name) - try: - queried_entities = table_client.query_entities(filter=self.name_filter, select="brand,color") - - # queried_entities type is ItemPaged - for entity_chosen in queried_entities: - # create a list of the entities and iterate through them to print each one out - # calls to the service to get more entities are made without user knowledge - print(entity_chosen) - except HttpResponseError as e: - print(e.message) diff --git a/sdk/tables/azure-data-tables/samples/creation_deletion_of_table.py b/sdk/tables/azure-data-tables/samples/creation_deletion_of_table.py deleted file mode 100644 index 018c703b58949..0000000000000 --- a/sdk/tables/azure-data-tables/samples/creation_deletion_of_table.py +++ /dev/null @@ -1,63 +0,0 @@ -class CreateDeleteTable(object): - connection_string = "DefaultEndpointsProtocol=https;AccountName=example;AccountKey=fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==;EndpointSuffix=core.windows.net" - table_name = "OfficeSupplies" - account_url = "https://example.table.core.windows.net/" - account_name = "example" - access_key = "fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==" - - def shared_key_credential(self): - from azure.data.tables import TableServiceClient - - table_service_client = TableServiceClient(account_url=self.account_url, credential=self.access_key) - - def connection_string_auth(self): - from azure.data.tables import TableServiceClient - - table_service_client = TableServiceClient.from_connection_string(conn_str=self.connection_string) - - def sas_token_auth(self): - from azure.data.tables import ( - TableServiceClient, - ResourceTypes, - AccountSasPermissions, - generate_account_sas - ) - import datetime - import timedelta - - token = generate_account_sas( - account_name=self.account_name, - account_key=self.account_key, - resource_types=ResourceTypes(object=True), - permission=AccountSasPermissions(read=True), - expiry=datetime.utcnow() + timedelta(hours=1), - start=datetime.utcnow() - timedelta(minutes=1), - ) - table_service_client = TableServiceClient(account_url=self.account_url,credential=token) - - def create_table(self): - from azure.data.tables import TableServiceClient - from azure.core.exceptions import ResourceExistsError - - table_service_client = TableServiceClient(account_url=self.account_url, credential=self.access_key) - try: - table_created = table_service_client.create_table(table_name=self.table_name) - print(table_created.table_name) - except ResourceExistsError: - print("TableExists") - - def delete_table(self): - from azure.data.tables import TableServiceClient - from azure.core.exceptions import ResourceNotFoundError - - table_service_client = TableServiceClient(account_url=self.account_url, credential=self.access_key) - try: - table_service_client.delete_table(table_name=self.table_name) - except ResourceNotFoundError: - print("TableNotFound") - - -if __name__ == '__main__': - sample = CreateDeleteTable() - sample.create_table() - sample.delete_table() diff --git a/sdk/tables/azure-data-tables/samples/inserting_deleting_entities.py b/sdk/tables/azure-data-tables/samples/inserting_deleting_entities.py deleted file mode 100644 index 10c6a35f14536..0000000000000 --- a/sdk/tables/azure-data-tables/samples/inserting_deleting_entities.py +++ /dev/null @@ -1,58 +0,0 @@ -class InsertDeleteEntity(object): - connection_string = "DefaultEndpointsProtocol=https;AccountName=example;AccountKey=fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==;EndpointSuffix=core.windows.net" - table_name = "NAME" - account_url = "https://example.table.core.windows.net/" - account_name = "example" - access_key = "fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==" - - # Assuming there is a created table - entity = { - 'PartitionKey': 'color', - 'RowKey': 'brand', - 'text': 'Marker', - 'color': 'Purple', - 'price': '5' - } - - def create_entity(self): - - from azure.data.tables import TableClient - from azure.core.exceptions import ResourceExistsError - - table_client = TableClient(account_url=self.account_url, credential=self.access_key, table_name=self.table_name) - try: - inserted_entity = table_client.create_entity(entity=self.entity) - # inserted_entity type is dict[str,object] - print(inserted_entity.items()) # print out key-value pair of entity - except ResourceExistsError: - print("EntityExists") - - def delete_entity(self): - - from azure.data.tables import TableClient - from azure.core.exceptions import ResourceNotFoundError - from azure.core import MatchConditions - - table_client = TableClient(account_url=self.account_url, credential=self.access_key, table_name=self.table_name) - - # Create entity to delete (to showcase etag) - entity_created = table_client.create_entity(entity=self.entity) - - # show without calling metadata, cannot access etag - try: - entity_created.etag - except AttributeError: - print("Need to get metadata of entity") - - # In order to access etag as a part of the entity, need to call metadata on the entity - metadata = entity_created.metadata() - - # Can now get etag - etag = metadata['etag'] - - try: - # will delete if match_condition and etag are satisfied - table_client.delete_entity(entity=self.entity, etag=etag, match_condition=MatchConditions.IfNotModified) - - except ResourceNotFoundError: - print("EntityDoesNotExists") diff --git a/sdk/tables/azure-data-tables/samples/querying_table.py b/sdk/tables/azure-data-tables/samples/querying_table.py deleted file mode 100644 index 2dd69452b6eca..0000000000000 --- a/sdk/tables/azure-data-tables/samples/querying_table.py +++ /dev/null @@ -1,25 +0,0 @@ -class QueryTable(object): - connection_string = "DefaultEndpointsProtocol=https;AccountName=example;AccountKey=fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==;EndpointSuffix=core.windows.net" - table_name = "NAME" - account_url = "https://example.table.core.windows.net/" - account_name = "example" - access_key = "fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==" - - # Creating query filter for that table - table_name = "Office Supplies" - name_filter = "TableName eq '{}'".format(table_name) - - def query_tables(self): - from azure.data.tables import TableServiceClient - - table_service_client = TableServiceClient(account_url=self.account_url, credential=self.access_key) - # Create Tables to query - my_table = table_service_client.create_table(table_name=self.table_name) - print(my_table) - # Query tables - queried_tables = table_service_client.query_tables(filter=self.name_filter, results_per_page=10) - # table_client.query_tables() returns an itemPaged - # queried_tables is a list of filtered tables - - for table in queried_tables: - print(table) diff --git a/sdk/tables/azure-data-tables/samples/sample_authentication.py b/sdk/tables/azure-data-tables/samples/sample_authentication.py new file mode 100644 index 0000000000000..448a1a6fbbc5e --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/sample_authentication.py @@ -0,0 +1,85 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_authentication.py + +DESCRIPTION: + These samples demonstrate authenticating a client via: + * connection string + * shared access key + * generating a sas token with which the returned signature can be used with + the credential parameter of any TableServiceClient or TableClient + +USAGE: + python sample_authentication.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account + 2) AZURE_STORAGE_ACCOUNT_URL - the Table service account URL + 3) AZURE_STORAGE_ACCOUNT_NAME - the name of the storage account + 4) AZURE_STORAGE_ACCESS_KEY - the storage account access key +""" + + +from datetime import datetime, timedelta +import os + + +class TableAuthSamples(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + access_key = os.getenv("AZURE_TABLES_KEY") + account_url = os.getenv("AZURE_TABLES_ACCOUNT_URL") + account_name = os.getenv("AZURE_TABLES_ACCOUNT_NAME") + + def authentication_by_connection_string(self): + # Instantiate a TableServiceClient using a connection string + # [START auth_from_connection_string] + from azure.data.tables import TableServiceClient + table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) + properties = table_service.get_service_properties() + print("Connection String: {}".format(properties)) + # [END auth_from_connection_string] + + def authentication_by_shared_key(self): + # Instantiate a TableServiceClient using a shared access key + # [START auth_from_shared_key] + from azure.data.tables import TableServiceClient + table_service = TableServiceClient(account_url=self.account_url, credential=self.access_key) + properties = table_service.get_service_properties() + print("Shared Key: {}".format(properties)) + # [END auth_from_shared_key] + + def authentication_by_shared_access_signature(self): + # Instantiate a TableServiceClient using a connection string + from azure.data.tables import TableServiceClient + table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) + + # Create a SAS token to use for authentication of a client + # [START auth_from_sas] + from azure.data.tables import generate_account_sas, ResourceTypes, AccountSasPermissions + print(self.account_name) + sas_token = generate_account_sas( + self.account_name, + self.access_key, + resource_types=ResourceTypes(service=True), + permission=AccountSasPermissions(read=True), + expiry=datetime.utcnow() + timedelta(hours=1) + ) + + token_auth_table_service = TableServiceClient(account_url=self.account_url, credential=sas_token) + + properties = table_service.get_service_properties() + print("Shared Access Signature: {}".format(properties)) + # [END auth_from_sas] + +if __name__ == '__main__': + sample = TableAuthSamples() + sample.authentication_by_connection_string() + sample.authentication_by_shared_key() + sample.authentication_by_shared_access_signature() diff --git a/sdk/tables/azure-data-tables/samples/sample_create_client.py b/sdk/tables/azure-data-tables/samples/sample_create_client.py new file mode 100644 index 0000000000000..cf1be59562e2e --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/sample_create_client.py @@ -0,0 +1,60 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_create_client.py + +DESCRIPTION: + These samples demonstrate creating a TableServiceClient and a TableClient + +USAGE: + python sample_create_client.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account + 2) AZURE_STORAGE_ACCOUNT_URL - the Table service account URL + 3) AZURE_STORAGE_ACCOUNT_NAME - the name of the storage account + 4) AZURE_STORAGE_ACCESS_KEY - the storage account access key +""" + +from datetime import datetime, timedelta +import os + + +class CreateClients(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + access_key = os.getenv("AZURE_TABLES_KEY") + account_url = os.getenv("AZURE_TABLES_ACCOUNT_URL") + account_name = os.getenv("AZURE_TABLES_ACCOUNT_NAME") + my_table = os.getenv("AZURE_TABLES_NAME") or "" + + def create_table_client(self): + # Instantiate a TableServiceClient using a connection string + # [START create_table_client] + from azure.data.tables import TableClient + table_client = TableClient.from_connection_string( + conn_str=self.connection_string, + table_name="tableName" + ) + print("Table name: {}".format(table_client.table_name)) + # [END create_table_client] + + def create_table_service_client(self): + # Instantiate a TableServiceClient using a shared access key + # [START create_table_service_client] + from azure.data.tables import TableServiceClient + table_service = TableServiceClient(account_url=self.account_url, credential=self.access_key) + properties = table_service.get_service_properties() + print("Properties: {}".format(properties)) + # [END create_table_service_client] + + +if __name__ == '__main__': + sample = CreateClients() + sample.create_table_client() + sample.create_table_service_client() diff --git a/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py b/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py new file mode 100644 index 0000000000000..0e0b56fbb3ac5 --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py @@ -0,0 +1,104 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_create_delete_table.py + +DESCRIPTION: + These samples demonstrate creating a table and deleting a table ffrom a storage account + +USAGE: + python sample_create_delete_table.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + +import os +import logging + +_LOGGER = logging.getLogger(__name__) + +class CreateDeleteTable(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + access_key = os.getenv("AZURE_TABLES_KEY") + account_url = os.getenv("AZURE_TABLES_ACCOUNT_URL") + account_name = os.getenv("AZURE_TABLES_ACCOUNT_NAME") + table_name = "OfficeSupplies" + + + def create_table(self): + from azure.data.tables import TableServiceClient + from azure.core.exceptions import ResourceExistsError + + # [START create_table_from_tc] + table_service_client = TableServiceClient.from_connection_string(self.connection_string) + try: + table_item = table_service_client.create_table(table_name=self.table_name) + print("Created table {}!".format(table_item.table_name)) + except ResourceExistsError: + print("Table already exists") + # [END create_table_from_tc] + + def create_if_not_exists(self): + from azure.data.tables import TableServiceClient + + # [START create_table_if_not_exists] + table_service_client = TableServiceClient.from_connection_string(self.connection_string) + table_item = TableServiceClient.create_table_if_not_exists(table_name=self.table_name) + print("Table name: {}".format(table_item.table_name)) + # [END create_table_if_not_exists] + + def delete_table(self): + from azure.data.tables import TableServiceClient + from azure.core.exceptions import ResourceNotFoundError + + # [START delete_table_from_tc] + table_service_client = TableServiceClient.from_connection_string(self.connection_string) + try: + table_service_client.delete_table(table_name=self.table_name) + print("Deleted table {}!".format(self.table_name)) + except ResourceNotFoundError: + print("Table could not be found") + # [END delete_table_from_tc] + + def create_from_table_client(self): + from azure.data.table import TableClient + + # [START create_table_from_table_client] + table_client = TableClient.from_connection_string( + conn_str=self.connection_string, + table_name=self.table_name + ) + try: + table_item = table_client.create_table() + print("Created table {}!".format(table_item.table_name)) + except ResourceExistsError: + print("Table already exists") + # [END create_table_from_table_client] + + def delete_from_table_client(self): + from azure.data.table import TableClient + + # [START delete_table_from_table_client] + table_client = TableClient.from_connection_string( + conn_str=self.connection_string, + table_name=self.table_name + ) + try: + table_client.delete_table() + print("Deleted table {}!".format(self.table_name)) + except ResourceExistsError: + print("Table already exists") + # [END delete_table_from_table_client] + + +if __name__ == '__main__': + sample = CreateDeleteTable() + sample.create_table() + sample.delete_table() diff --git a/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py b/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py new file mode 100644 index 0000000000000..cb8bd2f4bcc82 --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py @@ -0,0 +1,85 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_insert_delete_entities.py + +DESCRIPTION: + These samples demonstrate the following: inserting entities into a table + and deleting tables from a table. + +USAGE: + python sample_insert_delete_entities.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + +import os + +class InsertDeleteEntity(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + table_name = "OfficeSupplies" + + entity = { + 'PartitionKey': 'color', + 'RowKey': 'brand', + 'text': 'Marker', + 'color': 'Purple', + 'price': '5' + } + + def create_entity(self): + from azure.data.tables import TableClient + from azure.core.exceptions import ResourceExistsError, HttpResponseError + + table_client = TableClient.from_connection_string(self.connection_string, self.table_name) + + # Create a table in case it does not already exist + try: + table_client.create_table() + except HttpResponseError: + print("Table already exists") + + # [START create_entity] + try: + entity = table_client.create_entity(entity=self.entity) + print(entity) + except ResourceExistsError: + print("Entity already exists") + # [END create_entity] + + def delete_entity(self): + from azure.data.tables import TableClient + from azure.core.exceptions import ResourceNotFoundError, ResourceExistsError + from azure.core import MatchConditions + + table_client = TableClient(account_url=self.account_url, credential=self.access_key, table_name=self.table_name) + + # Create entity to delete (to showcase etag) + try: + resp = table_client.create_entity(entity=self.entity) + except ResourceExistsError: + print("Entity already exists!") + + # [START delete_entity] + try: + table_client.delete_entity( + row_key=self.entity["RowKey"], + partition_key=self.entity["PartitionKey"] + ) + print("Successfully deleted!") + except ResourceNotFoundError: + print("Entity does not exists") + # [END delete_entity] + + +if __name__ == '__main__': + ide = InsertDeleteEntity() + ide.create_entity() + ide.delete_entity() \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/samples/sample_query_table.py b/sdk/tables/azure-data-tables/samples/sample_query_table.py new file mode 100644 index 0000000000000..7370150d3437d --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/sample_query_table.py @@ -0,0 +1,80 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_query_table.py + +DESCRIPTION: + These samples demonstrate the following: querying a table for entities. + +USAGE: + python sample_query_table.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + +import os +import copy +import random + +class SampleTablesQuery(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + access_key = os.getenv("AZURE_TABLES_KEY") + account_url = os.getenv("AZURE_TABLES_ACCOUNT_URL") + account_name = os.getenv("AZURE_TABLES_ACCOUNT_NAME") + table_name = "OfficeSupplies" + + + def _insert_random_entities(self): + from azure.data.tables import TableClient + brands = ["Crayola", "Sharpie", "Chameleon"] + colors = ["red", "blue", "orange", "yellow"] + names = ["marker", "pencil", "pen"] + entity_template = { + "PartitionKey": "pk", + "RowKey": "row", + } + + table_client = TableClient.from_connection_string(self.connection_string, self.table_name) + table_client.create_table() + + for i in range(10): + e = copy.deepcopy(entity_template) + e["RowKey"] += str(i) + e["Name"] = random.choice(names) + e["Brand"] = random.choice(brands) + e["Color"] = random.choice(colors) + table_client.create_entity(entity=e) + + + def sample_query_entities(self): + self._insert_random_entities() + from azure.data.tables import TableClient + from azure.core.exceptions import HttpResponseError + + table_client = TableClient.from_connection_string(self.connection_string, self.table_name) + # [START query_entities] + try: + entity_name = "marker" + name_filter = "Name eq '{}'".format(entity_name) + queried_entities = table_client.query_entities(filter=name_filter, select=["Brand","Color"]) + + for entity_chosen in queried_entities: + print(entity_chosen) + + except HttpResponseError as e: + print(e.message) + # [END query_entities] + + finally: + table_client.delete_table() + +if __name__ == '__main__': + stq = SampleTablesQuery() + stq.sample_query_entities() \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/samples/sample_query_tables.py b/sdk/tables/azure-data-tables/samples/sample_query_tables.py new file mode 100644 index 0000000000000..360599954a133 --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/sample_query_tables.py @@ -0,0 +1,77 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_query_tables.py + +DESCRIPTION: + These samples demonstrate the following: listing and querying all Tables within + a storage account. + +USAGE: + python sample_query_tables.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + +import os + + +class QueryTables(object): + connection_string = os.getenv("AZURE_TABLES_CONNECTION_STRING") + table_name = "OfficeSupplies" + + def tables_in_account(self): + # Instantiate the TableServiceClient from a connection string + from azure.data.tables import TableServiceClient + table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) + + # [START tsc_create_table] + table_service.create_table("mytable1") + table_service.create_table("mytable2") + # [END tsc_create_table] + + try: + # [START tsc_list_tables] + # List all the tables in the service + list_tables = table_service.list_tables() + print("Listing tables:") + for table in list_tables: + print("\t{}".format(table.table_name)) + # [END tsc_list_tables] + + # [START tsc_query_tables] + table_name = "mytable1" + name_filter = "TableName eq '{}'".format(table_name) + queried_tables = table_service.query_tables(filter=name_filter, results_per_page=10) + + print("Queried_tables") + for table in queried_tables: + print("\t{}".format(table.table_name)) + # [END tsc_query_tables] + + finally: + # [START tsc_delete_table] + self.delete_tables() + # [END tsc_delete_table] + + def delete_tables(self): + from azure.data.tables import TableServiceClient + ts = TableServiceClient.from_connection_string(conn_str=self.connection_string) + tables = ["mytable1", "mytable2"] + for table in tables: + try: + ts.delete_table(table_name=table) + except: + pass + +if __name__ == '__main__': + sample = QueryTables() + sample.delete_tables() + sample.tables_in_account() diff --git a/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py b/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py new file mode 100644 index 0000000000000..83a30569bac03 --- /dev/null +++ b/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py @@ -0,0 +1,147 @@ +# 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. +# -------------------------------------------------------------------------- + +""" +FILE: sample_update_upsert_merge_entities.py + +DESCRIPTION: + These samples demonstrate the following: updating, upserting, and merging entities. + +USAGE: + python sample_update_upsert_merge_entities.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account +""" + + +from datetime import datetime, timedelta +import os + + +class TableEntitySamples(object): + + def create_and_get_entities(self): + # Instantiate a table service client + from azure.data.tables import TableClient + table = TableClient.from_connection_string(self.connection_string, table_name="mytable3") + + # Create the Table + table.create_table() + + my_entity = { + 'PartitionKey': 'color', + 'RowKey': 'crayola', + 'text': 'Marker', + 'color': 'Purple', + 'price': '5' + } + try: + # [START create_entity] + created_entity = table.create_entity(entity=my_entity) + print("Created entity: {}".format(created_entity)) + # [END create_entity] + + # [START get_entity] + # Get Entity by partition and row key + got_entity = table.get_entity(partition_key=my_entity['PartitionKey'], + row_key=my_entity['RowKey']) + print("Received entity: {}".format(got_entity)) + # [END get_entity] + + finally: + # Delete the table + table.delete_table() + + def list_all_entities(self): + # Instantiate a table service client + from azure.data.tables import TableClient + table = TableClient.from_connection_string(self.connection_string, table_name="mytable4") + + # Create the table + table.create_table() + + entity = {'PartitionKey': 'color2', 'RowKey': 'sharpie', 'text': 'Marker', 'color': 'Purple', 'price': '5'} + entity1 = {'PartitionKey': 'color2', 'RowKey': 'crayola', 'text': 'Marker', 'color': 'Red', 'price': '3'} + + try: + # Create entities + table.create_entity(entity=entity) + table.create_entity(entity=entity1) + # [START query_entities] + # Query the entities in the table + entities = list(table.list_entities()) + + for entity, i in enumerate(entities): + print("Entity #{}: {}".format(entity, i)) + # [END query_entities] + + finally: + # Delete the table + table.delete_table() + + def update_entities(self): + # Instantiate a table service client + from azure.data.tables import TableClient + from azure.data.tables import UpdateMode + table = TableClient.from_connection_string(self.connection_string, table_name="mytable6") + + # Create the table and Table Client + table.create_table() + + entity = {'PartitionKey': 'color', 'RowKey': 'sharpie', 'text': 'Marker', 'color': 'Purple', 'price': '5'} + + try: + # Create entities + created = table.create_entity(entity=entity) + + # [START upsert_entity] + # Try Replace and then Insert on Fail + insert_entity = table.upsert_entity(mode=UpdateMode.REPLACE, entity=entity1) + print("Inserted entity: {}".format(insert_entity)) + + # Try merge, and merge since already in table + created.text = "NewMarker" + merged_entity = table.upsert_entity(mode=UpdateMode.MERGE, entity=entity) + print("Merged entity: {}".format(merged_entity)) + # [END upsert_entity] + + # [START update_entity] + # Update the entity + created.text = "NewMarker" + table.update_entity(mode=UpdateMode.REPLACE, entity=created) + + # Get the replaced entity + replaced = table.get_entity( + partition_key=created.PartitionKey, row_key=created.RowKey) + print("Replaced entity: {}".format(replaced)) + + # Merge the entity + replaced.color = "Blue" + table.update_entity(mode=UpdateMode.MERGE, entity=replaced) + + # Get the merged entity + merged = table.get_entity( + partition_key=replaced.PartitionKey, row_key=replaced.RowKey) + print("Merged entity: {}".format(merged)) + # [END update_entity] + + finally: + # Delete the table + table.delete_table() + + + + +if __name__ == '__main__': + sample = TableEntitySamples() + sample.set_access_policy() + sample.create_and_get_entities() + sample.list_all_entities() + sample.upsert_entities() + sample.update_entities() diff --git a/sdk/tables/azure-data-tables/samples/table_exists_error_handling.py b/sdk/tables/azure-data-tables/samples/table_exists_error_handling.py deleted file mode 100644 index bad368724447d..0000000000000 --- a/sdk/tables/azure-data-tables/samples/table_exists_error_handling.py +++ /dev/null @@ -1,24 +0,0 @@ -class TableErrorHandling: - connection_string = "DefaultEndpointsProtocol=https;AccountName=example;AccountKey=fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==;EndpointSuffix=core.windows.net" - table_name = "OfficeSupplies" - account_url = "https://example.table.core.windows.net/" - account_name = "example" - access_key = "fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==" - - def create_table_if_exists(self): - from azure.data.tables import TableServiceClient - from azure.core.exceptions import ResourceExistsError - - # create table - table_service_client = TableServiceClient(account_url=self.account_url, credential=self.access_key) - table_service_client.create_table(table_name=self.table_name) - try: - # try to create existing table, ResourceExistsError will be thrown - table_service_client.create_table(table_name=self.table_name) - except ResourceExistsError: - print("TableExists") - - -if __name__ == '__main__': - sample = TableErrorHandling() - sample.create_table_if_exists() \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/samples/table_samples_authentication.py b/sdk/tables/azure-data-tables/samples/table_samples_authentication.py deleted file mode 100644 index 8896918b1f592..0000000000000 --- a/sdk/tables/azure-data-tables/samples/table_samples_authentication.py +++ /dev/null @@ -1,88 +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. -# -------------------------------------------------------------------------- - -""" -FILE: table_samples_authentication.py - -DESCRIPTION: - These samples demonstrate authenticating a client via: - * connection string - * shared access key - * generating a sas token with which the returned signature can be used with - the credential parameter of any TableServiceClient or TableClient - -USAGE: - python table_samples_authentication.py - - Set the environment variables with your own values before running the sample: - 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account - 2) AZURE_STORAGE_ACCOUNT_URL - the Table service account URL - 3) AZURE_STORAGE_ACCOUNT_NAME - the name of the storage account - 4) AZURE_STORAGE_ACCESS_KEY - the storage account access key -""" - - -from datetime import datetime, timedelta -import os - - -class TableAuthSamples(object): - - connection_string = os.getenv("AZURE_STORAGE_CONNECTION_STRING") - - account_url = os.getenv("AZURE_STORAGE_ACCOUNT_URL") - account_name = os.getenv("AZURE_STORAGE_ACCOUNT_NAME") - access_key = os.getenv("AZURE_STORAGE_ACCESS_KEY") - - def authentication_by_connection_string(self): - # Instantiate a TableServiceClient using a connection string - # [START auth_from_connection_string] - from azure.data.tables import TableServiceClient - table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) - # [END auth_from_connection_string] - - # Get information for the Table Service - properties = table_service.get_service_properties() - - def authentication_by_shared_key(self): - # Instantiate a TableServiceClient using a shared access key - # [START create_Table_service_client] - from azure.data.tables import TableServiceClient - table_service = TableServiceClient(account_url=self.account_url, credential=self.access_key) - # [END create_table_service_client] - - # Get information for the Table Service - properties = table_service.get_service_properties() - - def authentication_by_shared_access_signature(self): - # Instantiate a TableServiceClient using a connection string - from azure.data.tables import TableServiceClient - table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) - - # Create a SAS token to use for authentication of a client - from azure.data.tables import generate_account_sas, ResourceTypes, AccountSasPermissions - - sas_token = generate_account_sas( - self.account_name, - self.access_key, - resource_types=ResourceTypes(service=True), - permission=AccountSasPermissions(read=True), - expiry=datetime.utcnow() + timedelta(hours=1) - ) - - token_auth_table_service = TableServiceClient(account_url=self.account_url, credential=sas_token) - - # Get information for the Table Service - properties = token_auth_table_service.get_service_properties() - - -if __name__ == '__main__': - sample = TableAuthSamples() - sample.authentication_by_connection_string() - sample.authentication_by_shared_key() - sample.authentication_by_shared_access_signature() diff --git a/sdk/tables/azure-data-tables/samples/table_samples_client.py b/sdk/tables/azure-data-tables/samples/table_samples_client.py deleted file mode 100644 index cb32c94196d05..0000000000000 --- a/sdk/tables/azure-data-tables/samples/table_samples_client.py +++ /dev/null @@ -1,212 +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. -# -------------------------------------------------------------------------- - -""" -FILE: table_samples_client.py - -DESCRIPTION: - These samples demonstrate the following: creating and setting an access policy to generate a - sas token, getting a table client from a table URL, setting and getting table - metadata, sending messages and receiving them individually, deleting and - clearing all messages, and peeking and updating messages. - -USAGE: - python table_samples_client.py - - Set the environment variables with your own values before running the sample: - 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account -""" - -from datetime import datetime, timedelta -import os - - -class TableEntitySamples(object): - connection_string = os.getenv("AZURE_STORAGE_CONNECTION_STRING") - - def set_access_policy(self): - # [START create_table_client_from_connection_string] - from azure.data.tables import TableClient - table = TableClient.from_connection_string(self.connection_string, table_name="mytable1") - # [END create_table_client_from_connection_string] - - # Create the Table - table.create_table() - - try: - # [START set_access_policy] - # Create an access policy - from azure.data.tables import AccessPolicy, TableSasPermissions - access_policy = AccessPolicy() - access_policy.start = datetime.utcnow() - timedelta(hours=1) - access_policy.expiry = datetime.utcnow() + timedelta(hours=1) - access_policy.permission = TableSasPermissions(add=True) - identifiers = {'my-access-policy-id': access_policy} - - # Set the access policy - table.set_table_access_policy(identifiers) - # [END set_access_policy] - - # Use the access policy to generate a SAS token - # [START table_client_sas_token] - from azure.data.tables import generate_table_sas - sas_token = generate_table_sas( - table.account_name, - table.table_name, - table.credential.account_key, - policy_id='my-access-policy-id' - ) - # [END table_client_sas_token] - - # Authenticate with the sas token - # [START create_table_client] - # token_auth_table = table.from_table_url( - # table_url=table.url, - # credential=sas_token - # ) - # [END create_table_client] - - finally: - # Delete the table - table.delete_table() - - def create_and_get_entities(self): - # Instantiate a table service client - from azure.data.tables import TableClient - table = TableClient.from_connection_string(self.connection_string, table_name="mytable3") - - # Create the Table - table.create_table() - - my_entity = { - 'PartitionKey': 'color', - 'RowKey': 'crayola', - 'text': 'Marker', - 'color': 'Purple', - 'price': '5' - } - try: - # [START create_entity] - created_entity = table.create_entity(table_entity_properties=my_entity) - print(created_entity) - # [END create_entity] - - # [START get_entity] - # Get Entity by partition and row key - got_entity = table.get_entity(partition_key=my_entity['PartitionKey'], - row_key=my_entity['RowKey']) - print(got_entity) - # [END get_entity] - - finally: - # Delete the table - table.delete_table() - - def query_entities(self): - # Instantiate a table service client - from azure.data.tables import TableClient - table = TableClient.from_connection_string(self.connection_string, table_name="mytable4") - - # Create the table - table.create_table() - - entity = {'PartitionKey': 'color2', 'RowKey': 'sharpie', 'text': 'Marker', 'color': 'Purple', 'price': '5'} - entity1 = {'PartitionKey': 'color2', 'RowKey': 'crayola', 'text': 'Marker', 'color': 'Red', 'price': '3'} - - try: - # Create entities - table.create_entity(table_entity_properties=entity) - table.create_entity(table_entity_properties=entity1) - # [START query_entities] - # Query the entities in the table - entities = list(table.query_entities()) - - for e in entities: - print(e) - # [END query_entities] - - finally: - # Delete the table - table.delete_table() - - def upsert_entities(self): - # Instantiate a table service client - from azure.data.tables import TableClient, UpdateMode - table = TableClient.from_connection_string(self.connection_string, table_name="mytable5") - - # Create the table - table.create_table() - - entity = {'PartitionKey': 'color', 'RowKey': 'sharpie', 'text': 'Marker', 'color': 'Purple', 'price': '5'} - entity1 = {'PartitionKey': 'color', 'RowKey': 'crayola', 'text': 'Marker', 'color': 'Red', 'price': '3'} - - try: - # Create entities - created = table.create_entity(table_entity_properties=entity) - - # [START upsert_entity] - # Try Replace and then Insert on Fail - insert_entity = table.upsert_entity(mode=UpdateMode.replace, table_entity_properties=entity1) - print(insert_entity) - - # Try merge, and merge since already in table - created.text = "NewMarker" - merged_entity = table.upsert_entity(mode=UpdateMode.MERGE, table_entity_properties=entity) - print(merged_entity) - # [END upsert_entity] - - finally: - # Delete the table - table.delete_table() - - def update_entities(self): - # Instantiate a table service client - from azure.data.tables import TableClient, UpdateMode - table = TableClient.from_connection_string(self.connection_string, table_name="mytable6") - - # Create the table and Table Client - table.create_table() - - entity = {'PartitionKey': 'color', 'RowKey': 'sharpie', 'text': 'Marker', 'color': 'Purple', 'price': '5'} - - try: - # Create entity - created = table.create_entity(table_entity_properties=entity) - - # [START update_entity] - # Update the entity - created.text = "NewMarker" - table.update_entity(mode=UpdateMode.replace, table_entity_properties=created) - - # Get the replaced entity - replaced = table.get_entity( - partition_key=created.PartitionKey, row_key=created.RowKey) - print(replaced) - - # Merge the entity - replaced.color = "Blue" - table.update_entity(mode=UpdateMode.MERGE, table_entity_properties=replaced) - - # Get the merged entity - merged = table.get_entity( - partition_key=replaced.PartitionKey, row_key=replaced.RowKey) - print(merged) - # [END update_entity] - - finally: - # Delete the table - table.delete_table() - - -if __name__ == '__main__': - sample = TableEntitySamples() - sample.set_access_policy() - sample.create_and_get_entities() - sample.query_entities() - sample.upsert_entities() - sample.update_entities() diff --git a/sdk/tables/azure-data-tables/samples/table_samples_service.py b/sdk/tables/azure-data-tables/samples/table_samples_service.py deleted file mode 100644 index eaf2bae86d9d3..0000000000000 --- a/sdk/tables/azure-data-tables/samples/table_samples_service.py +++ /dev/null @@ -1,114 +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. -# -------------------------------------------------------------------------- - -""" -FILE: table_samples_service.py - -DESCRIPTION: - These samples demonstrate the following: setting and getting table service properties, - listing the tables in the service, and getting a TableClient from a TableServiceClient. - -USAGE: - python table_samples_service.py - - Set the environment variables with your own values before running the sample: - 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account -""" - -import os - - -class TableServiceSamples(object): - connection_string = os.getenv("AZURE_STORAGE_CONNECTION_STRING") - - def table_service_properties(self): - # Instantiate the TableServiceClient from a connection string - from azure.data.tables import TableServiceClient - table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) - - # [START set_table_service_properties] - # Create service properties - from azure.data.tables import TableAnalyticsLogging, Metrics, CorsRule, RetentionPolicy - - # Create logging settings - logging = TableAnalyticsLogging(read=True, write=True, delete=True, - retention_policy=RetentionPolicy(enabled=True, days=5)) - - # Create metrics for requests statistics - hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) - minute_metrics = Metrics(enabled=True, include_apis=True, - retention_policy=RetentionPolicy(enabled=True, days=5)) - - # Create CORS rules - cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) - allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] - allowed_methods = ['GET', 'PUT'] - max_age_in_seconds = 500 - exposed_headers = ["x-ms-meta-data*", "x-ms-meta-source*", "x-ms-meta-abc", "x-ms-meta-bcd"] - allowed_headers = ["x-ms-meta-data*", "x-ms-meta-target*", "x-ms-meta-xyz", "x-ms-meta-foo"] - cors_rule2 = CorsRule( - allowed_origins, - allowed_methods, - max_age_in_seconds=max_age_in_seconds, - exposed_headers=exposed_headers, - allowed_headers=allowed_headers - ) - - cors = [cors_rule1, cors_rule2] - - # Set the service properties - table_service.set_service_properties(logging, hour_metrics, minute_metrics, cors) - # [END set_table_service_properties] - - # [START get_table_service_properties] - properties = table_service.get_service_properties() - # [END get_table_service_properties] - - def tables_in_account(self): - # Instantiate the TableServiceClient from a connection string - from azure.data.tables import TableServiceClient - table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) - - # [START tsc_create_table] - table_service.create_table("mytable1") - # [END tsc_create_table] - - try: - # [START tsc_list_tables] - # List all the tables in the service - list_tables = table_service.query_tables() - for table in list_tables: - print(table) - - # List the tables in the service that start with the name "my" - list_my_tables = table_service.query_tables(select="my") - for table in list_my_tables: - print(table) - # [END tsc_list_tables] - - finally: - # [START tsc_delete_table] - table_service.delete_table(table_name="mytable1") - # [END tsc_delete_table] - - def get_table_client(self): - # Instantiate the TableServiceClient from a connection string - from azure.data.tables import TableServiceClient, TableClient - table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string) - - # [START get_table_client] - # Get the table client to interact with a specific table - table = table_service.get_table_client(table="mytable2") - # [END get_table_client] - - -if __name__ == '__main__': - sample = TableServiceSamples() - sample.table_service_properties() - sample.tables_in_account() - sample.get_table_client() diff --git a/sdk/tables/azure-data-tables/samples/update_entity.py b/sdk/tables/azure-data-tables/samples/update_entity.py deleted file mode 100644 index 75af124aab9b2..0000000000000 --- a/sdk/tables/azure-data-tables/samples/update_entity.py +++ /dev/null @@ -1,36 +0,0 @@ -class UpdateEntity(object): - connection_string = "DefaultEndpointsProtocol=https;AccountName=example;AccountKey" \ - "=fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==;EndpointSuffix=core.windows.net " - table_name = "OfficeSupplies" - account_url = "https://example.table.core.windows.net/" - account_name = "example" - access_key = "fasgfbhBDFAShjDQ4jkvbnaBFHJOWS6gkjngdakeKFNLK==" - - # making keys not able to change - SEPARATE - entity = { - 'PartitionKey': 'color', - 'RowKey': 'brand', - 'text': 'Marker', - 'color': 'Purple', - 'price': '5' - } - - def update_entity(self): - from azure.data.tables import TableClient - from azure.core.exceptions import ResourceNotFoundError - - table_client = TableClient(account_url=self.account_url, credential=self.access_key, table_name=self.table_name) - try: - # defaults to UpdateMode.MERGE - table_client.update_entity(entity=self.entity) - except ResourceNotFoundError: - print("Entity does not exist") - - def upsert_entity(self): - from azure.data.tables import TableClient - from azure.data.tables._models import UpdateMode - - table_client = TableClient(account_url=self.account_url, credential=self.access_key, table_name=self.table_name) - - table_client.upsert_entity(entity=self.entity, mode=UpdateMode.REPLACE) - # no error will be thrown - it will insert diff --git a/sdk/tables/azure-data-tables/sdk_packaging.toml b/sdk/tables/azure-data-tables/sdk_packaging.toml new file mode 100644 index 0000000000000..e7687fdae93bc --- /dev/null +++ b/sdk/tables/azure-data-tables/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/setup.py b/sdk/tables/azure-data-tables/setup.py index 9cf68df37c3df..1651b14ff4cc0 100644 --- a/sdk/tables/azure-data-tables/setup.py +++ b/sdk/tables/azure-data-tables/setup.py @@ -70,6 +70,7 @@ # Exclude packages that will be covered by PEP420 or nspkg 'azure', 'tests', + 'azure.data', ]), install_requires=[ "azure-core<2.0.0,>=1.2.2", @@ -77,8 +78,8 @@ # azure-data-tables ], extras_require={ - ":python_version<'3.0'": ['futures'], + ":python_version<'3.0'": ['futures', 'azure-data-nspkg<2.0.0,>=1.0.0'], ":python_version<'3.4'": ['enum34>=1.0.4'], ":python_version<'3.5'": ["typing"] }, -) +) \ No newline at end of file diff --git a/sdk/tables/azure-data-tables/tests/_shared/testcase.py b/sdk/tables/azure-data-tables/tests/_shared/testcase.py index 3dcfde01bf480..d20eb80556db9 100644 --- a/sdk/tables/azure-data-tables/tests/_shared/testcase.py +++ b/sdk/tables/azure-data-tables/tests/_shared/testcase.py @@ -13,9 +13,6 @@ import time from datetime import datetime, timedelta -from azure.data.tables import ResourceTypes, AccountSasPermissions -from azure.data.tables._table_shared_access_signature import generate_account_sas - try: import unittest.mock as mock except ImportError: @@ -42,8 +39,8 @@ from io import StringIO from azure.core.credentials import AccessToken -#from azure.data.tabless import generate_account_sas, AccountSasPermissions, ResourceTypes from azure.mgmt.storage.models import StorageAccount, Endpoints +from azure.data.tables import generate_account_sas, AccountSasPermissions, ResourceTypes try: from devtools_testutils import mgmt_settings_real as settings @@ -351,6 +348,9 @@ def storage_account(): i_need_to_create_rg = not (existing_rg_name or existing_storage_name or storage_connection_string) got_storage_info_from_env = existing_storage_name or storage_connection_string + storage_name = None + rg_kwargs = {} + try: if i_need_to_create_rg: rg_name, rg_kwargs = rg_preparer._prepare_create_resource(test_case) @@ -431,11 +431,12 @@ def build_service_endpoint(service): TableTestCase._STORAGE_CONNECTION_STRING = storage_connection_string yield finally: - if not got_storage_info_from_env: - storage_preparer.remove_resource( - storage_name, - resource_group=rg - ) + if storage_name is not None: + if not got_storage_info_from_env: + storage_preparer.remove_resource( + storage_name, + resource_group=rg + ) finally: if i_need_to_create_rg: rg_preparer.remove_resource(rg_name) diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_account_sas.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_account_sas.yaml index 741501bf67f04..cea016fa99c54 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_account_sas.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_account_sas.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:33 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:33 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:14 GMT + - Wed, 02 Sep 2020 21:28:34 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesync99dc0b08') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: '{"PartitionKey": "test", "RowKey": "test1", "text": "hello"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/pytablesync99dc0b08(PartitionKey='test',RowKey='test1') response: @@ -81,15 +81,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:14 GMT + - Wed, 02 Sep 2020 21:28:34 GMT etag: - - W/"datetime'2020-07-30T13%3A30%3A15.8178135Z'" + - W/"datetime'2020-09-02T21%3A28%3A34.802669Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -97,7 +97,7 @@ interactions: body: '{"PartitionKey": "test", "RowKey": "test2", "text": "hello"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -109,13 +109,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/pytablesync99dc0b08(PartitionKey='test',RowKey='test2') response: @@ -127,15 +127,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:15 GMT + - Wed, 02 Sep 2020 21:28:34 GMT etag: - - W/"datetime'2020-07-30T13%3A30%3A15.9048723Z'" + - W/"datetime'2020-09-02T21%3A28%3A34.8386939Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -151,25 +151,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/pytablesync99dc0b08()?st=2020-07-30T13%3A29%3A16Z&se=2020-07-30T14%3A30%3A16Z&sp=r&sv=2019-07-07&ss=t&srt=o&sig=0OQL2hilfGTuH%2FU49GkWLVFZf6k3qzZxHLBJae7gShE%3D + uri: https://storagename.table.core.windows.net/pytablesync99dc0b08()?st=2020-09-02T21%3A27%3A34Z&se=2020-09-02T22%3A28%3A34Z&sp=r&sv=2019-02-02&ss=t&srt=o&sig=JfZWc21Pob2yz0NdvoPAhdZvrb4e0Kw2sET4KdTRa38%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#pytablesync99dc0b08","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A30%3A15.8178135Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-07-30T13:30:15.8178135Z","text":"hello"},{"odata.etag":"W/\"datetime''2020-07-30T13%3A30%3A15.9048723Z''\"","PartitionKey":"test","RowKey":"test2","Timestamp":"2020-07-30T13:30:15.9048723Z","text":"hello"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#pytablesync99dc0b08","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A34.802669Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-09-02T21:28:34.802669Z","text":"hello"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A34.8386939Z''\"","PartitionKey":"test","RowKey":"test2","Timestamp":"2020-09-02T21:28:34.8386939Z","text":"hello"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:15 GMT + - Wed, 02 Sep 2020 21:28:34 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -177,7 +177,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -185,7 +185,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -193,13 +193,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesync99dc0b08') response: @@ -211,13 +211,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:15 GMT + - Wed, 02 Sep 2020 21:28:34 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table.yaml index bf152c84c08bb..007c3f3bc160d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:34 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesynca4ed0b50') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -59,13 +59,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesynca4ed0b50') response: @@ -77,13 +77,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:16 GMT + - Wed, 02 Sep 2020 21:28:34 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_fail_on_exist.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_fail_on_exist.yaml index 54e63317d03e5..5716b340f548f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_fail_on_exist.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_fail_on_exist.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesync6d7c1113') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,26 +63,26 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: body: string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The - table specified already exists.\nRequestId:aaf65c7a-b002-0055-7875-66bf84000000\nTime:2020-07-30T13:30:17.3141296Z"}}}' + table specified already exists.\nRequestId:5e3d90e1-f002-002b-0170-81daaf000000\nTime:2020-09-02T21:28:35.4701621Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -90,7 +90,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 409 message: Conflict @@ -98,7 +98,49 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:34 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:34 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/Tables?$filter=TableName%20eq%20%27pytablesync6d7c1113%27 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[{"TableName":"pytablesync6d7c1113"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:34 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -106,13 +148,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesync6d7c1113') response: @@ -124,13 +166,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:34 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists.yaml new file mode 100644 index 0000000000000..51de805de3d8d --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists.yaml @@ -0,0 +1,137 @@ +interactions: +- request: + body: '{"TableName": "pytablesync2c5a0f7d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:34 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:34 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesync2c5a0f7d"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:34 GMT + location: + - https://storagename.table.core.windows.net/Tables('pytablesync2c5a0f7d') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "pytablesync2c5a0f7d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:35 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:35 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The + table specified already exists.\nRequestId:dd0de0e7-3002-0024-6470-81acc3000000\nTime:2020-09-02T21:28:35.7423602Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:35 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 409 + message: Conflict +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:35 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:35 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytablesync2c5a0f7d') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:35 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists_new_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists_new_table.yaml new file mode 100644 index 0000000000000..7762f41e639be --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists_new_table.yaml @@ -0,0 +1,90 @@ +interactions: +- request: + body: '{"TableName": "pytablesyncdd9e138d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:35 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:35 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesyncdd9e138d"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:35 GMT + location: + - https://storagename.table.core.windows.net/Tables('pytablesyncdd9e138d') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:35 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:35 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytablesyncdd9e138d') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:35 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_delete_table_with_existing_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_delete_table_with_existing_table.yaml index ce2bcfded581c..bb4e9d77ca58c 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_delete_table_with_existing_table.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_delete_table_with_existing_table.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:35 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:35 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:35 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesyncded1139b') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -59,13 +59,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:35 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:35 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesyncded1139b') response: @@ -77,14 +77,56 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:35 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:35 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:35 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/Tables?$filter=TableName%20eq%20%27pytablesyncded1139b%27 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:35 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_delete_table_with_non_existing_table_fail_not_exist.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_delete_table_with_non_existing_table_fail_not_exist.yaml index 9459690dfb9c6..6dafd34e4b01f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_delete_table_with_non_existing_table_fail_not_exist.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_delete_table_with_non_existing_table_fail_not_exist.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -11,30 +11,26 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:35 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:35 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesynca12c1b7c') response: body: - string: 'ResourceNotFoundThe specified resource does not exist. - - RequestId:380aef87-1002-0071-4675-6626ca000000 - - Time:2020-07-30T13:30:18.2321770Z' + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:cf8063ed-c002-0099-2770-8125de000000\nTime:2020-09-02T21:28:36.4489653Z"}}}' headers: cache-control: - no-cache content-type: - - application/xml;charset=utf-8 + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:17 GMT + - Wed, 02 Sep 2020 21:28:35 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -42,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 404 message: Not Found diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_get_table_acl.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_get_table_acl.yaml index 9d61c26b68bfa..c04b63ef194e6 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_get_table_acl.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_get_table_acl.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:35 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:35 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:36 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesyncb07a0bab') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -57,13 +57,13 @@ interactions: Connection: - keep-alive Date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/pytablesyncb07a0bab?comp=acl response: @@ -74,13 +74,13 @@ interactions: content-type: - application/xml date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:36 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -88,7 +88,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -96,13 +96,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesyncb07a0bab') response: @@ -114,13 +114,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:18 GMT + - Wed, 02 Sep 2020 21:28:36 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_list_tables.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_list_tables.yaml index 1eeeb4ad4a2d1..eeb9fa9d7c06c 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_list_tables.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_list_tables.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Mon, 06 Jul 2020 18:27:12 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 18:27:12 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Mon, 06 Jul 2020 18:27:05 GMT + - Wed, 02 Sep 2020 21:28:36 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesync9a730b0b') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -59,13 +59,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Mon, 06 Jul 2020 18:27:13 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 18:27:13 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables response: @@ -77,7 +77,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Mon, 06 Jul 2020 18:27:05 GMT + - Wed, 02 Sep 2020 21:28:36 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -85,7 +85,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -93,7 +93,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -101,13 +101,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 06 Jul 2020 18:27:13 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 18:27:13 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesync9a730b0b') response: @@ -119,13 +119,13 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 18:27:05 GMT + - Wed, 02 Sep 2020 21:28:36 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables.yaml index f7d5d473f2686..64156808523be 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables.yaml @@ -15,13 +15,21 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:19 GMT +<<<<<<< HEAD + - Wed, 02 Sep 2020 21:16:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:16:48 GMT +======= + - Fri, 28 Aug 2020 15:07:23 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 28 Aug 2020 15:07:23 GMT +>>>>>>> d32cfe4cfd2236cef594b5f013a80e80e9becdde x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +41,11 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:18 GMT +<<<<<<< HEAD + - Wed, 02 Sep 2020 21:16:47 GMT +======= + - Fri, 28 Aug 2020 15:07:23 GMT +>>>>>>> d32cfe4cfd2236cef594b5f013a80e80e9becdde location: - https://storagename.table.core.windows.net/Tables('pytablesynca68e0b85') server: @@ -43,7 +55,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -59,13 +71,21 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:20 GMT +<<<<<<< HEAD + - Wed, 02 Sep 2020 21:16:48 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:16:48 GMT +======= + - Fri, 28 Aug 2020 15:07:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Fri, 28 Aug 2020 15:07:23 GMT +>>>>>>> d32cfe4cfd2236cef594b5f013a80e80e9becdde x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables response: @@ -77,7 +97,10 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:18 GMT +<<<<<<< HEAD + - Wed, 02 Sep 2020 21:16:47 GMT +======= + - Fri, 28 Aug 2020 15:07:23 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -93,7 +116,50 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Fri, 28 Aug 2020 15:07:23 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 28 Aug 2020 15:07:23 GMT + x-ms-version: + - '2019-07-07' + method: GET + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[{"TableName":"pytablesynca68e0b85"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Fri, 28 Aug 2020 15:07:23 GMT +>>>>>>> d32cfe4cfd2236cef594b5f013a80e80e9becdde + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -101,13 +167,21 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:20 GMT +<<<<<<< HEAD + - Wed, 02 Sep 2020 21:16:48 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:16:48 GMT +======= + - Fri, 28 Aug 2020 15:07:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Fri, 28 Aug 2020 15:07:23 GMT +>>>>>>> d32cfe4cfd2236cef594b5f013a80e80e9becdde x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesynca68e0b85') response: @@ -119,13 +193,17 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:19 GMT +<<<<<<< HEAD + - Wed, 02 Sep 2020 21:16:47 GMT +======= + - Fri, 28 Aug 2020 15:07:23 GMT +>>>>>>> d32cfe4cfd2236cef594b5f013a80e80e9becdde server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_filter.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_filter.yaml index d178fe108c18e..fed310c6a5c4a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_filter.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_filter.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesync512a1085') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -59,13 +59,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables?$filter=TableName%20eq%20%27pytablesync512a1085%27 response: @@ -77,7 +77,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -85,7 +85,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -93,7 +93,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -101,13 +101,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesync512a1085') response: @@ -119,13 +119,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_marker.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_marker.yaml index 357c4ee127627..08f1952c0cb5a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_marker.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_marker.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT location: - https://storagename.table.core.windows.net/Tables('listtable051291081') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:19 GMT + - Wed, 02 Sep 2020 21:28:36 GMT location: - https://storagename.table.core.windows.net/Tables('listtable151291081') server: @@ -91,7 +91,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -111,13 +111,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -129,7 +129,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT location: - https://storagename.table.core.windows.net/Tables('listtable251291081') server: @@ -139,7 +139,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -159,13 +159,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -177,7 +177,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT location: - https://storagename.table.core.windows.net/Tables('listtable351291081') server: @@ -187,7 +187,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -203,13 +203,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables?$top=2 response: @@ -221,7 +221,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -229,9 +229,9 @@ interactions: x-content-type-options: - nosniff x-ms-continuation-nexttablename: - - 1!48!bGlzdHRhYmxlMjUxMjkxMDgxATAxZDY2Njc1OTI0MDk0Yjk- + - 1!48!bGlzdHRhYmxlMjUxMjkxMDgxATAxZDY4MTcwMDUwNDYyMjI- x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -247,15 +247,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/Tables?$top=2&NextTableName=1%2148%21bGlzdHRhYmxlMjUxMjkxMDgxATAxZDY2Njc1OTI0MDk0Yjk- + uri: https://storagename.table.core.windows.net/Tables?$top=2&NextTableName=1%2148%21bGlzdHRhYmxlMjUxMjkxMDgxATAxZDY4MTcwMDUwNDYyMjI- response: body: string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[{"TableName":"listtable251291081"},{"TableName":"listtable351291081"}]}' @@ -265,7 +265,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:36 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -273,9 +273,9 @@ interactions: x-content-type-options: - nosniff x-ms-continuation-nexttablename: - - 1!48!cHl0YWJsZXN5bmM1MTJhMTA4NQEwMWQ2NjY3NTkxY2M2MTAx + - 1!48!cHl0YWJsZXN5bmMyYzVhMGY3ZAEwMWQ2ODE3MDAzZmExNGFj x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_num_results.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_num_results.yaml index a0f64072a7d62..d5c826af21994 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_num_results.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_query_tables_with_num_results.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:36 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:37 GMT location: - https://storagename.table.core.windows.net/Tables('listtable0aab312c0') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:37 GMT location: - https://storagename.table.core.windows.net/Tables('listtable1aab312c0') server: @@ -91,7 +91,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -111,13 +111,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -129,7 +129,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:37 GMT location: - https://storagename.table.core.windows.net/Tables('listtable2aab312c0') server: @@ -139,7 +139,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -159,13 +159,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -177,7 +177,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:37 GMT location: - https://storagename.table.core.windows.net/Tables('listtable3aab312c0') server: @@ -187,7 +187,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -203,13 +203,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables?$top=3 response: @@ -221,7 +221,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:20 GMT + - Wed, 02 Sep 2020 21:28:37 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -229,9 +229,9 @@ interactions: x-content-type-options: - nosniff x-ms-continuation-nexttablename: - - 1!48!bGlzdHRhYmxlMWFhYjMxMmMwATAxZDY2Njc1OTJiM2I2Y2M- + - 1!48!bGlzdHRhYmxlMWFhYjMxMmMwATAxZDY4MTcwMDUzMDVjMjc- x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -247,13 +247,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables response: @@ -265,7 +265,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:37 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -273,7 +273,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml index 3940f45778b6c..19d45e88b719a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:37 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesync6f17111b') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -59,13 +59,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesync6f17111b') response: @@ -77,13 +77,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:21 GMT + - Wed, 02 Sep 2020 21:28:37 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml index f121bda2200bb..3bbb2f3be5fa3 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesyncd1eb182e') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -61,13 +61,13 @@ interactions: Content-Type: - application/xml Date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/pytablesyncd1eb182e?comp=acl response: @@ -77,11 +77,11 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -95,13 +95,13 @@ interactions: Connection: - keep-alive Date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/pytablesyncd1eb182e?comp=acl response: @@ -112,13 +112,13 @@ interactions: content-type: - application/xml date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -126,7 +126,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -134,13 +134,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesyncd1eb182e') response: @@ -152,13 +152,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:22 GMT + - Wed, 02 Sep 2020 21:28:37 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml index 7f509ff962ae3..7e435f96fc554 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:38 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesync45dd15a0') server: @@ -43,14 +43,14 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: body: ' - testid2020-07-30T13:25:24Z2020-07-30T14:30:24Zr' + testid2020-09-02T21:23:37Z2020-09-02T22:28:37Zr' headers: Accept: - application/xml @@ -63,13 +63,13 @@ interactions: Content-Type: - application/xml Date: - - Thu, 30 Jul 2020 13:30:24 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:24 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/pytablesync45dd15a0?comp=acl response: @@ -79,11 +79,11 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:38 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -97,29 +97,29 @@ interactions: Connection: - keep-alive Date: - - Thu, 30 Jul 2020 13:30:24 GMT + - Wed, 02 Sep 2020 21:28:37 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:24 GMT + - Wed, 02 Sep 2020 21:28:37 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/pytablesync45dd15a0?comp=acl response: body: - string: "\uFEFFtestid2020-07-30T13:25:24.0000000Z2020-07-30T14:30:24.0000000Zr" + string: "\uFEFFtestid2020-09-02T21:23:37.0000000Z2020-09-02T22:28:37.0000000Zr" headers: content-type: - application/xml date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:38 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -127,7 +127,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -135,13 +135,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 13:30:24 GMT + - Wed, 02 Sep 2020 21:28:38 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:30:24 GMT + - Wed, 02 Sep 2020 21:28:38 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytablesync45dd15a0') response: @@ -153,13 +153,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 13:30:23 GMT + - Wed, 02 Sep 2020 21:28:38 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table.yaml index dbd0daa84a87b..cccef6635553e 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:09 GMT + - Wed, 02 Sep 2020 21:28:38 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:09 GMT + - Wed, 02 Sep 2020 21:28:38 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,27 +26,29 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:08 GMT + date: Wed, 02 Sep 2020 21:28:38 GMT location: https://storagename.table.core.windows.net/Tables('pytableasyncf33c0dcd') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:09 GMT + - Wed, 02 Sep 2020 21:28:38 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:09 GMT + - Wed, 02 Sep 2020 21:28:38 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasyncf33c0dcd') response: @@ -55,12 +57,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:31:08 GMT + date: Wed, 02 Sep 2020 21:28:38 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasyncf33c0dcd') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasyncf33c0dcd') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_fail_on_exist.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_fail_on_exist.yaml index 05fe780068831..ed27d8d2e61d4 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_fail_on_exist.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_fail_on_exist.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:09 GMT + - Wed, 02 Sep 2020 21:28:38 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:09 GMT + - Wed, 02 Sep 2020 21:28:38 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:08 GMT + date: Wed, 02 Sep 2020 21:28:38 GMT location: https://storagename.table.core.windows.net/Tables('pytableasyncdea11390') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: '{"TableName": "pytableasyncdea11390"}' headers: @@ -48,42 +48,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:38 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:38 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: body: string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The - table specified already exists.\nRequestId:4783f26d-b002-001c-1975-66e974000000\nTime:2020-07-30T13:31:09.2843685Z"}}}' + table specified already exists.\nRequestId:a2cd558a-f002-003b-2e70-811fc7000000\nTime:2020-09-02T21:28:39.1331094Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:08 GMT + date: Wed, 02 Sep 2020 21:28:38 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 409 message: Conflict - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:38 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:38 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasyncdea11390') response: @@ -92,12 +94,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:31:08 GMT + date: Wed, 02 Sep 2020 21:28:38 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasyncdea11390') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasyncdea11390') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists.yaml new file mode 100644 index 0000000000000..4f7fa239d9b85 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists.yaml @@ -0,0 +1,105 @@ +interactions: +- request: + body: '{"TableName": "pytableasync938b11fa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:38 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:38 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytableasync938b11fa"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:28:38 GMT + location: https://storagename.table.core.windows.net/Tables('pytableasync938b11fa') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables +- request: + body: '{"TableName": "pytableasync938b11fa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:38 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:38 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The + table specified already exists.\nRequestId:7ce656c3-5002-006f-2e70-815090000000\nTime:2020-09-02T21:28:39.3356614Z"}}}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:28:38 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 409 + message: Conflict + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Wed, 02 Sep 2020 21:28:38 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:38 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytableasync938b11fa') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Wed, 02 Sep 2020 21:28:38 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasync938b11fa') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists_new_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists_new_table.yaml new file mode 100644 index 0000000000000..dd475cea0e2cb --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists_new_table.yaml @@ -0,0 +1,68 @@ +interactions: +- request: + body: '{"TableName": "pytableasync5dc0160a"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:38 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:38 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytableasync5dc0160a"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:28:38 GMT + location: https://storagename.table.core.windows.net/Tables('pytableasync5dc0160a') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Wed, 02 Sep 2020 21:28:38 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:38 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytableasync5dc0160a') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Wed, 02 Sep 2020 21:28:38 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasync5dc0160a') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_delete_table_with_existing_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_delete_table_with_existing_table.yaml index b3298a2f8cfa0..e19fd6e103805 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_delete_table_with_existing_table.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_delete_table_with_existing_table.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:38 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:38 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,27 +26,29 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:08 GMT + date: Wed, 02 Sep 2020 21:28:39 GMT location: https://storagename.table.core.windows.net/Tables('pytableasync5ef31618') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:39 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:39 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasync5ef31618') response: @@ -55,12 +57,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:31:09 GMT + date: Wed, 02 Sep 2020 21:28:39 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasync5ef31618') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasync5ef31618') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_delete_table_with_non_existing_table_fail_not_exist.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_delete_table_with_non_existing_table_fail_not_exist.yaml index 0a55171a744b7..1cb7aa0e327b6 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_delete_table_with_non_existing_table_fail_not_exist.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_delete_table_with_non_existing_table_fail_not_exist.yaml @@ -2,34 +2,32 @@ interactions: - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:39 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:10 GMT + - Wed, 02 Sep 2020 21:28:39 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasync50951df9') response: body: - string: 'ResourceNotFoundThe specified resource does not exist. - - RequestId:685895a9-9002-0066-1b75-668339000000 - - Time:2020-07-30T13:31:10.1773914Z' + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:e0a589ca-3002-00a2-7170-81607a000000\nTime:2020-09-02T21:28:39.8219598Z"}}}' headers: cache-control: no-cache - content-type: application/xml;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:09 GMT + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:28:38 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 404 message: Not Found - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasync50951df9') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasync50951df9') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_get_table_acl.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_get_table_acl.yaml index e2dcef36a394c..d01f8f2e1a058 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_get_table_acl.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_get_table_acl.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:11 GMT + - Wed, 02 Sep 2020 21:28:39 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:11 GMT + - Wed, 02 Sep 2020 21:28:39 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,29 +26,29 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:10 GMT + date: Wed, 02 Sep 2020 21:28:39 GMT location: https://storagename.table.core.windows.net/Tables('pytableasync1550e28') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: null headers: Accept: - application/xml Date: - - Thu, 30 Jul 2020 13:31:11 GMT + - Wed, 02 Sep 2020 21:28:39 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:11 GMT + - Wed, 02 Sep 2020 21:28:39 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/pytableasync1550e28?comp=acl response: @@ -57,25 +57,27 @@ interactions: />" headers: content-type: application/xml - date: Thu, 30 Jul 2020 13:31:10 GMT + date: Wed, 02 Sep 2020 21:28:39 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/pytableasync1550e28?comp=acl + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/pytableasync1550e28?comp=acl - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:11 GMT + - Wed, 02 Sep 2020 21:28:39 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:11 GMT + - Wed, 02 Sep 2020 21:28:39 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasync1550e28') response: @@ -84,12 +86,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:31:10 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasync1550e28') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasync1550e28') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables.yaml index 5ac4de53c7136..40eb4d7b60293 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:11 GMT + - Thu, 03 Sep 2020 14:19:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:11 GMT + - Thu, 03 Sep 2020 14:19:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:10 GMT + date: Thu, 03 Sep 2020 14:19:26 GMT location: https://storagename.table.core.windows.net/Tables('pytableasynce6450d88') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables - request: body: null headers: @@ -44,13 +44,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:12 GMT + - Thu, 03 Sep 2020 14:19:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:12 GMT + - Thu, 03 Sep 2020 14:19:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables response: @@ -59,13 +59,42 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:10 GMT + date: Thu, 03 Sep 2020 14:19:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 03 Sep 2020 14:19:28 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 03 Sep 2020 14:19:28 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytableasynce6450d88') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 03 Sep 2020 14:19:26 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables('pytableasynce6450d88') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables_with_num_results.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables_with_num_results.yaml index aaaef8669965e..8ae4661303410 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables_with_num_results.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables_with_num_results.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:12 GMT + - Thu, 03 Sep 2020 14:19:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:12 GMT + - Thu, 03 Sep 2020 14:19:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:11 GMT + date: Thu, 03 Sep 2020 14:19:27 GMT location: https://storagename.table.core.windows.net/Tables('listtable0cac14c3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables - request: body: '{"TableName": "listtable1cac14c3"}' headers: @@ -48,13 +48,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:12 GMT + - Thu, 03 Sep 2020 14:19:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:12 GMT + - Thu, 03 Sep 2020 14:19:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -63,16 +63,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:11 GMT + date: Thu, 03 Sep 2020 14:19:27 GMT location: https://storagename.table.core.windows.net/Tables('listtable1cac14c3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables - request: body: '{"TableName": "listtable2cac14c3"}' headers: @@ -85,13 +85,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:12 GMT + - Thu, 03 Sep 2020 14:19:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:12 GMT + - Thu, 03 Sep 2020 14:19:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -100,16 +100,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:11 GMT + date: Thu, 03 Sep 2020 14:19:27 GMT location: https://storagename.table.core.windows.net/Tables('listtable2cac14c3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables - request: body: '{"TableName": "listtable3cac14c3"}' headers: @@ -122,13 +122,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Thu, 03 Sep 2020 14:19:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Thu, 03 Sep 2020 14:19:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -137,16 +137,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Thu, 03 Sep 2020 14:19:27 GMT location: https://storagename.table.core.windows.net/Tables('listtable3cac14c3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables - request: body: null headers: @@ -155,30 +155,30 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Thu, 03 Sep 2020 14:19:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Thu, 03 Sep 2020 14:19:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[{"TableName":"listtable0cac14c3"},{"TableName":"listtable1cac14c3"},{"TableName":"listtable2cac14c3"},{"TableName":"listtable3cac14c3"},{"TableName":"pytableasynce6450d88"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[{"TableName":"listtable0cac14c3"},{"TableName":"listtable1cac14c3"},{"TableName":"listtable2cac14c3"},{"TableName":"listtable3cac14c3"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Thu, 03 Sep 2020 14:19:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables - request: body: null headers: @@ -187,13 +187,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Thu, 03 Sep 2020 14:19:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Thu, 03 Sep 2020 14:19:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables?$top=3 response: @@ -202,16 +202,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Thu, 03 Sep 2020 14:19:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-continuation-nexttablename: 1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNjY2NzViMGY4YjFkYw-- - x-ms-version: '2019-07-07' + x-ms-continuation-nexttablename: 1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNjgxZmQzYjE4ZDAyMg-- + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables?$top=3 + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables?$top=3 - request: body: null headers: @@ -220,28 +220,28 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Thu, 03 Sep 2020 14:19:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Thu, 03 Sep 2020 14:19:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/Tables?$top=3&NextTableName=1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNjY2NzViMGY4YjFkYw-- + uri: https://storagename.table.core.windows.net/Tables?$top=3&NextTableName=1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNjgxZmQzYjE4ZDAyMg-- response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[{"TableName":"listtable3cac14c3"},{"TableName":"pytableasynce6450d88"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[{"TableName":"listtable3cac14c3"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Thu, 03 Sep 2020 14:19:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables?$top=3&NextTableName=1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNjY2NzViMGY4YjFkYw-- + url: https://pyacrstoraget2dnjllvumyr.table.core.windows.net/Tables?$top=3&NextTableName=1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNjgxZmQzYjE4ZDAyMg-- version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_query_tables_with_filter.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_query_tables_with_filter.yaml index 71721dd0002f8..3c332f7595a7f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_query_tables_with_filter.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_query_tables_with_filter.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT location: https://storagename.table.core.windows.net/Tables('pytableasyncbd551302') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: null headers: @@ -44,13 +44,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:13 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/Tables?$filter=TableName%20eq%20'pytableasyncbd551302' response: @@ -59,26 +59,28 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables?$filter=TableName%20eq%20'pytableasyncbd551302' + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables?$filter=TableName%20eq%20'pytableasyncbd551302' - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasyncbd551302') response: @@ -87,12 +89,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasyncbd551302') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasyncbd551302') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_query_tables_with_num_results.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_query_tables_with_num_results.yaml new file mode 100644 index 0000000000000..9f616c307b77c --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_query_tables_with_num_results.yaml @@ -0,0 +1,150 @@ +interactions: +- request: + body: '{"TableName": "listtable0235e153d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Mon, 31 Aug 2020 19:38:33 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 31 Aug 2020 19:38:33 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"listtable0235e153d"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Mon, 31 Aug 2020 19:38:30 GMT + location: https://storagename.table.core.windows.net/Tables('listtable0235e153d') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://pyacrstoragef3szz55vphcw.table.core.windows.net/Tables +- request: + body: '{"TableName": "listtable1235e153d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Mon, 31 Aug 2020 19:38:33 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 31 Aug 2020 19:38:33 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"listtable1235e153d"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Mon, 31 Aug 2020 19:38:31 GMT + location: https://storagename.table.core.windows.net/Tables('listtable1235e153d') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://pyacrstoragef3szz55vphcw.table.core.windows.net/Tables +- request: + body: '{"TableName": "listtable2235e153d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Mon, 31 Aug 2020 19:38:33 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 31 Aug 2020 19:38:33 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"listtable2235e153d"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Mon, 31 Aug 2020 19:38:31 GMT + location: https://storagename.table.core.windows.net/Tables('listtable2235e153d') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://pyacrstoragef3szz55vphcw.table.core.windows.net/Tables +- request: + body: '{"TableName": "listtable3235e153d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Mon, 31 Aug 2020 19:38:33 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 31 Aug 2020 19:38:33 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"listtable3235e153d"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Mon, 31 Aug 2020 19:38:31 GMT + location: https://storagename.table.core.windows.net/Tables('listtable3235e153d') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://pyacrstoragef3szz55vphcw.table.core.windows.net/Tables +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_too_many_ids.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_too_many_ids.yaml index 345ba7b9888a8..28de88678004d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_too_many_ids.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_too_many_ids.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,27 +26,29 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT location: https://storagename.table.core.windows.net/Tables('pytableasynce03c1398') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasynce03c1398') response: @@ -55,12 +57,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasynce03c1398') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasynce03c1398') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifiers.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifiers.yaml index 15a2022892237..4a49b1b3bfa49 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifiers.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifiers.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT location: https://storagename.table.core.windows.net/Tables('pytableasync6d6c1aab') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: null headers: @@ -44,13 +44,13 @@ interactions: Content-Type: - application/xml Date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/pytableasync6d6c1aab?comp=acl response: @@ -58,26 +58,26 @@ interactions: string: '' headers: content-length: '0' - date: Thu, 30 Jul 2020 13:31:12 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/pytableasync6d6c1aab?comp=acl + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/pytableasync6d6c1aab?comp=acl - request: body: null headers: Accept: - application/xml Date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:14 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/pytableasync6d6c1aab?comp=acl response: @@ -86,25 +86,27 @@ interactions: />" headers: content-type: application/xml - date: Thu, 30 Jul 2020 13:31:13 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/pytableasync6d6c1aab?comp=acl + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/pytableasync6d6c1aab?comp=acl - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasync6d6c1aab') response: @@ -113,12 +115,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:31:13 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasync6d6c1aab') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasync6d6c1aab') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_signed_identifiers.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_signed_identifiers.yaml index ddf1845c64235..18debe826959d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_signed_identifiers.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_signed_identifiers.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,20 +26,20 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:31:13 GMT + date: Wed, 02 Sep 2020 21:28:40 GMT location: https://storagename.table.core.windows.net/Tables('pytableasyncd261181d') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables - request: body: ' - testid2020-07-30T13:26:15Z2020-07-30T14:31:15Zr' + testid2020-09-02T21:23:40Z2020-09-02T22:28:40Zr' headers: Accept: - application/xml @@ -48,13 +48,13 @@ interactions: Content-Type: - application/xml Date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/pytableasyncd261181d?comp=acl response: @@ -62,52 +62,54 @@ interactions: string: '' headers: content-length: '0' - date: Thu, 30 Jul 2020 13:31:14 GMT + date: Wed, 02 Sep 2020 21:28:41 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/pytableasyncd261181d?comp=acl + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/pytableasyncd261181d?comp=acl - request: body: null headers: Accept: - application/xml Date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/pytableasyncd261181d?comp=acl response: body: - string: "\uFEFFtestid2020-07-30T13:26:15.0000000Z2020-07-30T14:31:15.0000000Zr" + string: "\uFEFFtestid2020-09-02T21:23:40.0000000Z2020-09-02T22:28:40.0000000Zr" headers: content-type: application/xml - date: Thu, 30 Jul 2020 13:31:14 GMT + date: Wed, 02 Sep 2020 21:28:41 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/pytableasyncd261181d?comp=acl + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/pytableasyncd261181d?comp=acl - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:31:15 GMT + - Wed, 02 Sep 2020 21:28:40 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('pytableasyncd261181d') response: @@ -116,12 +118,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:31:14 GMT + date: Wed, 02 Sep 2020 21:28:41 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageq3qeesbeuztp.table.core.windows.net/Tables('pytableasyncd261181d') + url: https://pyacrstoragee2wquyekbhmp.table.core.windows.net/Tables('pytableasyncd261181d') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_batch.test_batch_insert.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_batch.test_batch_insert.yaml new file mode 100644 index 0000000000000..d9142cd7d3d2a --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_batch.test_batch_insert.yaml @@ -0,0 +1,154 @@ +interactions: +- request: + body: '{"TableName": "uttablef0c20dcc"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 19 Aug 2020 19:17:14 GMT + User-Agent: + - azsdk-python-storage-table/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 19 Aug 2020 19:17:14 GMT + x-ms-version: + - '2019-07-07' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttablef0c20dcc"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 19 Aug 2020 19:17:14 GMT + location: + - https://storagename.table.core.windows.net/Tables('uttablef0c20dcc') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-07-07' + status: + code: 201 + message: Created +- request: + body: "--batch_b3f94fdb-e1cd-4216-8739-23e499422706\r\nContent-Type: multipart/mixed; + boundary=changeset_8fc24677-141c-47e2-92bd-dd2403c1e89b\r\n\r\n--changeset_8fc24677-141c-47e2-92bd-dd2403c1e89b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 0\r\n\r\nPOST + https://pyacrstoragenkyeai74ujmb.table.core.windows.net HTTP/1.1\r\nx-ms-version: + 2019-07-07\r\nDataServiceVersion: 3.0\r\nContent-Type: application/json;odata=nometadata\r\nAccept: + application/json;odata=minimalmetadata\r\nContent-Length: 253\r\nx-ms-date: + Wed, 19 Aug 2020 19:17:14 GMT\r\nDate: Wed, 19 Aug 2020 19:17:14 GMT\r\nx-ms-client-request-id: + 9729b0c1-e250-11ea-92a6-002b67128e4c\r\nAuthorization: SharedKey pyacrstoragenkyeai74ujmb:0tCNgVju2tetkBJLzUYeGlbTFU7+4SZnzg+3782LBLo=\r\n\r\n{\"PartitionKey\": + \"001\", \"RowKey\": \"batch_insert\", \"test\": true, \"test2\": \"value\", + \"test3\": \"3\", \"test3@odata.type\": \"Edm.Int64\", \"test4\": \"1234567890\", + \"test4@odata.type\": \"Edm.Int64\", \"test5\": \"2020-08-19T19:17:14Z\", \"test5@odata.type\": + \"Edm.DateTime\"}\r\n--changeset_8fc24677-141c-47e2-92bd-dd2403c1e89b--\r\n\r\n--batch_b3f94fdb-e1cd-4216-8739-23e499422706--\r\n" + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1106' + Content-Type: + - multipart/mixed; boundary=batch_b3f94fdb-e1cd-4216-8739-23e499422706 + DataServiceVersion: + - '3.0' + Date: + - Wed, 19 Aug 2020 19:17:14 GMT + MaxDataServiceVersion: + - 3.0;NetFx + User-Agent: + - azsdk-python-storage-table/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 19 Aug 2020 19:17:14 GMT + x-ms-version: + - '2019-07-07' + method: POST + uri: https://storagename.table.core.windows.net/$batch + response: + body: + string: "--batchresponse_86a4547a-05c4-4259-b88f-b4af09450694\r\nContent-Type: + multipart/mixed; boundary=changesetresponse_4aaca2a9-5a91-4dc4-bbb2-61b8ef41bf0b\r\n\r\n--changesetresponse_4aaca2a9-5a91-4dc4-bbb2-61b8ef41bf0b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 405 + Method Not Allowed\r\nX-Content-Type-Options: nosniff\r\nDataServiceVersion: + 3.0;\r\nContent-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8\r\n\r\n{\"odata.error\":{\"code\":\"MethodNotAllowed\",\"message\":{\"lang\":\"en-US\",\"value\":\"0:The + requested method is not allowed on the specified resource.\\nRequestId:d2de8117-9002-0070-7e5d-76e394000000\\nTime:2020-08-19T19:17:15.0662050Z\"}}}\r\n--changesetresponse_4aaca2a9-5a91-4dc4-bbb2-61b8ef41bf0b--\r\n--batchresponse_86a4547a-05c4-4259-b88f-b4af09450694--\r\n" + headers: + cache-control: + - no-cache + content-type: + - multipart/mixed; boundary=batchresponse_86a4547a-05c4-4259-b88f-b4af09450694 + date: + - Wed, 19 Aug 2020 19:17:14 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-07-07' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 19 Aug 2020 19:17:15 GMT + User-Agent: + - azsdk-python-storage-table/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 19 Aug 2020 19:17:15 GMT + x-ms-version: + - '2019-07-07' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('uttablef0c20dcc') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 19 Aug 2020 19:17:14 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-07-07' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_client.test_user_agent_custom.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_client.test_user_agent_custom.yaml index abd3dd6777014..246b2b684cdd2 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_client.test_user_agent_custom.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_client.test_user_agent_custom.yaml @@ -11,77 +11,31 @@ interactions: DataServiceVersion: - '3.0' Date: - - Mon, 27 Jul 2020 14:16:21 GMT + - Mon, 10 Aug 2020 19:03:04 GMT User-Agent: - - TestApp/v1.0 azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - TestApp/v1.0 azsdk-python-storage-table/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:16:21 GMT + - Mon, 10 Aug 2020 19:03:04 GMT x-ms-version: - - '2019-07-07' + - 12.0.0b1 method: GET uri: https://storagename.table.core.windows.net/Tables response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[]}' + string: "\uFEFF\r\n\r\n + \ InvalidHeaderValue\r\n The value + for one of the HTTP headers is not in the correct format.\nRequestId:3df2a491-5002-0050-3548-6f9833000000\nTime:2020-08-10T19:03:05.7984754Z\r\n" headers: - cache-control: - - no-cache + content-length: + - '371' content-type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + - application/xml date: - - Mon, 27 Jul 2020 14:16:21 GMT + - Mon, 10 Aug 2020 19:03:05 GMT server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-ms-version: - - '2019-07-07' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;odata=minimalmetadata - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - DataServiceVersion: - - '3.0' - Date: - - Mon, 27 Jul 2020 14:16:21 GMT - User-Agent: - - TestApp/v2.0 TestApp/v1.0 azsdk-python-storage-table/2019-07-07 Python/3.8.3 - (Windows-10-10.0.19041-SP0) - x-ms-date: - - Mon, 27 Jul 2020 14:16:21 GMT - x-ms-version: - - '2019-07-07' - method: GET - uri: https://storagename.table.core.windows.net/Tables - response: - body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables","value":[]}' - headers: - cache-control: - - no-cache - content-type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: - - Mon, 27 Jul 2020 14:16:21 GMT - server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-ms-version: - - '2019-07-07' + - Microsoft-HTTPAPI/2.0 status: - code: 200 - message: OK + code: 400 + message: The value for one of the HTTP headers is not in the correct format. version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_binary_property_value.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_binary_property_value.yaml index 8ed696eaf9dab..5e2b9414a3477 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_binary_property_value.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_binary_property_value.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT location: - https://storagename.table.core.windows.net/Tables('uttable99fe1256') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -64,27 +64,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable99fe1256 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable99fe1256/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A34.6927611Z''\"","PartitionKey":"pk99fe1256","RowKey":"rk99fe1256","Timestamp":"2020-07-30T14:24:34.6927611Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable99fe1256/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A41.7847375Z''\"","PartitionKey":"pk99fe1256","RowKey":"rk99fe1256","Timestamp":"2020-09-02T21:28:41.7847375Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A34.6927611Z'" + - W/"datetime'2020-09-02T21%3A28%3A41.7847375Z'" location: - https://storagename.table.core.windows.net/uttable99fe1256(PartitionKey='pk99fe1256',RowKey='rk99fe1256') server: @@ -94,7 +94,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -110,27 +110,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable99fe1256(PartitionKey='pk99fe1256',RowKey='rk99fe1256') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable99fe1256/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A34.6927611Z''\"","PartitionKey":"pk99fe1256","RowKey":"rk99fe1256","Timestamp":"2020-07-30T14:24:34.6927611Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable99fe1256/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A41.7847375Z''\"","PartitionKey":"pk99fe1256","RowKey":"rk99fe1256","Timestamp":"2020-09-02T21:28:41.7847375Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A34.6927611Z'" + - W/"datetime'2020-09-02T21%3A28%3A41.7847375Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -138,7 +138,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -146,7 +146,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -154,13 +154,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable99fe1256') response: @@ -172,13 +172,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity.yaml index 60a0ec925dbc8..0b24e3a49d629 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT location: - https://storagename.table.core.windows.net/Tables('uttable12440ee0') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk12440ee0", "RowKey": "rk12440ee0", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk12440ee0", "RowKey": "rk12440ee0", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable12440ee0 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable12440ee0/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A35.3901372Z''\"","PartitionKey":"pk12440ee0","RowKey":"rk12440ee0","Timestamp":"2020-07-30T14:24:35.3901372Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable12440ee0/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A42.0593875Z''\"","PartitionKey":"pk12440ee0","RowKey":"rk12440ee0","Timestamp":"2020-09-02T21:28:42.0593875Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A35.3901372Z'" + - W/"datetime'2020-09-02T21%3A28%3A42.0593875Z'" location: - https://storagename.table.core.windows.net/uttable12440ee0(PartitionKey='pk12440ee0',RowKey='rk12440ee0') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata Accept-Encoding: - gzip, deflate Connection: @@ -117,15 +116,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttable12440ee0(PartitionKey='pk12440ee0',RowKey='rk12440ee0') response: @@ -137,13 +136,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -159,26 +158,26 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable12440ee0(PartitionKey='pk12440ee0',RowKey='rk12440ee0') response: body: string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:1e52ed17-0002-002f-077d-6628c3000000\nTime:2020-07-30T14:24:35.5952834Z"}}}' + specified resource does not exist.\nRequestId:e570466a-d002-004e-6870-8174eb000000\nTime:2020-09-02T21:28:42.1344410Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -186,7 +185,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 404 message: Not Found @@ -194,7 +193,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -202,13 +201,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable12440ee0') response: @@ -220,13 +219,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:34 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_not_existing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_not_existing.yaml index 180b3fb1edf6b..6c177955dbf73 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_not_existing.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_not_existing.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT location: - https://storagename.table.core.windows.net/Tables('uttablef9b6145a') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata Accept-Encoding: - gzip, deflate Connection: @@ -61,32 +61,28 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttablef9b6145a(PartitionKey='pkf9b6145a',RowKey='rkf9b6145a') response: body: - string: 'ResourceNotFoundThe specified resource does not exist. - - RequestId:dc92eeba-e002-0007-227d-665f7c000000 - - Time:2020-07-30T14:24:36.2619723Z' + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:27cd94f3-2002-0081-6570-81fab9000000\nTime:2020-09-02T21:28:42.3496694Z"}}}' headers: cache-control: - no-cache content-type: - - application/xml;charset=utf-8 + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -94,7 +90,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 404 message: Not Found @@ -102,7 +98,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -110,13 +106,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablef9b6145a') response: @@ -128,13 +124,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_with_if_doesnt_match.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_with_if_doesnt_match.yaml index 9c427c9e7c773..9ee8297d4053b 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_with_if_doesnt_match.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_with_if_doesnt_match.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT location: - https://storagename.table.core.windows.net/Tables('uttablea99a1781') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pka99a1781", "RowKey": "rka99a1781", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pka99a1781", "RowKey": "rka99a1781", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablea99a1781 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablea99a1781/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A36.8026672Z''\"","PartitionKey":"pka99a1781","RowKey":"rka99a1781","Timestamp":"2020-07-30T14:24:36.8026672Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablea99a1781/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A42.5837293Z''\"","PartitionKey":"pka99a1781","RowKey":"rka99a1781","Timestamp":"2020-09-02T21:28:42.5837293Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A36.8026672Z'" + - W/"datetime'2020-09-02T21%3A28%3A42.5837293Z'" location: - https://storagename.table.core.windows.net/uttablea99a1781(PartitionKey='pka99a1781',RowKey='rka99a1781') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata Accept-Encoding: - gzip, deflate Connection: @@ -117,32 +116,28 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT If-Match: - W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:41 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttablea99a1781(PartitionKey='pka99a1781',RowKey='rka99a1781') response: body: - string: 'UpdateConditionNotSatisfiedThe update condition specified in the request was not satisfied. - - RequestId:9818b359-f002-0057-697d-664074000000 - - Time:2020-07-30T14:24:36.8927298Z' + string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The + update condition specified in the request was not satisfied.\nRequestId:1710314e-6002-0029-6270-816417000000\nTime:2020-09-02T21:28:42.6347655Z"}}}' headers: cache-control: - no-cache content-type: - - application/xml;charset=utf-8 + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:35 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -150,7 +145,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 412 message: Precondition Failed @@ -158,7 +153,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -166,13 +161,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:37 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablea99a1781') response: @@ -184,13 +179,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_with_if_matches.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_with_if_matches.yaml index fc78916358887..1e5f89fca3829 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_with_if_matches.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_delete_entity_with_if_matches.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT location: - https://storagename.table.core.windows.net/Tables('uttable3801156d') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk3801156d", "RowKey": "rk3801156d", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk3801156d", "RowKey": "rk3801156d", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable3801156d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3801156d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A37.4661421Z''\"","PartitionKey":"pk3801156d","RowKey":"rk3801156d","Timestamp":"2020-07-30T14:24:37.4661421Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3801156d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A42.8893915Z''\"","PartitionKey":"pk3801156d","RowKey":"rk3801156d","Timestamp":"2020-09-02T21:28:42.8893915Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A37.4661421Z'" + - W/"datetime'2020-09-02T21%3A28%3A42.8893915Z'" location: - https://storagename.table.core.windows.net/uttable3801156d(PartitionKey='pk3801156d',RowKey='rk3801156d') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata Accept-Encoding: - gzip, deflate Connection: @@ -117,15 +116,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT If-Match: - - W/"datetime'2020-07-30T14%3A24%3A37.4661421Z'" + - W/"datetime'2020-09-02T21%3A28%3A42.8893915Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttable3801156d(PartitionKey='pk3801156d',RowKey='rk3801156d') response: @@ -137,13 +136,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -159,26 +158,26 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable3801156d(PartitionKey='pk3801156d',RowKey='rk3801156d') response: body: string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:1d3cb1c3-a002-0044-617d-667595000000\nTime:2020-07-30T14:24:37.6402651Z"}}}' + specified resource does not exist.\nRequestId:edf8a5b3-1002-009a-5c70-81c4ba000000\nTime:2020-09-02T21:28:42.9614432Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:41 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -186,7 +185,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 404 message: Not Found @@ -194,7 +193,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -202,13 +201,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3801156d') response: @@ -220,13 +219,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:36 GMT + - Wed, 02 Sep 2020 21:28:42 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_empty_and_spaces_property_value.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_empty_and_spaces_property_value.yaml index d49027ddb9fb9..45127a8e38179 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_empty_and_spaces_property_value.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_empty_and_spaces_property_value.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT location: - https://storagename.table.core.windows.net/Tables('uttable66111670') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -67,27 +67,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable66111670 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable66111670/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A38.1730826Z''\"","PartitionKey":"pk66111670","RowKey":"rk66111670","Timestamp":"2020-07-30T14:24:38.1730826Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable66111670/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A43.2038325Z''\"","PartitionKey":"pk66111670","RowKey":"rk66111670","Timestamp":"2020-09-02T21:28:43.2038325Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A38.1730826Z'" + - W/"datetime'2020-09-02T21%3A28%3A43.2038325Z'" location: - https://storagename.table.core.windows.net/uttable66111670(PartitionKey='pk66111670',RowKey='rk66111670') server: @@ -97,7 +97,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -113,27 +113,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable66111670(PartitionKey='pk66111670',RowKey='rk66111670') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable66111670/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A38.1730826Z''\"","PartitionKey":"pk66111670","RowKey":"rk66111670","Timestamp":"2020-07-30T14:24:38.1730826Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable66111670/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A43.2038325Z''\"","PartitionKey":"pk66111670","RowKey":"rk66111670","Timestamp":"2020-09-02T21:28:43.2038325Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A38.1730826Z'" + - W/"datetime'2020-09-02T21%3A28%3A43.2038325Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -141,7 +141,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -149,7 +149,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -157,13 +157,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable66111670') response: @@ -175,13 +175,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity.yaml index e2a2f91ea816a..51c5ec9f1fac7 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT location: - https://storagename.table.core.windows.net/Tables('uttablee7730dad') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pke7730dad", "RowKey": "rke7730dad", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pke7730dad", "RowKey": "rke7730dad", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablee7730dad response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7730dad/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A38.7779466Z''\"","PartitionKey":"pke7730dad","RowKey":"rke7730dad","Timestamp":"2020-07-30T14:24:38.7779466Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7730dad/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A43.4861503Z''\"","PartitionKey":"pke7730dad","RowKey":"rke7730dad","Timestamp":"2020-09-02T21:28:43.4861503Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A38.7779466Z'" + - W/"datetime'2020-09-02T21%3A28%3A43.4861503Z'" location: - https://storagename.table.core.windows.net/uttablee7730dad(PartitionKey='pke7730dad',RowKey='rke7730dad') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,27 +114,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablee7730dad(PartitionKey='pke7730dad',RowKey='rke7730dad') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7730dad/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A38.7779466Z''\"","PartitionKey":"pke7730dad","RowKey":"rke7730dad","Timestamp":"2020-07-30T14:24:38.7779466Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7730dad/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A43.4861503Z''\"","PartitionKey":"pke7730dad","RowKey":"rke7730dad","Timestamp":"2020-09-02T21:28:43.4861503Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A38.7779466Z'" + - W/"datetime'2020-09-02T21%3A28%3A43.4861503Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -143,7 +142,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -151,7 +150,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -159,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee7730dad') response: @@ -177,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_full_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_full_metadata.yaml index 9d07a60dd4d75..2a74b49caa811 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_full_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_full_metadata.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:42 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:42 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT location: - https://storagename.table.core.windows.net/Tables('uttabled1cb135f') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkd1cb135f", "RowKey": "rkd1cb135f", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkd1cb135f", "RowKey": "rkd1cb135f", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttabled1cb135f response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled1cb135f/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A39.3967653Z''\"","PartitionKey":"pkd1cb135f","RowKey":"rkd1cb135f","Timestamp":"2020-07-30T14:24:39.3967653Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled1cb135f/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A43.7709131Z''\"","PartitionKey":"pkd1cb135f","RowKey":"rkd1cb135f","Timestamp":"2020-09-02T21:28:43.7709131Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:42 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A39.3967653Z'" + - W/"datetime'2020-09-02T21%3A28%3A43.7709131Z'" location: - https://storagename.table.core.windows.net/uttabled1cb135f(PartitionKey='pkd1cb135f',RowKey='rkd1cb135f') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -113,29 +112,29 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) accept: - application/json;odata=fullmetadata x-ms-date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttabled1cb135f(PartitionKey='pkd1cb135f',RowKey='rkd1cb135f') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled1cb135f/@Element","odata.type":"storagename.uttabled1cb135f","odata.id":"https://storagename.table.core.windows.net/uttabled1cb135f(PartitionKey=''pkd1cb135f'',RowKey=''rkd1cb135f'')","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A39.3967653Z''\"","odata.editLink":"uttabled1cb135f(PartitionKey=''pkd1cb135f'',RowKey=''rkd1cb135f'')","PartitionKey":"pkd1cb135f","RowKey":"rkd1cb135f","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-07-30T14:24:39.3967653Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled1cb135f/@Element","odata.type":"storagename.uttabled1cb135f","odata.id":"https://storagename.table.core.windows.net/uttabled1cb135f(PartitionKey=''pkd1cb135f'',RowKey=''rkd1cb135f'')","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A43.7709131Z''\"","odata.editLink":"uttabled1cb135f(PartitionKey=''pkd1cb135f'',RowKey=''rkd1cb135f'')","PartitionKey":"pkd1cb135f","RowKey":"rkd1cb135f","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:28:43.7709131Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=fullmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:38 GMT + - Wed, 02 Sep 2020 21:28:43 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A39.3967653Z'" + - W/"datetime'2020-09-02T21%3A28%3A43.7709131Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -143,7 +142,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -151,7 +150,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -159,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttabled1cb135f') response: @@ -177,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:43 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match.yaml index c665ee80f4453..1207a24f3d81c 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:44 GMT location: - https://storagename.table.core.windows.net/Tables('uttable74691147') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk74691147", "RowKey": "rk74691147", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk74691147", "RowKey": "rk74691147", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:43 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable74691147 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable74691147/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A40.0164803Z''\"","PartitionKey":"pk74691147","RowKey":"rk74691147","Timestamp":"2020-07-30T14:24:40.0164803Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable74691147/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A44.1144829Z''\"","PartitionKey":"pk74691147","RowKey":"rk74691147","Timestamp":"2020-09-02T21:28:44.1144829Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:44 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A40.0164803Z'" + - W/"datetime'2020-09-02T21%3A28%3A44.1144829Z'" location: - https://storagename.table.core.windows.net/uttable74691147(PartitionKey='pk74691147',RowKey='rk74691147') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,27 +114,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:43 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:43 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable74691147(PartitionKey='pk74691147',RowKey='rk74691147') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable74691147/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A40.0164803Z''\"","PartitionKey":"pk74691147","RowKey":"rk74691147","Timestamp":"2020-07-30T14:24:40.0164803Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable74691147/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A44.1144829Z''\"","PartitionKey":"pk74691147","RowKey":"rk74691147","Timestamp":"2020-09-02T21:28:44.1144829Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:44 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A40.0164803Z'" + - W/"datetime'2020-09-02T21%3A28%3A44.1144829Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -143,7 +142,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -151,7 +150,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata Accept-Encoding: - gzip, deflate Connection: @@ -161,15 +160,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:43 GMT If-Match: - - W/"datetime'2020-07-30T14%3A24%3A40.0164803Z'" + - W/"datetime'2020-09-02T21%3A28%3A44.1144829Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:43 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttable74691147(PartitionKey='pk74691147',RowKey='rk74691147') response: @@ -181,13 +180,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:44 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -195,7 +194,50 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:43 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:43 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttable74691147(PartitionKey='pk74691147',RowKey='rk74691147') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:e39c2d9e-6002-0016-0470-81acb4000000\nTime:2020-09-02T21:28:44.2255610Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:44 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -203,13 +245,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:43 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:43 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable74691147') response: @@ -221,13 +263,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:39 GMT + - Wed, 02 Sep 2020 21:28:44 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_missing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_missing.yaml new file mode 100644 index 0000000000000..40c6cdd57fd85 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_missing.yaml @@ -0,0 +1,419 @@ +interactions: +- request: + body: '{"TableName": "uttableda214a0"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:43 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:43 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttableda214a0"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:43 GMT + location: + - https://storagename.table.core.windows.net/Tables('uttableda214a0') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkda214a0", "RowKey": "rkda214a0", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '467' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:43 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:43 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/uttableda214a0 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableda214a0/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A44.49354Z''\"","PartitionKey":"pkda214a0","RowKey":"rkda214a0","Timestamp":"2020-09-02T21:28:44.49354Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:43 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A44.49354Z'" + location: + - https://storagename.table.core.windows.net/uttableda214a0(PartitionKey='pkda214a0',RowKey='rkda214a0') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "querytableda214a0"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '34' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:43 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:43 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"querytableda214a0"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:43 GMT + location: + - https://storagename.table.core.windows.net/Tables('querytableda214a0') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkda214a0", "RowKey": "rkda214a01", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '468' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:43 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:43 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/querytableda214a0 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytableda214a0/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A44.5725987Z''\"","PartitionKey":"pkda214a0","RowKey":"rkda214a01","Timestamp":"2020-09-02T21:28:44.5725987Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:43 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A44.5725987Z'" + location: + - https://storagename.table.core.windows.net/querytableda214a0(PartitionKey='pkda214a0',RowKey='rkda214a01') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:43 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:43 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttableda214a0(PartitionKey='pkda214a0',RowKey='rkda214a0') + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableda214a0/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A44.49354Z''\"","PartitionKey":"pkda214a0","RowKey":"rkda214a0","Timestamp":"2020-09-02T21:28:44.49354Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:43 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A44.49354Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:43 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:43 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/uttableda214a0(PartitionKey='pkda214a0',RowKey='rkda214a0') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:43 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttableda214a0(PartitionKey='pkda214a0',RowKey='rkda214a0') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:8c647eb2-9002-005f-5270-81ee5f000000\nTime:2020-09-02T21:28:44.6746685Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:43 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('uttableda214a0') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:44 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('querytableda214a0') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:44 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_modified.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_modified.yaml new file mode 100644 index 0000000000000..85d026322a4cd --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_modified.yaml @@ -0,0 +1,419 @@ +interactions: +- request: + body: '{"TableName": "uttable222514e7"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable222514e7"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:44 GMT + location: + - https://storagename.table.core.windows.net/Tables('uttable222514e7') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pk222514e7", "RowKey": "rk222514e7", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '469' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/uttable222514e7 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable222514e7/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A44.9688416Z''\"","PartitionKey":"pk222514e7","RowKey":"rk222514e7","Timestamp":"2020-09-02T21:28:44.9688416Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:44 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A44.9688416Z'" + location: + - https://storagename.table.core.windows.net/uttable222514e7(PartitionKey='pk222514e7',RowKey='rk222514e7') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "querytable222514e7"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"querytable222514e7"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:44 GMT + location: + - https://storagename.table.core.windows.net/Tables('querytable222514e7') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pk222514e7", "RowKey": "rk222514e71", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '470' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/querytable222514e7 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable222514e7/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A45.0569046Z''\"","PartitionKey":"pk222514e7","RowKey":"rk222514e71","Timestamp":"2020-09-02T21:28:45.0569046Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:44 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A45.0569046Z'" + location: + - https://storagename.table.core.windows.net/querytable222514e7(PartitionKey='pk222514e7',RowKey='rk222514e71') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttable222514e7(PartitionKey='pk222514e7',RowKey='rk222514e7') + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable222514e7/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A44.9688416Z''\"","PartitionKey":"pk222514e7","RowKey":"rk222514e7","Timestamp":"2020-09-02T21:28:44.9688416Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:44 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A44.9688416Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/uttable222514e7(PartitionKey='pk222514e7',RowKey='rk222514e7') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:44 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttable222514e7(PartitionKey='pk222514e7',RowKey='rk222514e7') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:6daa39a5-0002-002f-7e70-8157a8000000\nTime:2020-09-02T21:28:45.1709857Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:44 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('uttable222514e7') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:44 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('querytable222514e7') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:44 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_present.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_present.yaml new file mode 100644 index 0000000000000..8a8f7a3f75f26 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_present.yaml @@ -0,0 +1,419 @@ +interactions: +- request: + body: '{"TableName": "uttableda814a7"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttableda814a7"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + location: + - https://storagename.table.core.windows.net/Tables('uttableda814a7') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkda814a7", "RowKey": "rkda814a7", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '467' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/uttableda814a7 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableda814a7/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A45.4658935Z''\"","PartitionKey":"pkda814a7","RowKey":"rkda814a7","Timestamp":"2020-09-02T21:28:45.4658935Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A45.4658935Z'" + location: + - https://storagename.table.core.windows.net/uttableda814a7(PartitionKey='pkda814a7',RowKey='rkda814a7') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "querytableda814a7"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '34' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"querytableda814a7"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + location: + - https://storagename.table.core.windows.net/Tables('querytableda814a7') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkda814a7", "RowKey": "rkda814a71", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '468' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/querytableda814a7 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytableda814a7/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A45.5489514Z''\"","PartitionKey":"pkda814a7","RowKey":"rkda814a71","Timestamp":"2020-09-02T21:28:45.5489514Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A45.5489514Z'" + location: + - https://storagename.table.core.windows.net/querytableda814a7(PartitionKey='pkda814a7',RowKey='rkda814a71') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttableda814a7(PartitionKey='pkda814a7',RowKey='rkda814a7') + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableda814a7/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A45.4658935Z''\"","PartitionKey":"pkda814a7","RowKey":"rkda814a7","Timestamp":"2020-09-02T21:28:45.4658935Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A45.4658935Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:44 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:44 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/uttableda814a7(PartitionKey='pkda814a7',RowKey='rkda814a7') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttableda814a7(PartitionKey='pkda814a7',RowKey='rkda814a7') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:322a7137-a002-00a0-4e70-81dec2000000\nTime:2020-09-02T21:28:45.6620306Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('uttableda814a7') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('querytableda814a7') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_unconditionally.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_unconditionally.yaml new file mode 100644 index 0000000000000..b9f946e44de5d --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_unconditionally.yaml @@ -0,0 +1,419 @@ +interactions: +- request: + body: '{"TableName": "uttablec19d1802"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttablec19d1802"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + location: + - https://storagename.table.core.windows.net/Tables('uttablec19d1802') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkc19d1802", "RowKey": "rkc19d1802", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '469' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/uttablec19d1802 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec19d1802/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A45.9331423Z''\"","PartitionKey":"pkc19d1802","RowKey":"rkc19d1802","Timestamp":"2020-09-02T21:28:45.9331423Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A45.9331423Z'" + location: + - https://storagename.table.core.windows.net/uttablec19d1802(PartitionKey='pkc19d1802',RowKey='rkc19d1802') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "querytablec19d1802"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"querytablec19d1802"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + location: + - https://storagename.table.core.windows.net/Tables('querytablec19d1802') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkc19d1802", "RowKey": "rkc19d18021", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '470' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/querytablec19d1802 + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec19d1802/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A46.0162011Z''\"","PartitionKey":"pkc19d1802","RowKey":"rkc19d18021","Timestamp":"2020-09-02T21:28:46.0162011Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A46.0162011Z'" + location: + - https://storagename.table.core.windows.net/querytablec19d1802(PartitionKey='pkc19d1802',RowKey='rkc19d18021') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttablec19d1802(PartitionKey='pkc19d1802',RowKey='rkc19d1802') + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec19d1802/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A45.9331423Z''\"","PartitionKey":"pkc19d1802","RowKey":"rkc19d1802","Timestamp":"2020-09-02T21:28:45.9331423Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A45.9331423Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/uttablec19d1802(PartitionKey='pkc19d1802',RowKey='rkc19d1802') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttablec19d1802(PartitionKey='pkc19d1802',RowKey='rkc19d1802') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:60173be5-1002-000c-1470-81cd6b000000\nTime:2020-09-02T21:28:46.1212752Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('uttablec19d1802') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('querytablec19d1802') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_wrong_etag.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_wrong_etag.yaml new file mode 100644 index 0000000000000..3aaf77651873c --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_if_match_wrong_etag.yaml @@ -0,0 +1,283 @@ +interactions: +- request: + body: '{"TableName": "uttable4e1a15d3"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable4e1a15d3"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + location: + - https://storagename.table.core.windows.net/Tables('uttable4e1a15d3') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "testtable"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"testtable"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + location: + - https://storagename.table.core.windows.net/Tables('testtable') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "PartitionKey", "RowKey": "RowKey", "Value": 1}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://storagename.table.core.windows.net/testtable + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#testtable/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A46.4416166Z''\"","PartitionKey":"PartitionKey","RowKey":"RowKey","Timestamp":"2020-09-02T21:28:46.4416166Z","Value":1}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A46.4416166Z'" + location: + - https://storagename.table.core.windows.net/testtable(PartitionKey='PartitionKey',RowKey='RowKey') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "PartitionKey", "RowKey": "RowKey", "Value": 2}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: PATCH + uri: https://storagename.table.core.windows.net/testtable(PartitionKey='PartitionKey',RowKey='RowKey') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:45 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A46.4805949Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + If-Match: + - W/"datetime'2020-09-02T21%3A28%3A46.4416166Z'" + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/testtable(PartitionKey='PartitionKey',RowKey='RowKey') + response: + body: + string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The + update condition specified in the request was not satisfied.\nRequestId:37c8056a-2002-0017-1c70-81f368000000\nTime:2020-09-02T21:28:46.5176698Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 412 + message: Precondition Failed +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Wed, 02 Sep 2020 21:28:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:45 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('uttable4e1a15d3') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 02 Sep 2020 21:28:45 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_no_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_no_metadata.yaml index aeced10878b4d..fcb539c584db7 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_no_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_no_metadata.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:45 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:45 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:45 GMT location: - https://storagename.table.core.windows.net/Tables('uttableab3d1289') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkab3d1289", "RowKey": "rkab3d1289", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkab3d1289", "RowKey": "rkab3d1289", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttableab3d1289 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableab3d1289/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A40.7237784Z''\"","PartitionKey":"pkab3d1289","RowKey":"rkab3d1289","Timestamp":"2020-07-30T14:24:40.7237784Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableab3d1289/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A46.7665484Z''\"","PartitionKey":"pkab3d1289","RowKey":"rkab3d1289","Timestamp":"2020-09-02T21:28:46.7665484Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:45 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A40.7237784Z'" + - W/"datetime'2020-09-02T21%3A28%3A46.7665484Z'" location: - https://storagename.table.core.windows.net/uttableab3d1289(PartitionKey='pkab3d1289',RowKey='rkab3d1289') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -113,29 +112,29 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) accept: - application/json;odata=nometadata x-ms-date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttableab3d1289(PartitionKey='pkab3d1289',RowKey='rkab3d1289') response: body: - string: '{"PartitionKey":"pkab3d1289","RowKey":"rkab3d1289","Timestamp":"2020-07-30T14:24:40.7237784Z","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"PartitionKey":"pkab3d1289","RowKey":"rkab3d1289","Timestamp":"2020-09-02T21:28:46.7665484Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=nometadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:45 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A40.7237784Z'" + - W/"datetime'2020-09-02T21%3A28%3A46.7665484Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -143,7 +142,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -151,7 +150,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -159,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttableab3d1289') response: @@ -177,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:45 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_not_existing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_not_existing.yaml index 3df4716dcefd1..e02fa7ec6cd30 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_not_existing.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_not_existing.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:46 GMT location: - https://storagename.table.core.windows.net/Tables('uttablebf5d1327') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -59,26 +59,26 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablebf5d1327(PartitionKey='pkbf5d1327',RowKey='rkbf5d1327') response: body: string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:702f6a3a-6002-0059-267d-66ac7f000000\nTime:2020-07-30T14:24:41.3611094Z"}}}' + specified resource does not exist.\nRequestId:85c30399-1002-001c-3770-810803000000\nTime:2020-09-02T21:28:47.0828418Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:46 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -86,7 +86,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 404 message: Not Found @@ -94,7 +94,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -102,13 +102,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablebf5d1327') response: @@ -120,13 +120,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_with_hook.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_with_hook.yaml index 6350c814411e1..973334f0fba72 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_with_hook.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_with_hook.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:46 GMT location: - https://storagename.table.core.windows.net/Tables('uttable871e11d8') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk871e11d8", "RowKey": "rk871e11d8", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk871e11d8", "RowKey": "rk871e11d8", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable871e11d8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable871e11d8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A41.9261543Z''\"","PartitionKey":"pk871e11d8","RowKey":"rk871e11d8","Timestamp":"2020-07-30T14:24:41.9261543Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable871e11d8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A47.3523491Z''\"","PartitionKey":"pk871e11d8","RowKey":"rk871e11d8","Timestamp":"2020-09-02T21:28:47.3523491Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:40 GMT + - Wed, 02 Sep 2020 21:28:46 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A41.9261543Z'" + - W/"datetime'2020-09-02T21%3A28%3A47.3523491Z'" location: - https://storagename.table.core.windows.net/uttable871e11d8(PartitionKey='pk871e11d8',RowKey='rk871e11d8') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,27 +114,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable871e11d8(PartitionKey='pk871e11d8',RowKey='rk871e11d8') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable871e11d8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A41.9261543Z''\"","PartitionKey":"pk871e11d8","RowKey":"rk871e11d8","Timestamp":"2020-07-30T14:24:41.9261543Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable871e11d8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A47.3523491Z''\"","PartitionKey":"pk871e11d8","RowKey":"rk871e11d8","Timestamp":"2020-09-02T21:28:47.3523491Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A41.9261543Z'" + - W/"datetime'2020-09-02T21%3A28%3A47.3523491Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -143,7 +142,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -151,7 +150,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -159,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable871e11d8') response: @@ -177,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:41 GMT + - Wed, 02 Sep 2020 21:28:46 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_with_special_doubles.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_with_special_doubles.yaml index 90df53cf67120..d9c81fdf58658 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_with_special_doubles.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_get_entity_with_special_doubles.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT location: - https://storagename.table.core.windows.net/Tables('uttable65ff1655') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -65,27 +65,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:46 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:46 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable65ff1655 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65ff1655/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A42.5373861Z''\"","PartitionKey":"pk65ff1655","RowKey":"rk65ff1655","Timestamp":"2020-07-30T14:24:42.5373861Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65ff1655/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A47.6261217Z''\"","PartitionKey":"pk65ff1655","RowKey":"rk65ff1655","Timestamp":"2020-09-02T21:28:47.6261217Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A42.5373861Z'" + - W/"datetime'2020-09-02T21%3A28%3A47.6261217Z'" location: - https://storagename.table.core.windows.net/uttable65ff1655(PartitionKey='pk65ff1655',RowKey='rk65ff1655') server: @@ -95,7 +95,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -111,27 +111,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable65ff1655(PartitionKey='pk65ff1655',RowKey='rk65ff1655') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65ff1655/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A42.5373861Z''\"","PartitionKey":"pk65ff1655","RowKey":"rk65ff1655","Timestamp":"2020-07-30T14:24:42.5373861Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65ff1655/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A47.6261217Z''\"","PartitionKey":"pk65ff1655","RowKey":"rk65ff1655","Timestamp":"2020-09-02T21:28:47.6261217Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A42.5373861Z'" + - W/"datetime'2020-09-02T21%3A28%3A47.6261217Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -139,7 +139,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -147,7 +147,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -155,13 +155,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable65ff1655') response: @@ -173,13 +173,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_conflict.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_conflict.yaml index 9de878286c0a5..1c80efba09344 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_conflict.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_conflict.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT location: - https://storagename.table.core.windows.net/Tables('uttableace512b3') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkace512b3", "RowKey": "rkace512b3", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkace512b3", "RowKey": "rkace512b3", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttableace512b3 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableace512b3/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A43.1800879Z''\"","PartitionKey":"pkace512b3","RowKey":"rkace512b3","Timestamp":"2020-07-30T14:24:43.1800879Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableace512b3/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A47.9249985Z''\"","PartitionKey":"pkace512b3","RowKey":"rkace512b3","Timestamp":"2020-09-02T21:28:47.9249985Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A43.1800879Z'" + - W/"datetime'2020-09-02T21%3A28%3A47.9249985Z'" location: - https://storagename.table.core.windows.net/uttableace512b3(PartitionKey='pkace512b3',RowKey='rkace512b3') server: @@ -99,18 +98,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkace512b3", "RowKey": "rkace512b3", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkace512b3", "RowKey": "rkace512b3", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -119,32 +117,32 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttableace512b3 response: body: string: '{"odata.error":{"code":"EntityAlreadyExists","message":{"lang":"en-US","value":"The - specified entity already exists.\nRequestId:4e924949-5002-005a-0d7d-66af78000000\nTime:2020-07-30T14:24:43.2741543Z"}}}' + specified entity already exists.\nRequestId:3dc983ce-7002-0068-4870-813cf3000000\nTime:2020-09-02T21:28:47.9610243Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -152,7 +150,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 409 message: Conflict @@ -160,7 +158,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -168,13 +166,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttableace512b3') response: @@ -186,13 +184,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_dictionary.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_dictionary.yaml index 14bbf10cad435..9b434928e2d59 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_dictionary.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_dictionary.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT location: - https://storagename.table.core.windows.net/Tables('uttabled3851397') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkd3851397", "RowKey": "rkd3851397", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkd3851397", "RowKey": "rkd3851397", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttabled3851397 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled3851397/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A43.813941Z''\"","PartitionKey":"pkd3851397","RowKey":"rkd3851397","Timestamp":"2020-07-30T14:24:43.813941Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled3851397/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A48.2518325Z''\"","PartitionKey":"pkd3851397","RowKey":"rkd3851397","Timestamp":"2020-09-02T21:28:48.2518325Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:42 GMT + - Wed, 02 Sep 2020 21:28:47 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A43.813941Z'" + - W/"datetime'2020-09-02T21%3A28%3A48.2518325Z'" location: - https://storagename.table.core.windows.net/uttabled3851397(PartitionKey='pkd3851397',RowKey='rkd3851397') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -115,13 +114,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttabled3851397') response: @@ -133,13 +132,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:47 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_empty_string_pk.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_empty_string_pk.yaml index 9bed2a6f5268e..25138e2b69d54 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_empty_string_pk.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_empty_string_pk.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:48 GMT location: - https://storagename.table.core.windows.net/Tables('uttable3d1615c0') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,27 +63,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable3d1615c0 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3d1615c0/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A44.3589789Z''\"","PartitionKey":"","RowKey":"rk","Timestamp":"2020-07-30T14:24:44.3589789Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3d1615c0/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A48.4873332Z''\"","PartitionKey":"","RowKey":"rk","Timestamp":"2020-09-02T21:28:48.4873332Z"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:48 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A44.3589789Z'" + - W/"datetime'2020-09-02T21%3A28%3A48.4873332Z'" location: - https://storagename.table.core.windows.net/uttable3d1615c0(PartitionKey='',RowKey='rk') server: @@ -93,7 +93,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -101,7 +101,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -109,13 +109,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3d1615c0') response: @@ -127,13 +127,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:48 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_empty_string_rk.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_empty_string_rk.yaml index 4fd0064c8210e..2ea62df4cdad9 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_empty_string_rk.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_empty_string_rk.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:47 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:47 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:43 GMT + - Wed, 02 Sep 2020 21:28:47 GMT location: - https://storagename.table.core.windows.net/Tables('uttable3d1a15c2') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,27 +63,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable3d1a15c2 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3d1a15c2/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A44.9268631Z''\"","PartitionKey":"pk","RowKey":"","Timestamp":"2020-07-30T14:24:44.9268631Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3d1a15c2/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A48.7289917Z''\"","PartitionKey":"pk","RowKey":"","Timestamp":"2020-09-02T21:28:48.7289917Z"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A44.9268631Z'" + - W/"datetime'2020-09-02T21%3A28%3A48.7289917Z'" location: - https://storagename.table.core.windows.net/uttable3d1a15c2(PartitionKey='pk',RowKey='') server: @@ -93,7 +93,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -101,7 +101,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -109,13 +109,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3d1a15c2') response: @@ -127,13 +127,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:47 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_missing_pk.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_missing_pk.yaml index 39f025927c1bc..7c9792c61a53d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_missing_pk.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_missing_pk.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:48 GMT location: - https://storagename.table.core.windows.net/Tables('uttabled41f1395') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -59,13 +59,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttabled41f1395') response: @@ -77,13 +77,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:44 GMT + - Wed, 02 Sep 2020 21:28:48 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_missing_rk.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_missing_rk.yaml index fa8888987f13c..fa574bd13fdae 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_missing_rk.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_missing_rk.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:48 GMT location: - https://storagename.table.core.windows.net/Tables('uttabled4231397') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -59,13 +59,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttabled4231397') response: @@ -77,13 +77,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:45 GMT + - Wed, 02 Sep 2020 21:28:48 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_property_name_too_long.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_property_name_too_long.yaml index e6a5e3a08f431..748296d41baa9 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_property_name_too_long.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_property_name_too_long.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT location: - https://storagename.table.core.windows.net/Tables('uttablee10d18a6') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -64,26 +64,26 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablee10d18a6 response: body: string: '{"odata.error":{"code":"PropertyNameTooLong","message":{"lang":"en-US","value":"The - property name exceeds the maximum allowed length (255).\nRequestId:4c2f74b7-b002-005b-357d-66ae85000000\nTime:2020-07-30T14:24:46.3911183Z"}}}' + property name exceeds the maximum allowed length (255).\nRequestId:a8d318e9-e002-009e-1170-8149bd000000\nTime:2020-09-02T21:28:49.4966541Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -91,7 +91,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 400 message: Bad Request @@ -99,7 +99,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -107,13 +107,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee10d18a6') response: @@ -125,13 +125,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:48 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_too_many_properties.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_too_many_properties.yaml index bcf767aac9488..5b39367f6dd16 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_too_many_properties.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_too_many_properties.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:48 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:48 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:49 GMT location: - https://storagename.table.core.windows.net/Tables('uttable97d21773') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -132,27 +132,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable97d21773 response: body: string: '{"odata.error":{"code":"TooManyProperties","message":{"lang":"en-US","value":"The entity contains more properties than allowed. Each entity can include up to - 252 properties to store data. Each entity also has 3 system properties.\nRequestId:74988813-9002-0047-207d-667692000000\nTime:2020-07-30T14:24:46.9374438Z"}}}' + 252 properties to store data. Each entity also has 3 system properties.\nRequestId:bbafd2c8-8002-001e-5270-81b6bb000000\nTime:2020-09-02T21:28:49.7604931Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:49 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -160,7 +160,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 400 message: Bad Request @@ -168,7 +168,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -176,13 +176,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable97d21773') response: @@ -194,13 +194,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:49 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_full_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_full_metadata.yaml index ce7a8eacf9cfe..3c4b4bea6d9c3 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_full_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_full_metadata.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:49 GMT location: - https://storagename.table.core.windows.net/Tables('uttable7f6816cf') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk7f6816cf", "RowKey": "rk7f6816cf", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk7f6816cf", "RowKey": "rk7f6816cf", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=fullmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable7f6816cf response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7f6816cf/@Element","odata.type":"storagename.uttable7f6816cf","odata.id":"https://storagename.table.core.windows.net/uttable7f6816cf(PartitionKey=''pk7f6816cf'',RowKey=''rk7f6816cf'')","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A47.4909784Z''\"","odata.editLink":"uttable7f6816cf(PartitionKey=''pk7f6816cf'',RowKey=''rk7f6816cf'')","PartitionKey":"pk7f6816cf","RowKey":"rk7f6816cf","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-07-30T14:24:47.4909784Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7f6816cf/@Element","odata.type":"storagename.uttable7f6816cf","odata.id":"https://storagename.table.core.windows.net/uttable7f6816cf(PartitionKey=''pk7f6816cf'',RowKey=''rk7f6816cf'')","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A50.0157865Z''\"","odata.editLink":"uttable7f6816cf(PartitionKey=''pk7f6816cf'',RowKey=''rk7f6816cf'')","PartitionKey":"pk7f6816cf","RowKey":"rk7f6816cf","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:28:50.0157865Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=fullmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:46 GMT + - Wed, 02 Sep 2020 21:28:49 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A47.4909784Z'" + - W/"datetime'2020-09-02T21%3A28%3A50.0157865Z'" location: - https://storagename.table.core.windows.net/uttable7f6816cf(PartitionKey='pk7f6816cf',RowKey='rk7f6816cf') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,51 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=fullmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:49 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:49 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttable7f6816cf(PartitionKey='pk7f6816cf',RowKey='rk7f6816cf') + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7f6816cf/@Element","odata.type":"storagename.uttable7f6816cf","odata.id":"https://storagename.table.core.windows.net/uttable7f6816cf(PartitionKey=''pk7f6816cf'',RowKey=''rk7f6816cf'')","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A50.0157865Z''\"","odata.editLink":"uttable7f6816cf(PartitionKey=''pk7f6816cf'',RowKey=''rk7f6816cf'')","PartitionKey":"pk7f6816cf","RowKey":"rk7f6816cf","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:28:50.0157865Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=fullmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:49 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A50.0157865Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -115,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable7f6816cf') response: @@ -133,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:49 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_hook.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_hook.yaml index 75bec5ea89884..883e8c5434c7a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_hook.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_hook.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:49 GMT location: - https://storagename.table.core.windows.net/Tables('uttablec092132d') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkc092132d", "RowKey": "rkc092132d", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkc092132d", "RowKey": "rkc092132d", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablec092132d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec092132d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A48.0754342Z''\"","PartitionKey":"pkc092132d","RowKey":"rkc092132d","Timestamp":"2020-07-30T14:24:48.0754342Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec092132d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A50.3399286Z''\"","PartitionKey":"pkc092132d","RowKey":"rkc092132d","Timestamp":"2020-09-02T21:28:50.3399286Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:49 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A48.0754342Z'" + - W/"datetime'2020-09-02T21%3A28%3A50.3399286Z'" location: - https://storagename.table.core.windows.net/uttablec092132d(PartitionKey='pkc092132d',RowKey='rkc092132d') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,51 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:49 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:49 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttablec092132d(PartitionKey='pkc092132d',RowKey='rkc092132d') + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec092132d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A50.3399286Z''\"","PartitionKey":"pkc092132d","RowKey":"rkc092132d","Timestamp":"2020-09-02T21:28:50.3399286Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:49 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A50.3399286Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -115,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablec092132d') response: @@ -133,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:47 GMT + - Wed, 02 Sep 2020 21:28:50 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_large_int32_value_throws.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_large_int32_value_throws.yaml index bcff74c22a4c5..f69087f300e00 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_large_int32_value_throws.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_large_int32_value_throws.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:49 GMT location: - https://storagename.table.core.windows.net/Tables('uttable8fac1b18') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -59,13 +59,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:49 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:49 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable8fac1b18') response: @@ -77,13 +77,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:50 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_large_int64_value_throws.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_large_int64_value_throws.yaml index bd233ff2d3e63..071a7888c6596 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_large_int64_value_throws.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_large_int64_value_throws.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:50 GMT location: - https://storagename.table.core.windows.net/Tables('uttable8ff51b1d') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -51,7 +51,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -59,13 +59,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable8ff51b1d') response: @@ -77,13 +77,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:48 GMT + - Wed, 02 Sep 2020 21:28:50 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_no_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_no_metadata.yaml index edb7b7fd2e844..2c706dee8fa1f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_no_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_no_metadata.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:50 GMT location: - https://storagename.table.core.windows.net/Tables('uttable51fa15f9') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk51fa15f9", "RowKey": "rk51fa15f9", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk51fa15f9", "RowKey": "rk51fa15f9", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=nometadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable51fa15f9 response: body: - string: '{"PartitionKey":"pk51fa15f9","RowKey":"rk51fa15f9","Timestamp":"2020-07-30T14:24:49.5291129Z","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"PartitionKey":"pk51fa15f9","RowKey":"rk51fa15f9","Timestamp":"2020-09-02T21:28:51.0028447Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=nometadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:50 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A49.5291129Z'" + - W/"datetime'2020-09-02T21%3A28%3A51.0028447Z'" location: - https://storagename.table.core.windows.net/uttable51fa15f9(PartitionKey='pk51fa15f9',RowKey='rk51fa15f9') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,51 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=nometadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:28:50 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:28:50 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttable51fa15f9(PartitionKey='pk51fa15f9',RowKey='rk51fa15f9') + response: + body: + string: '{"PartitionKey":"pk51fa15f9","RowKey":"rk51fa15f9","Timestamp":"2020-09-02T21:28:51.0028447Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=nometadata;streaming=true;charset=utf-8 + date: + - Wed, 02 Sep 2020 21:28:50 GMT + etag: + - W/"datetime'2020-09-02T21%3A28%3A51.0028447Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -115,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable51fa15f9') response: @@ -133,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:50 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_etag.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_etag.yaml index a9327ff69d6d9..abc67d7007967 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_etag.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_etag.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:50 GMT location: - https://storagename.table.core.windows.net/Tables('uttablef5f40e06') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkf5f40e06", "RowKey": "rkf5f40e06", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkf5f40e06", "RowKey": "rkf5f40e06", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablef5f40e06 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef5f40e06/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A50.0795467Z''\"","PartitionKey":"pkf5f40e06","RowKey":"rkf5f40e06","Timestamp":"2020-07-30T14:24:50.0795467Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef5f40e06/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A51.2563613Z''\"","PartitionKey":"pkf5f40e06","RowKey":"rkf5f40e06","Timestamp":"2020-09-02T21:28:51.2563613Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:49 GMT + - Wed, 02 Sep 2020 21:28:50 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A50.0795467Z'" + - W/"datetime'2020-09-02T21%3A28%3A51.2563613Z'" location: - https://storagename.table.core.windows.net/uttablef5f40e06(PartitionKey='pkf5f40e06',RowKey='rkf5f40e06') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,27 +114,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablef5f40e06(PartitionKey='pkf5f40e06',RowKey='rkf5f40e06') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef5f40e06/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A50.0795467Z''\"","PartitionKey":"pkf5f40e06","RowKey":"rkf5f40e06","Timestamp":"2020-07-30T14:24:50.0795467Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef5f40e06/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A51.2563613Z''\"","PartitionKey":"pkf5f40e06","RowKey":"rkf5f40e06","Timestamp":"2020-09-02T21:28:51.2563613Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A50.0795467Z'" + - W/"datetime'2020-09-02T21%3A28%3A51.2563613Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -143,7 +142,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_existing_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_existing_entity.yaml index 5ee3dba068718..cd7222d561c71 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_existing_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_existing_entity.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT location: - https://storagename.table.core.windows.net/Tables('uttable95761b92') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk95761b92", "RowKey": "rk95761b92", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk95761b92", "RowKey": "rk95761b92", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable95761b92 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable95761b92/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A50.6145306Z''\"","PartitionKey":"pk95761b92","RowKey":"rk95761b92","Timestamp":"2020-07-30T14:24:50.6145306Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable95761b92/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A51.4914644Z''\"","PartitionKey":"pk95761b92","RowKey":"rk95761b92","Timestamp":"2020-09-02T21:28:51.4914644Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A50.6145306Z'" + - W/"datetime'2020-09-02T21%3A28%3A51.4914644Z'" location: - https://storagename.table.core.windows.net/uttable95761b92(PartitionKey='pk95761b92',RowKey='rk95761b92') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,13 +120,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable95761b92(PartitionKey='pk95761b92',RowKey='rk95761b92') response: @@ -139,15 +138,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A50.7009442Z'" + - W/"datetime'2020-09-02T21%3A28%3A51.5360189Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -163,27 +162,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable95761b92(PartitionKey='pk95761b92',RowKey='rk95761b92') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable95761b92/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A50.7009442Z''\"","PartitionKey":"pk95761b92","RowKey":"rk95761b92","Timestamp":"2020-07-30T14:24:50.7009442Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable95761b92/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A51.5360189Z''\"","PartitionKey":"pk95761b92","RowKey":"rk95761b92","Timestamp":"2020-09-02T21:28:51.5360189Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large":933311100,"married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A50.7009442Z'" + - W/"datetime'2020-09-02T21%3A28%3A51.5360189Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -191,7 +190,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -199,7 +198,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -207,13 +206,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:50 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable95761b92') response: @@ -225,13 +224,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:50 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_non_existing_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_non_existing_entity.yaml index 52b1d8b3b0a37..97b6029062249 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_non_existing_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_non_existing_entity.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:51 GMT location: - https://storagename.table.core.windows.net/Tables('uttable7671d3c') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -53,7 +53,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -65,13 +65,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable7671d3c(PartitionKey='pk7671d3c',RowKey='rk7671d3c') response: @@ -83,15 +83,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:51 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A51.3754209Z'" + - W/"datetime'2020-09-02T21%3A28%3A51.8001982Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -107,27 +107,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable7671d3c(PartitionKey='pk7671d3c',RowKey='rk7671d3c') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7671d3c/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A51.3754209Z''\"","PartitionKey":"pk7671d3c","RowKey":"rk7671d3c","Timestamp":"2020-07-30T14:24:51.3754209Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7671d3c/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A51.8001982Z''\"","PartitionKey":"pk7671d3c","RowKey":"rk7671d3c","Timestamp":"2020-09-02T21:28:51.8001982Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:51 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A51.3754209Z'" + - W/"datetime'2020-09-02T21%3A28%3A51.8001982Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -135,7 +135,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -143,7 +143,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -151,13 +151,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable7671d3c') response: @@ -169,13 +169,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:50 GMT + - Wed, 02 Sep 2020 21:28:51 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_existing_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_existing_entity.yaml index 6f34af815e196..256c8d3921962 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_existing_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_existing_entity.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:51 GMT location: - https://storagename.table.core.windows.net/Tables('uttablecc7c1c5e') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkcc7c1c5e", "RowKey": "rkcc7c1c5e", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkcc7c1c5e", "RowKey": "rkcc7c1c5e", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablecc7c1c5e response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablecc7c1c5e/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A51.9816094Z''\"","PartitionKey":"pkcc7c1c5e","RowKey":"rkcc7c1c5e","Timestamp":"2020-07-30T14:24:51.9816094Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablecc7c1c5e/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A52.0753852Z''\"","PartitionKey":"pkcc7c1c5e","RowKey":"rkcc7c1c5e","Timestamp":"2020-09-02T21:28:52.0753852Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:51 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A51.9816094Z'" + - W/"datetime'2020-09-02T21%3A28%3A52.0753852Z'" location: - https://storagename.table.core.windows.net/uttablecc7c1c5e(PartitionKey='pkcc7c1c5e',RowKey='rkcc7c1c5e') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,13 +120,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttablecc7c1c5e(PartitionKey='pkcc7c1c5e',RowKey='rkcc7c1c5e') response: @@ -139,15 +138,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:51 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A52.0689108Z'" + - W/"datetime'2020-09-02T21%3A28%3A52.1124106Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -163,27 +162,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablecc7c1c5e(PartitionKey='pkcc7c1c5e',RowKey='rkcc7c1c5e') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablecc7c1c5e/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A52.0689108Z''\"","PartitionKey":"pkcc7c1c5e","RowKey":"rkcc7c1c5e","Timestamp":"2020-07-30T14:24:52.0689108Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablecc7c1c5e/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A52.1124106Z''\"","PartitionKey":"pkcc7c1c5e","RowKey":"rkcc7c1c5e","Timestamp":"2020-09-02T21:28:52.1124106Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:51 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A52.0689108Z'" + - W/"datetime'2020-09-02T21%3A28%3A52.1124106Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -191,7 +190,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -199,7 +198,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -207,13 +206,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablecc7c1c5e') response: @@ -225,13 +224,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:51 GMT + - Wed, 02 Sep 2020 21:28:51 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_non_existing_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_non_existing_entity.yaml index e10757f57cbb5..b2a6b8a511714 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_non_existing_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_non_existing_entity.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:52 GMT location: - https://storagename.table.core.windows.net/Tables('uttable419d1e08') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -53,7 +53,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -65,13 +65,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttable419d1e08(PartitionKey='pk419d1e08',RowKey='rk419d1e08') response: @@ -83,15 +83,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:52 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A52.7533942Z'" + - W/"datetime'2020-09-02T21%3A28%3A52.4206206Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -107,27 +107,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable419d1e08(PartitionKey='pk419d1e08',RowKey='rk419d1e08') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable419d1e08/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A52.7533942Z''\"","PartitionKey":"pk419d1e08","RowKey":"rk419d1e08","Timestamp":"2020-07-30T14:24:52.7533942Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable419d1e08/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A52.4206206Z''\"","PartitionKey":"pk419d1e08","RowKey":"rk419d1e08","Timestamp":"2020-09-02T21:28:52.4206206Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:52 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A52.7533942Z'" + - W/"datetime'2020-09-02T21%3A28%3A52.4206206Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -135,7 +135,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -143,7 +143,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -151,13 +151,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable419d1e08') response: @@ -169,13 +169,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:52 GMT + - Wed, 02 Sep 2020 21:28:52 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity.yaml index 648d07dc02109..e361fa147de2e 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT location: - https://storagename.table.core.windows.net/Tables('uttable3df0e7d') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk3df0e7d", "RowKey": "rk3df0e7d", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk3df0e7d", "RowKey": "rk3df0e7d", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '535' + - '467' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable3df0e7d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3df0e7d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A53.3764814Z''\"","PartitionKey":"pk3df0e7d","RowKey":"rk3df0e7d","Timestamp":"2020-07-30T14:24:53.3764814Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3df0e7d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A52.6957145Z''\"","PartitionKey":"pk3df0e7d","RowKey":"rk3df0e7d","Timestamp":"2020-09-02T21:28:52.6957145Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A53.3764814Z'" + - W/"datetime'2020-09-02T21%3A28%3A52.6957145Z'" location: - https://storagename.table.core.windows.net/uttable3df0e7d(PartitionKey='pk3df0e7d',RowKey='rk3df0e7d') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,15 +120,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable3df0e7d(PartitionKey='pk3df0e7d',RowKey='rk3df0e7d') response: @@ -141,15 +140,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A53.472903Z'" + - W/"datetime'2020-09-02T21%3A28%3A52.7328316Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -165,27 +164,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable3df0e7d(PartitionKey='pk3df0e7d',RowKey='rk3df0e7d') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3df0e7d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A53.472903Z''\"","PartitionKey":"pk3df0e7d","RowKey":"rk3df0e7d","Timestamp":"2020-07-30T14:24:53.472903Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3df0e7d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A52.7328316Z''\"","PartitionKey":"pk3df0e7d","RowKey":"rk3df0e7d","Timestamp":"2020-09-02T21:28:52.7328316Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large":933311100,"married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A53.472903Z'" + - W/"datetime'2020-09-02T21%3A28%3A52.7328316Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -193,7 +192,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -201,7 +200,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -209,13 +208,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3df0e7d') response: @@ -227,13 +226,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:51 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_not_existing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_not_existing.yaml index c4c0d07e89a1d..ef8a6e280d90f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_not_existing.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_not_existing.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:52 GMT location: - https://storagename.table.core.windows.net/Tables('uttablee64a13f7') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -53,7 +53,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -65,32 +65,28 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttablee64a13f7(PartitionKey='pke64a13f7',RowKey='rke64a13f7') response: body: - string: 'ResourceNotFoundThe specified resource does not exist. - - RequestId:f68387d3-2002-005e-187d-665afa000000 - - Time:2020-07-30T14:24:54.1053791Z' + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:bc6a7dfb-d002-005e-2470-81b183000000\nTime:2020-09-02T21:28:53.0015395Z"}}}' headers: cache-control: - no-cache content-type: - - application/xml;charset=utf-8 + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:52 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -98,7 +94,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 404 message: Not Found @@ -106,7 +102,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -114,13 +110,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee64a13f7') response: @@ -132,13 +128,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:53 GMT + - Wed, 02 Sep 2020 21:28:52 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_with_if_doesnt_match.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_with_if_doesnt_match.yaml index cb0cecb749e46..1d7fae47b8ad7 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_with_if_doesnt_match.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_with_if_doesnt_match.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT location: - https://storagename.table.core.windows.net/Tables('uttable9316171e') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk9316171e", "RowKey": "rk9316171e", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk9316171e", "RowKey": "rk9316171e", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable9316171e response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable9316171e/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A54.6804392Z''\"","PartitionKey":"pk9316171e","RowKey":"rk9316171e","Timestamp":"2020-07-30T14:24:54.6804392Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable9316171e/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A53.233569Z''\"","PartitionKey":"pk9316171e","RowKey":"rk9316171e","Timestamp":"2020-09-02T21:28:53.233569Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A54.6804392Z'" + - W/"datetime'2020-09-02T21%3A28%3A53.233569Z'" location: - https://storagename.table.core.windows.net/uttable9316171e(PartitionKey='pk9316171e',RowKey='rk9316171e') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,32 +120,28 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT If-Match: - W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable9316171e(PartitionKey='pk9316171e',RowKey='rk9316171e') response: body: - string: 'UpdateConditionNotSatisfiedThe update condition specified in the request was not satisfied. - - RequestId:9f1812d1-3002-004a-537d-66999e000000 - - Time:2020-07-30T14:24:54.7644978Z' + string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The + update condition specified in the request was not satisfied.\nRequestId:d453a7ab-e002-0055-4470-814ae8000000\nTime:2020-09-02T21:28:53.2775994Z"}}}' headers: cache-control: - no-cache content-type: - - application/xml;charset=utf-8 + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:52 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -154,7 +149,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 412 message: Precondition Failed @@ -162,7 +157,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -170,13 +165,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable9316171e') response: @@ -188,13 +183,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:53 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_with_if_matches.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_with_if_matches.yaml index 9521b04378254..01f9b785a543c 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_with_if_matches.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_merge_entity_with_if_matches.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:53 GMT location: - https://storagename.table.core.windows.net/Tables('uttable236c150a') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk236c150a", "RowKey": "rk236c150a", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk236c150a", "RowKey": "rk236c150a", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable236c150a response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable236c150a/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A55.315605Z''\"","PartitionKey":"pk236c150a","RowKey":"rk236c150a","Timestamp":"2020-07-30T14:24:55.315605Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable236c150a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A53.5520698Z''\"","PartitionKey":"pk236c150a","RowKey":"rk236c150a","Timestamp":"2020-09-02T21:28:53.5520698Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A55.315605Z'" + - W/"datetime'2020-09-02T21%3A28%3A53.5520698Z'" location: - https://storagename.table.core.windows.net/uttable236c150a(PartitionKey='pk236c150a',RowKey='rk236c150a') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,15 +120,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:52 GMT If-Match: - - W/"datetime'2020-07-30T14%3A24%3A55.315605Z'" + - W/"datetime'2020-09-02T21%3A28%3A53.5520698Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable236c150a(PartitionKey='pk236c150a',RowKey='rk236c150a') response: @@ -141,15 +140,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A55.4002652Z'" + - W/"datetime'2020-09-02T21%3A28%3A53.5934153Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -165,27 +164,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:52 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:52 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable236c150a(PartitionKey='pk236c150a',RowKey='rk236c150a') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable236c150a/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A55.4002652Z''\"","PartitionKey":"pk236c150a","RowKey":"rk236c150a","Timestamp":"2020-07-30T14:24:55.4002652Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable236c150a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A53.5934153Z''\"","PartitionKey":"pk236c150a","RowKey":"rk236c150a","Timestamp":"2020-09-02T21:28:53.5934153Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large":933311100,"married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A55.4002652Z'" + - W/"datetime'2020-09-02T21%3A28%3A53.5934153Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -193,7 +192,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -201,7 +200,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -209,13 +208,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable236c150a') response: @@ -227,13 +226,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:53 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_none_property_value.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_none_property_value.yaml index 77cea668a83e3..6b0b95dd670c5 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_none_property_value.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_none_property_value.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:54 GMT + - Wed, 02 Sep 2020 21:28:53 GMT location: - https://storagename.table.core.windows.net/Tables('uttable76561181') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,27 +63,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable76561181 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable76561181/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A56.0435707Z''\"","PartitionKey":"pk76561181","RowKey":"rk76561181","Timestamp":"2020-07-30T14:24:56.0435707Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable76561181/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A53.9082094Z''\"","PartitionKey":"pk76561181","RowKey":"rk76561181","Timestamp":"2020-09-02T21:28:53.9082094Z"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A56.0435707Z'" + - W/"datetime'2020-09-02T21%3A28%3A53.9082094Z'" location: - https://storagename.table.core.windows.net/uttable76561181(PartitionKey='pk76561181',RowKey='rk76561181') server: @@ -93,7 +93,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,27 +109,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable76561181(PartitionKey='pk76561181',RowKey='rk76561181') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable76561181/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A56.0435707Z''\"","PartitionKey":"pk76561181","RowKey":"rk76561181","Timestamp":"2020-07-30T14:24:56.0435707Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable76561181/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A53.9082094Z''\"","PartitionKey":"pk76561181","RowKey":"rk76561181","Timestamp":"2020-09-02T21:28:53.9082094Z"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A56.0435707Z'" + - W/"datetime'2020-09-02T21%3A28%3A53.9082094Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -137,7 +137,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -145,7 +145,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -153,13 +153,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable76561181') response: @@ -171,13 +171,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:55 GMT + - Wed, 02 Sep 2020 21:28:53 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_operations_on_entity_with_partition_key_having_single_quote.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_operations_on_entity_with_partition_key_having_single_quote.yaml index d19c247f73586..064a9397490f0 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_operations_on_entity_with_partition_key_having_single_quote.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_operations_on_entity_with_partition_key_having_single_quote.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT location: - https://storagename.table.core.windows.net/Tables('uttable88682233') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "a''''''''b", "RowKey": "a''''''''b", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "a''''''''b", "RowKey": "a''''''''b", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '529' + - '461' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable88682233 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable88682233/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A56.6959097Z''\"","PartitionKey":"a''''''''b","RowKey":"a''''''''b","Timestamp":"2020-07-30T14:24:56.6959097Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable88682233/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A54.1766946Z''\"","PartitionKey":"a''''''''b","RowKey":"a''''''''b","Timestamp":"2020-09-02T21:28:54.1766946Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A56.6959097Z'" + - W/"datetime'2020-09-02T21%3A28%3A54.1766946Z'" location: - https://storagename.table.core.windows.net/uttable88682233(PartitionKey='a''''''''b',RowKey='a''''''''b') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,13 +120,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable88682233(PartitionKey='a%27%27%27%27b',RowKey='a%27%27%27%27b') response: @@ -139,15 +138,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A56.7922489Z'" + - W/"datetime'2020-09-02T21%3A28%3A54.2218431Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -163,27 +162,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable88682233(PartitionKey='a%27%27%27%27b',RowKey='a%27%27%27%27b') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable88682233/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A56.7922489Z''\"","PartitionKey":"a''''b","RowKey":"a''''b","Timestamp":"2020-07-30T14:24:56.7922489Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable88682233/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A54.2218431Z''\"","PartitionKey":"a''''b","RowKey":"a''''b","Timestamp":"2020-09-02T21:28:54.2218431Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A56.7922489Z'" + - W/"datetime'2020-09-02T21%3A28%3A54.2218431Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -191,7 +190,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -201,7 +200,7 @@ interactions: "Edm.DateTime", "newField": "newFieldValue"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -213,15 +212,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable88682233(PartitionKey='a%27%27%27%27b',RowKey='a%27%27%27%27b') response: @@ -233,15 +232,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:53 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A56.9733775Z'" + - W/"datetime'2020-09-02T21%3A28%3A54.2898884Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -257,27 +256,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable88682233(PartitionKey='a%27%27%27%27b',RowKey='a%27%27%27%27b') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable88682233/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A56.9733775Z''\"","PartitionKey":"a''''b","RowKey":"a''''b","Timestamp":"2020-07-30T14:24:56.9733775Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","newField":"newFieldValue","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable88682233/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A54.2898884Z''\"","PartitionKey":"a''''b","RowKey":"a''''b","Timestamp":"2020-09-02T21:28:54.2898884Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","newField":"newFieldValue","sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:54 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A56.9733775Z'" + - W/"datetime'2020-09-02T21%3A28%3A54.2898884Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -285,7 +284,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -293,7 +292,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata Accept-Encoding: - gzip, deflate Connection: @@ -303,15 +302,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:53 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttable88682233(PartitionKey='a%27%27%27%27b',RowKey='a%27%27%27%27b') response: @@ -323,13 +322,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:54 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -337,7 +336,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -345,13 +344,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable88682233') response: @@ -363,13 +362,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:54 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities.yaml index 4e5f6e3fd8b17..437393d40c774 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:53 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:53 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:54 GMT location: - https://storagename.table.core.windows.net/Tables('uttable23930f6b') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:54 GMT location: - https://storagename.table.core.windows.net/Tables('querytable23930f6b') server: @@ -91,18 +91,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk23930f6b", "RowKey": "rk23930f6b1", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk23930f6b", "RowKey": "rk23930f6b1", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -111,33 +110,33 @@ interactions: Connection: - keep-alive Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable23930f6b response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable23930f6b/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A57.7802038Z''\"","PartitionKey":"pk23930f6b","RowKey":"rk23930f6b1","Timestamp":"2020-07-30T14:24:57.7802038Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable23930f6b/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A54.6987764Z''\"","PartitionKey":"pk23930f6b","RowKey":"rk23930f6b1","Timestamp":"2020-09-02T21:28:54.6987764Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:54 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A57.7802038Z'" + - W/"datetime'2020-09-02T21%3A28%3A54.6987764Z'" location: - https://storagename.table.core.windows.net/querytable23930f6b(PartitionKey='pk23930f6b',RowKey='rk23930f6b1') server: @@ -147,18 +146,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk23930f6b", "RowKey": "rk23930f6b12", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk23930f6b", "RowKey": "rk23930f6b12", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -167,33 +165,33 @@ interactions: Connection: - keep-alive Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable23930f6b response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable23930f6b/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A57.8612602Z''\"","PartitionKey":"pk23930f6b","RowKey":"rk23930f6b12","Timestamp":"2020-07-30T14:24:57.8612602Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable23930f6b/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A54.7428082Z''\"","PartitionKey":"pk23930f6b","RowKey":"rk23930f6b12","Timestamp":"2020-09-02T21:28:54.7428082Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:56 GMT + - Wed, 02 Sep 2020 21:28:54 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A57.8612602Z'" + - W/"datetime'2020-09-02T21%3A28%3A54.7428082Z'" location: - https://storagename.table.core.windows.net/querytable23930f6b(PartitionKey='pk23930f6b',RowKey='rk23930f6b12') server: @@ -203,7 +201,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -219,25 +217,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable23930f6b() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable23930f6b","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A57.7802038Z''\"","PartitionKey":"pk23930f6b","RowKey":"rk23930f6b1","Timestamp":"2020-07-30T14:24:57.7802038Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A57.8612602Z''\"","PartitionKey":"pk23930f6b","RowKey":"rk23930f6b12","Timestamp":"2020-07-30T14:24:57.8612602Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable23930f6b","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A54.6987764Z''\"","PartitionKey":"pk23930f6b","RowKey":"rk23930f6b1","Timestamp":"2020-09-02T21:28:54.6987764Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A54.7428082Z''\"","PartitionKey":"pk23930f6b","RowKey":"rk23930f6b12","Timestamp":"2020-09-02T21:28:54.7428082Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:54 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -245,7 +243,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -253,7 +251,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -261,13 +259,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable23930f6b') response: @@ -279,13 +277,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:54 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -293,7 +291,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -301,13 +299,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable23930f6b') response: @@ -319,13 +317,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:57 GMT + - Wed, 02 Sep 2020 21:28:54 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_full_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_full_metadata.yaml index e7e6c815aa16f..6c4fee3520168 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_full_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_full_metadata.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT location: - https://storagename.table.core.windows.net/Tables('uttable264f151d') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT location: - https://storagename.table.core.windows.net/Tables('querytable264f151d') server: @@ -91,18 +91,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk264f151d", "RowKey": "rk264f151d1", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk264f151d", "RowKey": "rk264f151d1", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -111,33 +110,33 @@ interactions: Connection: - keep-alive Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable264f151d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable264f151d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A58.6636662Z''\"","PartitionKey":"pk264f151d","RowKey":"rk264f151d1","Timestamp":"2020-07-30T14:24:58.6636662Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable264f151d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A55.0965665Z''\"","PartitionKey":"pk264f151d","RowKey":"rk264f151d1","Timestamp":"2020-09-02T21:28:55.0965665Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A58.6636662Z'" + - W/"datetime'2020-09-02T21%3A28%3A55.0965665Z'" location: - https://storagename.table.core.windows.net/querytable264f151d(PartitionKey='pk264f151d',RowKey='rk264f151d1') server: @@ -147,18 +146,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk264f151d", "RowKey": "rk264f151d12", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk264f151d", "RowKey": "rk264f151d12", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -167,33 +165,33 @@ interactions: Connection: - keep-alive Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable264f151d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable264f151d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A58.746726Z''\"","PartitionKey":"pk264f151d","RowKey":"rk264f151d12","Timestamp":"2020-07-30T14:24:58.746726Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable264f151d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A55.132593Z''\"","PartitionKey":"pk264f151d","RowKey":"rk264f151d12","Timestamp":"2020-09-02T21:28:55.132593Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A58.746726Z'" + - W/"datetime'2020-09-02T21%3A28%3A55.132593Z'" location: - https://storagename.table.core.windows.net/querytable264f151d(PartitionKey='pk264f151d',RowKey='rk264f151d12') server: @@ -203,7 +201,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -217,27 +215,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) accept: - application/json;odata=fullmetadata x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable264f151d() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable264f151d","value":[{"odata.type":"storagename.querytable264f151d","odata.id":"https://storagename.table.core.windows.net/querytable264f151d(PartitionKey=''pk264f151d'',RowKey=''rk264f151d1'')","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A58.6636662Z''\"","odata.editLink":"querytable264f151d(PartitionKey=''pk264f151d'',RowKey=''rk264f151d1'')","PartitionKey":"pk264f151d","RowKey":"rk264f151d1","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-07-30T14:24:58.6636662Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.type":"storagename.querytable264f151d","odata.id":"https://storagename.table.core.windows.net/querytable264f151d(PartitionKey=''pk264f151d'',RowKey=''rk264f151d12'')","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A58.746726Z''\"","odata.editLink":"querytable264f151d(PartitionKey=''pk264f151d'',RowKey=''rk264f151d12'')","PartitionKey":"pk264f151d","RowKey":"rk264f151d12","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-07-30T14:24:58.746726Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable264f151d","value":[{"odata.type":"storagename.querytable264f151d","odata.id":"https://storagename.table.core.windows.net/querytable264f151d(PartitionKey=''pk264f151d'',RowKey=''rk264f151d1'')","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A55.0965665Z''\"","odata.editLink":"querytable264f151d(PartitionKey=''pk264f151d'',RowKey=''rk264f151d1'')","PartitionKey":"pk264f151d","RowKey":"rk264f151d1","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:28:55.0965665Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.type":"storagename.querytable264f151d","odata.id":"https://storagename.table.core.windows.net/querytable264f151d(PartitionKey=''pk264f151d'',RowKey=''rk264f151d12'')","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A55.132593Z''\"","odata.editLink":"querytable264f151d(PartitionKey=''pk264f151d'',RowKey=''rk264f151d12'')","PartitionKey":"pk264f151d","RowKey":"rk264f151d12","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:28:55.132593Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=fullmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -245,7 +243,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -253,7 +251,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -261,13 +259,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable264f151d') response: @@ -279,13 +277,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -293,7 +291,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -301,13 +299,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable264f151d') response: @@ -319,13 +317,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:54 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_no_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_no_metadata.yaml index 9f2fd09f46d3d..1f7fe975c47cd 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_no_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_no_metadata.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:55 GMT location: - https://storagename.table.core.windows.net/Tables('uttablefc361447') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:55 GMT location: - https://storagename.table.core.windows.net/Tables('querytablefc361447') server: @@ -91,18 +91,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkfc361447", "RowKey": "rkfc3614471", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkfc361447", "RowKey": "rkfc3614471", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -111,33 +110,33 @@ interactions: Connection: - keep-alive Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytablefc361447 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefc361447/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A59.5774073Z''\"","PartitionKey":"pkfc361447","RowKey":"rkfc3614471","Timestamp":"2020-07-30T14:24:59.5774073Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefc361447/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A55.4949117Z''\"","PartitionKey":"pkfc361447","RowKey":"rkfc3614471","Timestamp":"2020-09-02T21:28:55.4949117Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:55 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A59.5774073Z'" + - W/"datetime'2020-09-02T21%3A28%3A55.4949117Z'" location: - https://storagename.table.core.windows.net/querytablefc361447(PartitionKey='pkfc361447',RowKey='rkfc3614471') server: @@ -147,18 +146,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkfc361447", "RowKey": "rkfc36144712", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkfc361447", "RowKey": "rkfc36144712", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -167,33 +165,33 @@ interactions: Connection: - keep-alive Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytablefc361447 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefc361447/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A24%3A59.6594639Z''\"","PartitionKey":"pkfc361447","RowKey":"rkfc36144712","Timestamp":"2020-07-30T14:24:59.6594639Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefc361447/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A55.5309371Z''\"","PartitionKey":"pkfc361447","RowKey":"rkfc36144712","Timestamp":"2020-09-02T21:28:55.5309371Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:55 GMT etag: - - W/"datetime'2020-07-30T14%3A24%3A59.6594639Z'" + - W/"datetime'2020-09-02T21%3A28%3A55.5309371Z'" location: - https://storagename.table.core.windows.net/querytablefc361447(PartitionKey='pkfc361447',RowKey='rkfc36144712') server: @@ -203,7 +201,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -217,27 +215,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) accept: - application/json;odata=nometadata x-ms-date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytablefc361447() response: body: - string: '{"value":[{"PartitionKey":"pkfc361447","RowKey":"rkfc3614471","Timestamp":"2020-07-30T14:24:59.5774073Z","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"PartitionKey":"pkfc361447","RowKey":"rkfc36144712","Timestamp":"2020-07-30T14:24:59.6594639Z","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"value":[{"PartitionKey":"pkfc361447","RowKey":"rkfc3614471","Timestamp":"2020-09-02T21:28:55.4949117Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"PartitionKey":"pkfc361447","RowKey":"rkfc36144712","Timestamp":"2020-09-02T21:28:55.5309371Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=nometadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:55 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -245,7 +243,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -253,7 +251,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -261,13 +259,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:54 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablefc361447') response: @@ -279,13 +277,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:55 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -293,7 +291,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -301,13 +299,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytablefc361447') response: @@ -319,13 +317,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:24:58 GMT + - Wed, 02 Sep 2020 21:28:55 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_filter.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_filter.yaml index 41550d407e7fd..f1745fe62794a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_filter.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_filter.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:55 GMT location: - https://storagename.table.core.windows.net/Tables('uttablefce8146b') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkfce8146b", "RowKey": "rkfce8146b", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkfce8146b", "RowKey": "rkfce8146b", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablefce8146b response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefce8146b/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A00.3672487Z''\"","PartitionKey":"pkfce8146b","RowKey":"rkfce8146b","Timestamp":"2020-07-30T14:25:00.3672487Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefce8146b/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A55.841786Z''\"","PartitionKey":"pkfce8146b","RowKey":"rkfce8146b","Timestamp":"2020-09-02T21:28:55.841786Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:55 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A00.3672487Z'" + - W/"datetime'2020-09-02T21%3A28%3A55.841786Z'" location: - https://storagename.table.core.windows.net/uttablefce8146b(PartitionKey='pkfce8146b',RowKey='rkfce8146b') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,25 +114,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablefce8146b() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefce8146b","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A00.3672487Z''\"","PartitionKey":"pkfce8146b","RowKey":"rkfce8146b","Timestamp":"2020-07-30T14:25:00.3672487Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefce8146b","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A55.841786Z''\"","PartitionKey":"pkfce8146b","RowKey":"rkfce8146b","Timestamp":"2020-09-02T21:28:55.841786Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:24:59 GMT + - Wed, 02 Sep 2020 21:28:55 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -141,7 +140,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -149,7 +148,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -157,13 +156,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablefce8146b') response: @@ -175,13 +174,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:55 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_select.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_select.yaml index dd49e745767a0..be1c7587306f1 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_select.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_select.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:55 GMT location: - https://storagename.table.core.windows.net/Tables('uttablefcf31465') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:55 GMT location: - https://storagename.table.core.windows.net/Tables('querytablefcf31465') server: @@ -91,18 +91,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkfcf31465", "RowKey": "rkfcf314651", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkfcf31465", "RowKey": "rkfcf314651", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -111,33 +110,33 @@ interactions: Connection: - keep-alive Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytablefcf31465 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefcf31465/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A01.0987797Z''\"","PartitionKey":"pkfcf31465","RowKey":"rkfcf314651","Timestamp":"2020-07-30T14:25:01.0987797Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefcf31465/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.1985259Z''\"","PartitionKey":"pkfcf31465","RowKey":"rkfcf314651","Timestamp":"2020-09-02T21:28:56.1985259Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:55 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A01.0987797Z'" + - W/"datetime'2020-09-02T21%3A28%3A56.1985259Z'" location: - https://storagename.table.core.windows.net/querytablefcf31465(PartitionKey='pkfcf31465',RowKey='rkfcf314651') server: @@ -147,18 +146,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkfcf31465", "RowKey": "rkfcf3146512", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkfcf31465", "RowKey": "rkfcf3146512", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -167,33 +165,33 @@ interactions: Connection: - keep-alive Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytablefcf31465 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefcf31465/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A01.1808356Z''\"","PartitionKey":"pkfcf31465","RowKey":"rkfcf3146512","Timestamp":"2020-07-30T14:25:01.1808356Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefcf31465/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.2315486Z''\"","PartitionKey":"pkfcf31465","RowKey":"rkfcf3146512","Timestamp":"2020-09-02T21:28:56.2315486Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:55 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A01.1808356Z'" + - W/"datetime'2020-09-02T21%3A28%3A56.2315486Z'" location: - https://storagename.table.core.windows.net/querytablefcf31465(PartitionKey='pkfcf31465',RowKey='rkfcf3146512') server: @@ -203,7 +201,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -219,25 +217,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytablefcf31465()?$select=age%2C%20sex response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefcf31465&$select=age,%20sex","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A01.0987797Z''\"","age@odata.type":"Edm.Int64","age":"39","sex":"male"},{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A01.1808356Z''\"","age@odata.type":"Edm.Int64","age":"39","sex":"male"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablefcf31465&$select=age,%20sex","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.1985259Z''\"","age":39,"sex":"male"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.2315486Z''\"","age":39,"sex":"male"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:55 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -245,7 +243,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -253,7 +251,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -261,13 +259,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablefcf31465') response: @@ -279,13 +277,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -293,7 +291,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -301,13 +299,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytablefcf31465') response: @@ -319,13 +317,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:55 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_top.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_top.yaml index 40d595f1f4e92..1f8e3376460cf 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_top.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_top.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:56 GMT location: - https://storagename.table.core.windows.net/Tables('uttablec12a1338') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:00 GMT + - Wed, 02 Sep 2020 21:28:56 GMT location: - https://storagename.table.core.windows.net/Tables('querytablec12a1338') server: @@ -91,18 +91,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkc12a1338", "RowKey": "rkc12a13381", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkc12a1338", "RowKey": "rkc12a13381", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -111,33 +110,33 @@ interactions: Connection: - keep-alive Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytablec12a1338 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec12a1338/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A01.9958858Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a13381","Timestamp":"2020-07-30T14:25:01.9958858Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec12a1338/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.603042Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a13381","Timestamp":"2020-09-02T21:28:56.603042Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:56 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A01.9958858Z'" + - W/"datetime'2020-09-02T21%3A28%3A56.603042Z'" location: - https://storagename.table.core.windows.net/querytablec12a1338(PartitionKey='pkc12a1338',RowKey='rkc12a13381') server: @@ -147,18 +146,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkc12a1338", "RowKey": "rkc12a133812", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkc12a1338", "RowKey": "rkc12a133812", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -167,33 +165,33 @@ interactions: Connection: - keep-alive Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:55 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:55 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytablec12a1338 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec12a1338/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A02.078943Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a133812","Timestamp":"2020-07-30T14:25:02.078943Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec12a1338/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.6390683Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a133812","Timestamp":"2020-09-02T21:28:56.6390683Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:56 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A02.078943Z'" + - W/"datetime'2020-09-02T21%3A28%3A56.6390683Z'" location: - https://storagename.table.core.windows.net/querytablec12a1338(PartitionKey='pkc12a1338',RowKey='rkc12a133812') server: @@ -203,18 +201,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkc12a1338", "RowKey": "rkc12a1338123", "age": "39", - "age@odata.type": "Edm.Int64", "sex": "male", "married": true, "deceased": false, - "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", - "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": - "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", - "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkc12a1338", "RowKey": "rkc12a1338123", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -223,33 +220,33 @@ interactions: Connection: - keep-alive Content-Length: - - '540' + - '472' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytablec12a1338 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec12a1338/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A02.1620006Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a1338123","Timestamp":"2020-07-30T14:25:02.1620006Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec12a1338/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.6720918Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a1338123","Timestamp":"2020-09-02T21:28:56.6720918Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:56 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A02.1620006Z'" + - W/"datetime'2020-09-02T21%3A28%3A56.6720918Z'" location: - https://storagename.table.core.windows.net/querytablec12a1338(PartitionKey='pkc12a1338',RowKey='rkc12a1338123') server: @@ -259,7 +256,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -275,25 +272,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytablec12a1338()?$top=2 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec12a1338","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A01.9958858Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a13381","Timestamp":"2020-07-30T14:25:01.9958858Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A02.078943Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a133812","Timestamp":"2020-07-30T14:25:02.078943Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytablec12a1338","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.603042Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a13381","Timestamp":"2020-09-02T21:28:56.603042Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A56.6390683Z''\"","PartitionKey":"pkc12a1338","RowKey":"rkc12a133812","Timestamp":"2020-09-02T21:28:56.6390683Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:56 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -305,7 +302,7 @@ interactions: x-ms-continuation-nextrowkey: - 1!20!cmtjMTJhMTMzODEyMw-- x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -313,7 +310,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -321,13 +318,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablec12a1338') response: @@ -339,13 +336,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:56 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -353,7 +350,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -361,13 +358,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytablec12a1338') response: @@ -379,13 +376,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:01 GMT + - Wed, 02 Sep 2020 21:28:56 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_top_and_next.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_top_and_next.yaml index 80a5342336719..70d8450adadab 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_top_and_next.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_entities_with_top_and_next.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:56 GMT location: - https://storagename.table.core.windows.net/Tables('uttable801016e8') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:56 GMT location: - https://storagename.table.core.windows.net/Tables('querytable801016e8') server: @@ -91,18 +91,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e81", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e81", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -111,33 +110,33 @@ interactions: Connection: - keep-alive Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable801016e8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.0268879Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e81","Timestamp":"2020-07-30T14:25:03.0268879Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.0429682Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e81","Timestamp":"2020-09-02T21:28:57.0429682Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:56 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A03.0268879Z'" + - W/"datetime'2020-09-02T21%3A28%3A57.0429682Z'" location: - https://storagename.table.core.windows.net/querytable801016e8(PartitionKey='pk801016e8',RowKey='rk801016e81') server: @@ -147,18 +146,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e812", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e812", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -167,33 +165,33 @@ interactions: Connection: - keep-alive Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable801016e8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.1149487Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e812","Timestamp":"2020-07-30T14:25:03.1149487Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.0769919Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e812","Timestamp":"2020-09-02T21:28:57.0769919Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:56 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A03.1149487Z'" + - W/"datetime'2020-09-02T21%3A28%3A57.0769919Z'" location: - https://storagename.table.core.windows.net/querytable801016e8(PartitionKey='pk801016e8',RowKey='rk801016e812') server: @@ -203,18 +201,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e8123", "age": "39", - "age@odata.type": "Edm.Int64", "sex": "male", "married": true, "deceased": false, - "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", - "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": - "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", - "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e8123", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -223,33 +220,33 @@ interactions: Connection: - keep-alive Content-Length: - - '540' + - '472' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable801016e8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.2050103Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e8123","Timestamp":"2020-07-30T14:25:03.2050103Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.1180208Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e8123","Timestamp":"2020-09-02T21:28:57.1180208Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:02 GMT + - Wed, 02 Sep 2020 21:28:56 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A03.2050103Z'" + - W/"datetime'2020-09-02T21%3A28%3A57.1180208Z'" location: - https://storagename.table.core.windows.net/querytable801016e8(PartitionKey='pk801016e8',RowKey='rk801016e8123') server: @@ -259,18 +256,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e81234", "age": "39", - "age@odata.type": "Edm.Int64", "sex": "male", "married": true, "deceased": false, - "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", - "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": - "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", - "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e81234", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -279,33 +275,33 @@ interactions: Connection: - keep-alive Content-Length: - - '541' + - '473' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable801016e8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.2880679Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e81234","Timestamp":"2020-07-30T14:25:03.2880679Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.1570474Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e81234","Timestamp":"2020-09-02T21:28:57.1570474Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A03.2880679Z'" + - W/"datetime'2020-09-02T21%3A28%3A57.1570474Z'" location: - https://storagename.table.core.windows.net/querytable801016e8(PartitionKey='pk801016e8',RowKey='rk801016e81234') server: @@ -315,18 +311,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e812345", "age": "39", - "age@odata.type": "Edm.Int64", "sex": "male", "married": true, "deceased": false, - "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", - "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": - "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", - "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk801016e8", "RowKey": "rk801016e812345", "age": 39, + "sex": "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": + 3.0, "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -335,33 +330,33 @@ interactions: Connection: - keep-alive Content-Length: - - '542' + - '474' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable801016e8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.37713Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e812345","Timestamp":"2020-07-30T14:25:03.37713Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.1900711Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e812345","Timestamp":"2020-09-02T21:28:57.1900711Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:57 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A03.37713Z'" + - W/"datetime'2020-09-02T21%3A28%3A57.1900711Z'" location: - https://storagename.table.core.windows.net/querytable801016e8(PartitionKey='pk801016e8',RowKey='rk801016e812345') server: @@ -371,7 +366,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -387,25 +382,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable801016e8()?$top=2 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.0268879Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e81","Timestamp":"2020-07-30T14:25:03.0268879Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.1149487Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e812","Timestamp":"2020-07-30T14:25:03.1149487Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.0429682Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e81","Timestamp":"2020-09-02T21:28:57.0429682Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.0769919Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e812","Timestamp":"2020-09-02T21:28:57.0769919Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -417,7 +412,7 @@ interactions: x-ms-continuation-nextrowkey: - 1!20!cms4MDEwMTZlODEyMw-- x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -433,25 +428,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable801016e8()?$top=2&NextPartitionKey=1%2116%21cGs4MDEwMTZlOA--&NextRowKey=1%2120%21cms4MDEwMTZlODEyMw-- response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.2050103Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e8123","Timestamp":"2020-07-30T14:25:03.2050103Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.2880679Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e81234","Timestamp":"2020-07-30T14:25:03.2880679Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.1180208Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e8123","Timestamp":"2020-09-02T21:28:57.1180208Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.1570474Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e81234","Timestamp":"2020-09-02T21:28:57.1570474Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -463,7 +458,7 @@ interactions: x-ms-continuation-nextrowkey: - 1!20!cms4MDEwMTZlODEyMzQ1 x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -479,25 +474,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable801016e8()?$top=2&NextPartitionKey=1%2116%21cGs4MDEwMTZlOA--&NextRowKey=1%2120%21cms4MDEwMTZlODEyMzQ1 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A03.37713Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e812345","Timestamp":"2020-07-30T14:25:03.37713Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable801016e8","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.1900711Z''\"","PartitionKey":"pk801016e8","RowKey":"rk801016e812345","Timestamp":"2020-09-02T21:28:57.1900711Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -505,7 +500,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -513,7 +508,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -521,13 +516,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable801016e8') response: @@ -539,13 +534,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -553,7 +548,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -561,13 +556,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable801016e8') response: @@ -579,13 +574,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_user_filter.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_user_filter.yaml index fbdc0cb13d7fb..aacc1ec9a4b23 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_user_filter.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_user_filter.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT location: - https://storagename.table.core.windows.net/Tables('uttable546210aa') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk546210aa", "RowKey": "rk546210aa", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk546210aa", "RowKey": "rk546210aa", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable546210aa response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable546210aa/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A04.3123943Z''\"","PartitionKey":"pk546210aa","RowKey":"rk546210aa","Timestamp":"2020-07-30T14:25:04.3123943Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable546210aa/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A57.5924702Z''\"","PartitionKey":"pk546210aa","RowKey":"rk546210aa","Timestamp":"2020-09-02T21:28:57.5924702Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A04.3123943Z'" + - W/"datetime'2020-09-02T21%3A28%3A57.5924702Z'" location: - https://storagename.table.core.windows.net/uttable546210aa(PartitionKey='pk546210aa',RowKey='rk546210aa') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -115,13 +114,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable546210aa') response: @@ -133,13 +132,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:03 GMT + - Wed, 02 Sep 2020 21:28:56 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_zero_entities.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_zero_entities.yaml index df02d5f78c5e8..3214ec8d38502 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_zero_entities.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_query_zero_entities.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:56 GMT location: - https://storagename.table.core.windows.net/Tables('uttable7732118a') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,13 +63,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -81,7 +81,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:57 GMT location: - https://storagename.table.core.windows.net/Tables('querytable7732118a') server: @@ -91,7 +91,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,13 +107,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable7732118a() response: @@ -125,7 +125,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -133,7 +133,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -141,7 +141,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -149,13 +149,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable7732118a') response: @@ -167,13 +167,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -181,7 +181,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -189,13 +189,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable7732118a') response: @@ -207,13 +207,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add.yaml index 27f94ab56ad19..e40d61edb7f92 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:04 GMT + - Wed, 02 Sep 2020 21:28:57 GMT location: - https://storagename.table.core.windows.net/Tables('uttablebfd90c40') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkbfd90c40", "RowKey": "rkbfd90c40", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkbfd90c40", "RowKey": "rkbfd90c40", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST - uri: https://storagename.table.core.windows.net/uttablebfd90c40?st=2020-07-30T14%3A24%3A06Z&se=2020-07-30T15%3A25%3A06Z&sp=a&sv=2019-07-07&tn=uttablebfd90c40&sig=fXD4tI6Ue%2BNF%2F90e81hMVWjUVL7IJ4zZi0oKy4DRJkg%3D + uri: https://storagename.table.core.windows.net/uttablebfd90c40?st=2020-09-02T21%3A27%3A57Z&se=2020-09-02T22%3A28%3A57Z&sp=a&sv=2019-02-02&tn=uttablebfd90c40&sig=2aitiCkp3QfiRad2MtOcDYM66G9ibItpRA035v5mEd8%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablebfd90c40/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A05.9288095Z''\"","PartitionKey":"pkbfd90c40","RowKey":"rkbfd90c40","Timestamp":"2020-07-30T14:25:05.9288095Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablebfd90c40/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A58.3629783Z''\"","PartitionKey":"pkbfd90c40","RowKey":"rkbfd90c40","Timestamp":"2020-09-02T21:28:58.3629783Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A05.9288095Z'" + - W/"datetime'2020-09-02T21%3A28%3A58.3629783Z'" location: - https://storagename.table.core.windows.net/uttablebfd90c40(PartitionKey='pkbfd90c40',RowKey='rkbfd90c40') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,27 +114,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablebfd90c40(PartitionKey='pkbfd90c40',RowKey='rkbfd90c40') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablebfd90c40/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A05.9288095Z''\"","PartitionKey":"pkbfd90c40","RowKey":"rkbfd90c40","Timestamp":"2020-07-30T14:25:05.9288095Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablebfd90c40/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A58.3629783Z''\"","PartitionKey":"pkbfd90c40","RowKey":"rkbfd90c40","Timestamp":"2020-09-02T21:28:58.3629783Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A05.9288095Z'" + - W/"datetime'2020-09-02T21%3A28%3A58.3629783Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -143,7 +142,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -151,7 +150,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -159,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablebfd90c40') response: @@ -177,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add_inside_range.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add_inside_range.yaml index 7a83eed914065..e1572d7740ea2 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add_inside_range.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add_inside_range.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:57 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:57 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:05 GMT + - Wed, 02 Sep 2020 21:28:57 GMT location: - https://storagename.table.core.windows.net/Tables('uttable84281187') server: @@ -43,17 +43,16 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "test", "RowKey": "test1", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", + body: '{"PartitionKey": "test", "RowKey": "test1", "age": 39, "sex": "male", "married": + true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, "large": 933311100, + "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": + "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", + "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '526' + - '458' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST - uri: https://storagename.table.core.windows.net/uttable84281187?se=2020-07-30T15%3A25%3A07Z&sp=a&sv=2019-07-07&tn=uttable84281187&spk=test&srk=test1&epk=test&erk=test1&sig=S2LAuFVQfomgXS986%2B%2FHTujEcgJd9vd1gsNXXHKC4yc%3D + uri: https://storagename.table.core.windows.net/uttable84281187?se=2020-09-02T22%3A28%3A58Z&sp=a&sv=2019-02-02&tn=uttable84281187&spk=test&srk=test1&epk=test&erk=test1&sig=vew8wWl0TParsPt3McajuJmIOLvBxRqOtnUWuxzz1bA%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable84281187/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A06.8043504Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-07-30T14:25:06.8043504Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable84281187/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A58.7601718Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-09-02T21:28:58.7601718Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:58 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A06.8043504Z'" + - W/"datetime'2020-09-02T21%3A28%3A58.7601718Z'" location: - https://storagename.table.core.windows.net/uttable84281187(PartitionKey='test',RowKey='test1') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,27 +114,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable84281187(PartitionKey='test',RowKey='test1') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable84281187/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A06.8043504Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-07-30T14:25:06.8043504Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable84281187/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A58.7601718Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-09-02T21:28:58.7601718Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A06.8043504Z'" + - W/"datetime'2020-09-02T21%3A28%3A58.7601718Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -143,7 +142,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -151,7 +150,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -159,13 +158,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable84281187') response: @@ -177,13 +176,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add_outside_range.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add_outside_range.yaml index 2156c8f4bdc9a..99eb5f8efb40a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add_outside_range.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_add_outside_range.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:58 GMT location: - https://storagename.table.core.windows.net/Tables('uttable973c1208') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk973c1208", "RowKey": "rk973c1208", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk973c1208", "RowKey": "rk973c1208", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,32 +62,32 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST - uri: https://storagename.table.core.windows.net/uttable973c1208?se=2020-07-30T15%3A25%3A08Z&sp=a&sv=2019-07-07&tn=uttable973c1208&spk=test&srk=test1&epk=test&erk=test1&sig=F%2FW5DJ9FV2uXi1DUTqRdhnMLoPz%2FYCWId2%2Fsh6icCrY%3D + uri: https://storagename.table.core.windows.net/uttable973c1208?se=2020-09-02T22%3A28%3A58Z&sp=a&sv=2019-02-02&tn=uttable973c1208&spk=test&srk=test1&epk=test&erk=test1&sig=4Cx5TAZJsDPPIeP4fXXn7wQFQyBOqIb93NMKv7u7HiI%3D response: body: string: '{"odata.error":{"code":"AuthorizationFailure","message":{"lang":"en-US","value":"This - request is not authorized to perform this operation.\nRequestId:56758a81-e002-0025-787d-66314a000000\nTime:2020-07-30T14:25:07.6660493Z"}}}' + request is not authorized to perform this operation.\nRequestId:b77115cc-7002-008c-5e70-81326d000000\nTime:2020-09-02T21:28:59.3114179Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -96,7 +95,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 403 message: Forbidden @@ -104,7 +103,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -112,13 +111,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable973c1208') response: @@ -130,13 +129,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:06 GMT + - Wed, 02 Sep 2020 21:28:58 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_delete.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_delete.yaml index 17a4f55d50e18..ec65b2ee6ca17 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_delete.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_delete.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT location: - https://storagename.table.core.windows.net/Tables('uttablee74c0d8a') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pke74c0d8a", "RowKey": "rke74c0d8a", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pke74c0d8a", "RowKey": "rke74c0d8a", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablee74c0d8a response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee74c0d8a/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A08.1834177Z''\"","PartitionKey":"pke74c0d8a","RowKey":"rke74c0d8a","Timestamp":"2020-07-30T14:25:08.1834177Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee74c0d8a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A28%3A59.5892727Z''\"","PartitionKey":"pke74c0d8a","RowKey":"rke74c0d8a","Timestamp":"2020-09-02T21:28:59.5892727Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:07 GMT + - Wed, 02 Sep 2020 21:28:58 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A08.1834177Z'" + - W/"datetime'2020-09-02T21%3A28%3A59.5892727Z'" location: - https://storagename.table.core.windows.net/uttablee74c0d8a(PartitionKey='pke74c0d8a',RowKey='rke74c0d8a') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -107,7 +106,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json;odata=minimalmetadata Accept-Encoding: - gzip, deflate Connection: @@ -117,17 +116,17 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:58 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE - uri: https://storagename.table.core.windows.net/uttablee74c0d8a(PartitionKey='pke74c0d8a',RowKey='rke74c0d8a')?se=2020-07-30T15%3A25%3A09Z&sp=d&sv=2019-07-07&tn=uttablee74c0d8a&sig=yWEPg2BaMpgc%2FTwPzDc4OZ7X5Fz3RXfBqmRoDk9Ua6w%3D + uri: https://storagename.table.core.windows.net/uttablee74c0d8a(PartitionKey='pke74c0d8a',RowKey='rke74c0d8a')?se=2020-09-02T22%3A28%3A58Z&sp=d&sv=2019-02-02&tn=uttablee74c0d8a&sig=DV3h45jd0RxcY%2F4fx7z998ya7ErOhl8HaJBABoYQ30M%3D response: body: string: '' @@ -137,13 +136,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -159,26 +158,26 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablee74c0d8a(PartitionKey='pke74c0d8a',RowKey='rke74c0d8a') response: body: string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:cdb8df15-4002-004e-4a7d-666c1c000000\nTime:2020-07-30T14:25:08.6067193Z"}}}' + specified resource does not exist.\nRequestId:5e3d9153-f002-002b-3370-81daaf000000\nTime:2020-09-02T21:28:59.7994204Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -186,7 +185,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 404 message: Not Found @@ -194,7 +193,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -202,13 +201,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee74c0d8a') response: @@ -220,13 +219,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:58 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_query.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_query.yaml index b30f1b3d21daa..78fa3bc3f6689 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_query.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_query.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:59 GMT location: - https://storagename.table.core.windows.net/Tables('uttableda4d0d4d') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkda4d0d4d", "RowKey": "rkda4d0d4d", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkda4d0d4d", "RowKey": "rkda4d0d4d", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttableda4d0d4d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableda4d0d4d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A09.1350748Z''\"","PartitionKey":"pkda4d0d4d","RowKey":"rkda4d0d4d","Timestamp":"2020-07-30T14:25:09.1350748Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableda4d0d4d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A00.0187783Z''\"","PartitionKey":"pkda4d0d4d","RowKey":"rkda4d0d4d","Timestamp":"2020-09-02T21:29:00.0187783Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:59 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A09.1350748Z'" + - W/"datetime'2020-09-02T21%3A29%3A00.0187783Z'" location: - https://storagename.table.core.windows.net/uttableda4d0d4d(PartitionKey='pkda4d0d4d',RowKey='rkda4d0d4d') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,25 +114,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/uttableda4d0d4d()?st=2020-07-30T14%3A24%3A10Z&se=2020-07-30T15%3A25%3A10Z&sp=r&sv=2019-07-07&tn=uttableda4d0d4d&sig=bQ%2B%2B8KMyjEm7PxTOx86odItfh9AXPrCfS%2FmgY6r617o%3D + uri: https://storagename.table.core.windows.net/uttableda4d0d4d()?st=2020-09-02T21%3A27%3A59Z&se=2020-09-02T22%3A28%3A59Z&sp=r&sv=2019-02-02&tn=uttableda4d0d4d&sig=mkM8%2BLcR3FsgStfBRgGzHmhm4LMgGu4%2FwWP5ww9Srd4%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableda4d0d4d","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A09.1350748Z''\"","PartitionKey":"pkda4d0d4d","RowKey":"rkda4d0d4d","Timestamp":"2020-07-30T14:25:09.1350748Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableda4d0d4d","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A00.0187783Z''\"","PartitionKey":"pkda4d0d4d","RowKey":"rkda4d0d4d","Timestamp":"2020-09-02T21:29:00.0187783Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:59 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -141,7 +140,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -149,7 +148,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -157,13 +156,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttableda4d0d4d') response: @@ -175,13 +174,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:08 GMT + - Wed, 02 Sep 2020 21:28:59 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_signed_identifier.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_signed_identifier.yaml index f8ed3b5f44894..32e7388c655f7 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_signed_identifier.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_signed_identifier.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT location: - https://storagename.table.core.windows.net/Tables('uttable979d1213') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk979d1213", "RowKey": "rk979d1213", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk979d1213", "RowKey": "rk979d1213", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable979d1213 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable979d1213/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A10.0244191Z''\"","PartitionKey":"pk979d1213","RowKey":"rk979d1213","Timestamp":"2020-07-30T14:25:10.0244191Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable979d1213/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A00.3679712Z''\"","PartitionKey":"pk979d1213","RowKey":"rk979d1213","Timestamp":"2020-09-02T21:29:00.3679712Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A10.0244191Z'" + - W/"datetime'2020-09-02T21%3A29%3A00.3679712Z'" location: - https://storagename.table.core.windows.net/uttable979d1213(PartitionKey='pk979d1213',RowKey='rk979d1213') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -119,13 +118,13 @@ interactions: Content-Type: - application/xml Date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttable979d1213?comp=acl response: @@ -135,11 +134,11 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:28:59 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -155,25 +154,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/uttable979d1213()?sv=2019-07-07&si=testid&tn=uttable979d1213&sig=s6voo8dUkMGlXXy3%2FS%2BbgXhkjKFiLpJ%2B%2Fq2QspO6%2BHM%3D + uri: https://storagename.table.core.windows.net/uttable979d1213()?sv=2019-02-02&si=testid&tn=uttable979d1213&sig=N3HSi84FMEDV58rDuR26Zlaq1H%2F8hZcAgJy9FhM6jTQ%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable979d1213","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A10.0244191Z''\"","PartitionKey":"pk979d1213","RowKey":"rk979d1213","Timestamp":"2020-07-30T14:25:10.0244191Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable979d1213","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A00.3679712Z''\"","PartitionKey":"pk979d1213","RowKey":"rk979d1213","Timestamp":"2020-09-02T21:29:00.3679712Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:29:00 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -181,7 +180,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -189,7 +188,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -197,13 +196,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:28:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:28:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable979d1213') response: @@ -215,13 +214,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:28:59 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_update.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_update.yaml index e8914f67f1cf0..23c70f3f64b4e 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_update.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_update.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:09 GMT + - Wed, 02 Sep 2020 21:29:00 GMT location: - https://storagename.table.core.windows.net/Tables('uttablee7bd0d9a') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pke7bd0d9a", "RowKey": "rke7bd0d9a", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pke7bd0d9a", "RowKey": "rke7bd0d9a", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablee7bd0d9a response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7bd0d9a/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A11.0242053Z''\"","PartitionKey":"pke7bd0d9a","RowKey":"rke7bd0d9a","Timestamp":"2020-07-30T14:25:11.0242053Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7bd0d9a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A00.8229758Z''\"","PartitionKey":"pke7bd0d9a","RowKey":"rke7bd0d9a","Timestamp":"2020-09-02T21:29:00.8229758Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:29:00 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A11.0242053Z'" + - W/"datetime'2020-09-02T21%3A29%3A00.8229758Z'" location: - https://storagename.table.core.windows.net/uttablee7bd0d9a(PartitionKey='pke7bd0d9a',RowKey='rke7bd0d9a') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,17 +120,17 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT - uri: https://storagename.table.core.windows.net/uttablee7bd0d9a(PartitionKey='pke7bd0d9a',RowKey='rke7bd0d9a')?se=2020-07-30T15%3A25%3A12Z&sp=u&sv=2019-07-07&tn=uttablee7bd0d9a&sig=Pu2Z4pva64F7RmLbcF3imXIGa16lfySNc%2Fgg7h2Kfxk%3D + uri: https://storagename.table.core.windows.net/uttablee7bd0d9a(PartitionKey='pke7bd0d9a',RowKey='rke7bd0d9a')?se=2020-09-02T22%3A29%3A00Z&sp=u&sv=2019-02-02&tn=uttablee7bd0d9a&sig=pI0uLBSJ7vYq0zf0XoDxeAQCJmRHFSN5qlmvLSp%2Fpdw%3D response: body: string: '' @@ -141,15 +140,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:29:00 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A11.3945698Z'" + - W/"datetime'2020-09-02T21%3A29%3A00.9844321Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -165,27 +164,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablee7bd0d9a(PartitionKey='pke7bd0d9a',RowKey='rke7bd0d9a') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7bd0d9a/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A11.3945698Z''\"","PartitionKey":"pke7bd0d9a","RowKey":"rke7bd0d9a","Timestamp":"2020-07-30T14:25:11.3945698Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7bd0d9a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A00.9844321Z''\"","PartitionKey":"pke7bd0d9a","RowKey":"rke7bd0d9a","Timestamp":"2020-09-02T21:29:00.9844321Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:29:00 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A11.3945698Z'" + - W/"datetime'2020-09-02T21%3A29%3A00.9844321Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -193,7 +192,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -201,7 +200,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -209,13 +208,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee7bd0d9a') response: @@ -227,13 +226,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:10 GMT + - Wed, 02 Sep 2020 21:29:00 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_upper_case_table_name.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_upper_case_table_name.yaml index 0b3676aac1719..43ac14fd6f322 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_upper_case_table_name.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_sas_upper_case_table_name.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:29:00 GMT location: - https://storagename.table.core.windows.net/Tables('uttablee48713a5') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pke48713a5", "RowKey": "rke48713a5", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pke48713a5", "RowKey": "rke48713a5", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablee48713a5 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee48713a5/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A12.0637078Z''\"","PartitionKey":"pke48713a5","RowKey":"rke48713a5","Timestamp":"2020-07-30T14:25:12.0637078Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee48713a5/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A01.2491361Z''\"","PartitionKey":"pke48713a5","RowKey":"rke48713a5","Timestamp":"2020-09-02T21:29:01.2491361Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:11 GMT + - Wed, 02 Sep 2020 21:29:00 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A12.0637078Z'" + - W/"datetime'2020-09-02T21%3A29%3A01.2491361Z'" location: - https://storagename.table.core.windows.net/uttablee48713a5(PartitionKey='pke48713a5',RowKey='rke48713a5') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,25 +114,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/uttablee48713a5()?st=2020-07-30T14%3A24%3A13Z&se=2020-07-30T15%3A25%3A13Z&sp=r&sv=2019-07-07&tn=UTTABLEE48713A5&sig=c55VGZIwHLTfBkqqVOl8pyJj%2BlAOJfxp3O5Znm4typg%3D + uri: https://storagename.table.core.windows.net/uttablee48713a5()?st=2020-09-02T21%3A28%3A00Z&se=2020-09-02T22%3A29%3A00Z&sp=r&sv=2019-02-02&tn=UTTABLEE48713A5&sig=t0T9jgqfqIlFZtpNa2tXF2Tm0kz4uQRDSQkYdPOpRSY%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee48713a5","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A12.0637078Z''\"","PartitionKey":"pke48713a5","RowKey":"rke48713a5","Timestamp":"2020-07-30T14:25:12.0637078Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee48713a5","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A01.2491361Z''\"","PartitionKey":"pke48713a5","RowKey":"rke48713a5","Timestamp":"2020-09-02T21:29:01.2491361Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -141,7 +140,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -149,7 +148,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -157,13 +156,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee48713a5') response: @@ -175,13 +174,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_unicode_property_name.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_unicode_property_name.yaml index 44416b07b555e..1b40e695ecb9b 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_unicode_property_name.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_unicode_property_name.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:00 GMT location: - https://storagename.table.core.windows.net/Tables('uttable9990123c') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -64,27 +64,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:00 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable9990123c response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable9990123c/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A12.9807488Z''\"","PartitionKey":"pk9990123c","RowKey":"rk9990123c","Timestamp":"2020-07-30T14:25:12.9807488Z","\u554a\u9f44\u4e02\u72db\u72dc":"\ua015"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable9990123c/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A01.6266787Z''\"","PartitionKey":"pk9990123c","RowKey":"rk9990123c","Timestamp":"2020-09-02T21:29:01.6266787Z","\u554a\u9f44\u4e02\u72db\u72dc":"\ua015"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:01 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A12.9807488Z'" + - W/"datetime'2020-09-02T21%3A29%3A01.6266787Z'" location: - https://storagename.table.core.windows.net/uttable9990123c(PartitionKey='pk9990123c',RowKey='rk9990123c') server: @@ -94,7 +94,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -115,27 +115,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable9990123c response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable9990123c/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A13.0678085Z''\"","PartitionKey":"pk9990123c","RowKey":"test2","Timestamp":"2020-07-30T14:25:13.0678085Z","\u554a\u9f44\u4e02\u72db\u72dc":"hello"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable9990123c/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A01.6617043Z''\"","PartitionKey":"pk9990123c","RowKey":"test2","Timestamp":"2020-09-02T21:29:01.6617043Z","\u554a\u9f44\u4e02\u72db\u72dc":"hello"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:01 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A13.0678085Z'" + - W/"datetime'2020-09-02T21%3A29%3A01.6617043Z'" location: - https://storagename.table.core.windows.net/uttable9990123c(PartitionKey='pk9990123c',RowKey='test2') server: @@ -145,7 +145,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -161,25 +161,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable9990123c() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable9990123c","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A12.9807488Z''\"","PartitionKey":"pk9990123c","RowKey":"rk9990123c","Timestamp":"2020-07-30T14:25:12.9807488Z","\u554a\u9f44\u4e02\u72db\u72dc":"\ua015"},{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A13.0678085Z''\"","PartitionKey":"pk9990123c","RowKey":"test2","Timestamp":"2020-07-30T14:25:13.0678085Z","\u554a\u9f44\u4e02\u72db\u72dc":"hello"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable9990123c","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A01.6266787Z''\"","PartitionKey":"pk9990123c","RowKey":"rk9990123c","Timestamp":"2020-09-02T21:29:01.6266787Z","\u554a\u9f44\u4e02\u72db\u72dc":"\ua015"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A01.6617043Z''\"","PartitionKey":"pk9990123c","RowKey":"test2","Timestamp":"2020-09-02T21:29:01.6617043Z","\u554a\u9f44\u4e02\u72db\u72dc":"hello"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:01 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -187,7 +187,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -195,7 +195,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -203,13 +203,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable9990123c') response: @@ -221,13 +221,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:01 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_unicode_property_value.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_unicode_property_value.yaml index 77aaaf12be360..b54f7cd035ef3 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_unicode_property_value.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_unicode_property_value.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:12 GMT + - Wed, 02 Sep 2020 21:29:01 GMT location: - https://storagename.table.core.windows.net/Tables('uttableac7612b8') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -63,27 +63,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttableac7612b8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableac7612b8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A13.7006244Z''\"","PartitionKey":"pkac7612b8","RowKey":"rkac7612b8","Timestamp":"2020-07-30T14:25:13.7006244Z","Description":"\ua015"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableac7612b8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A01.9812535Z''\"","PartitionKey":"pkac7612b8","RowKey":"rkac7612b8","Timestamp":"2020-09-02T21:29:01.9812535Z","Description":"\ua015"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:01 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A13.7006244Z'" + - W/"datetime'2020-09-02T21%3A29%3A01.9812535Z'" location: - https://storagename.table.core.windows.net/uttableac7612b8(PartitionKey='pkac7612b8',RowKey='rkac7612b8') server: @@ -93,7 +93,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -113,27 +113,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttableac7612b8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableac7612b8/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A13.7896884Z''\"","PartitionKey":"pkac7612b8","RowKey":"test2","Timestamp":"2020-07-30T14:25:13.7896884Z","Description":"\ua015"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableac7612b8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A02.0182812Z''\"","PartitionKey":"pkac7612b8","RowKey":"test2","Timestamp":"2020-09-02T21:29:02.0182812Z","Description":"\ua015"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:01 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A13.7896884Z'" + - W/"datetime'2020-09-02T21%3A29%3A02.0182812Z'" location: - https://storagename.table.core.windows.net/uttableac7612b8(PartitionKey='pkac7612b8',RowKey='test2') server: @@ -143,7 +143,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -159,25 +159,25 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttableac7612b8() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableac7612b8","value":[{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A13.7006244Z''\"","PartitionKey":"pkac7612b8","RowKey":"rkac7612b8","Timestamp":"2020-07-30T14:25:13.7006244Z","Description":"\ua015"},{"odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A13.7896884Z''\"","PartitionKey":"pkac7612b8","RowKey":"test2","Timestamp":"2020-07-30T14:25:13.7896884Z","Description":"\ua015"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableac7612b8","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A01.9812535Z''\"","PartitionKey":"pkac7612b8","RowKey":"rkac7612b8","Timestamp":"2020-09-02T21:29:01.9812535Z","Description":"\ua015"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A02.0182812Z''\"","PartitionKey":"pkac7612b8","RowKey":"test2","Timestamp":"2020-09-02T21:29:02.0182812Z","Description":"\ua015"}]}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:01 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -185,7 +185,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -193,7 +193,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -201,13 +201,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttableac7612b8') response: @@ -219,13 +219,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:02 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity.yaml index 6707b72ce8175..1ba3374d1d4c7 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:02 GMT location: - https://storagename.table.core.windows.net/Tables('uttable13250ef0') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk13250ef0", "RowKey": "rk13250ef0", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk13250ef0", "RowKey": "rk13250ef0", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable13250ef0 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable13250ef0/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A14.4293512Z''\"","PartitionKey":"pk13250ef0","RowKey":"rk13250ef0","Timestamp":"2020-07-30T14:25:14.4293512Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable13250ef0/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A02.2885428Z''\"","PartitionKey":"pk13250ef0","RowKey":"rk13250ef0","Timestamp":"2020-09-02T21:29:02.2885428Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:02 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A14.4293512Z'" + - W/"datetime'2020-09-02T21%3A29%3A02.2885428Z'" location: - https://storagename.table.core.windows.net/uttable13250ef0(PartitionKey='pk13250ef0',RowKey='rk13250ef0') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,15 +120,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttable13250ef0(PartitionKey='pk13250ef0',RowKey='rk13250ef0') response: @@ -141,15 +140,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:02 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A14.5137747Z'" + - W/"datetime'2020-09-02T21%3A29%3A02.3383508Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -165,27 +164,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable13250ef0(PartitionKey='pk13250ef0',RowKey='rk13250ef0') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable13250ef0/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A14.5137747Z''\"","PartitionKey":"pk13250ef0","RowKey":"rk13250ef0","Timestamp":"2020-07-30T14:25:14.5137747Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable13250ef0/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A02.3383508Z''\"","PartitionKey":"pk13250ef0","RowKey":"rk13250ef0","Timestamp":"2020-09-02T21:29:02.3383508Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:02 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A14.5137747Z'" + - W/"datetime'2020-09-02T21%3A29%3A02.3383508Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -193,7 +192,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -201,7 +200,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -209,13 +208,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable13250ef0') response: @@ -227,13 +226,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:13 GMT + - Wed, 02 Sep 2020 21:29:02 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_not_existing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_not_existing.yaml index d20af7e259fd5..96dca0206e7a5 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_not_existing.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_not_existing.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:01 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:02 GMT location: - https://storagename.table.core.windows.net/Tables('uttablefb67146a') server: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -53,7 +53,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -65,32 +65,28 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttablefb67146a(PartitionKey='pkfb67146a',RowKey='rkfb67146a') response: body: - string: 'ResourceNotFoundThe specified resource does not exist. - - RequestId:dfb6a408-a002-0029-6c7d-66dfbb000000 - - Time:2020-07-30T14:25:15.2185782Z' + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:fb5482fd-4002-0063-6770-81c798000000\nTime:2020-09-02T21:29:02.7166253Z"}}}' headers: cache-control: - no-cache content-type: - - application/xml;charset=utf-8 + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:02 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -98,7 +94,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 404 message: Not Found @@ -106,7 +102,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -114,13 +110,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablefb67146a') response: @@ -132,13 +128,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:14 GMT + - Wed, 02 Sep 2020 21:29:02 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_with_if_doesnt_match.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_with_if_doesnt_match.yaml index cd52d96f8b89d..d25f80793995d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_with_if_doesnt_match.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_with_if_doesnt_match.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT location: - https://storagename.table.core.windows.net/Tables('uttableabcb1791') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pkabcb1791", "RowKey": "rkabcb1791", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkabcb1791", "RowKey": "rkabcb1791", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttableabcb1791 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableabcb1791/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A15.8403997Z''\"","PartitionKey":"pkabcb1791","RowKey":"rkabcb1791","Timestamp":"2020-07-30T14:25:15.8403997Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableabcb1791/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A02.9599295Z''\"","PartitionKey":"pkabcb1791","RowKey":"rkabcb1791","Timestamp":"2020-09-02T21:29:02.9599295Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A15.8403997Z'" + - W/"datetime'2020-09-02T21%3A29%3A02.9599295Z'" location: - https://storagename.table.core.windows.net/uttableabcb1791(PartitionKey='pkabcb1791',RowKey='rkabcb1791') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,32 +120,28 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT If-Match: - W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttableabcb1791(PartitionKey='pkabcb1791',RowKey='rkabcb1791') response: body: - string: 'UpdateConditionNotSatisfiedThe update condition specified in the request was not satisfied. - - RequestId:7e044957-8002-003e-677d-661fd8000000 - - Time:2020-07-30T14:25:15.9364680Z' + string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The + update condition specified in the request was not satisfied.\nRequestId:bbafd2f1-8002-001e-6770-81b6bb000000\nTime:2020-09-02T21:29:03.0029603Z"}}}' headers: cache-control: - no-cache content-type: - - application/xml;charset=utf-8 + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -154,7 +149,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 412 message: Precondition Failed @@ -162,7 +157,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -170,13 +165,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:16 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttableabcb1791') response: @@ -188,13 +183,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_with_if_matches.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_with_if_matches.yaml index 8fcdd010badac..8cb82694603db 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_with_if_matches.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity.test_update_entity_with_if_matches.yaml @@ -15,13 +15,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT location: - https://storagename.table.core.windows.net/Tables('uttable39e2157d') server: @@ -43,18 +43,17 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created - request: - body: '{"PartitionKey": "pk39e2157d", "RowKey": "rk39e2157d", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk39e2157d", "RowKey": "rk39e2157d", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata @@ -63,33 +62,33 @@ interactions: Connection: - keep-alive Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable39e2157d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable39e2157d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A16.4963252Z''\"","PartitionKey":"pk39e2157d","RowKey":"rk39e2157d","Timestamp":"2020-07-30T14:25:16.4963252Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable39e2157d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A03.2503266Z''\"","PartitionKey":"pk39e2157d","RowKey":"rk39e2157d","Timestamp":"2020-09-02T21:29:03.2503266Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A16.4963252Z'" + - W/"datetime'2020-09-02T21%3A29%3A03.2503266Z'" location: - https://storagename.table.core.windows.net/uttable39e2157d(PartitionKey='pk39e2157d',RowKey='rk39e2157d') server: @@ -99,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 201 message: Created @@ -109,7 +108,7 @@ interactions: "Edm.DateTime"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -121,15 +120,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT If-Match: - - W/"datetime'2020-07-30T14%3A25%3A16.4963252Z'" + - W/"datetime'2020-09-02T21%3A29%3A03.2503266Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttable39e2157d(PartitionKey='pk39e2157d',RowKey='rk39e2157d') response: @@ -141,15 +140,15 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A16.5932449Z'" + - W/"datetime'2020-09-02T21%3A29%3A03.3010041Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content @@ -165,27 +164,27 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable39e2157d(PartitionKey='pk39e2157d',RowKey='rk39e2157d') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable39e2157d/@Element","odata.etag":"W/\"datetime''2020-07-30T14%3A25%3A16.5932449Z''\"","PartitionKey":"pk39e2157d","RowKey":"rk39e2157d","Timestamp":"2020-07-30T14:25:16.5932449Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable39e2157d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A29%3A03.3010041Z''\"","PartitionKey":"pk39e2157d","RowKey":"rk39e2157d","Timestamp":"2020-09-02T21:29:03.3010041Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT etag: - - W/"datetime'2020-07-30T14%3A25%3A16.5932449Z'" + - W/"datetime'2020-09-02T21%3A29%3A03.3010041Z'" server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -193,7 +192,7 @@ interactions: x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK @@ -201,7 +200,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -209,13 +208,13 @@ interactions: Content-Length: - '0' Date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 14:25:17 GMT + - Wed, 02 Sep 2020 21:29:02 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable39e2157d') response: @@ -227,13 +226,13 @@ interactions: content-length: - '0' date: - - Thu, 30 Jul 2020 14:25:15 GMT + - Wed, 02 Sep 2020 21:29:02 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: - nosniff x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 204 message: No Content diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_binary_property_value.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_binary_property_value.yaml index a904f4e50dc30..00a089ff69b80 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_binary_property_value.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_binary_property_value.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:08 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:08 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:07 GMT + date: Wed, 02 Sep 2020 21:17:15 GMT location: https://storagename.table.core.windows.net/Tables('uttable10a914d3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk10a914d3", "RowKey": "rk10a914d3", "binary": "AQIDBAUGBwgJCg==", "binary@odata.type": "Edm.Binary"}' @@ -49,32 +49,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:08 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:08 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable10a914d3 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable10a914d3/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A07.5921964Z''\"","PartitionKey":"pk10a914d3","RowKey":"rk10a914d3","Timestamp":"2020-07-30T13:33:07.5921964Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable10a914d3/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A16.8874141Z''\"","PartitionKey":"pk10a914d3","RowKey":"rk10a914d3","Timestamp":"2020-09-02T21:17:16.8874141Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:07 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A07.5921964Z'" + date: Wed, 02 Sep 2020 21:17:15 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A16.8874141Z'" location: https://storagename.table.core.windows.net/uttable10a914d3(PartitionKey='pk10a914d3',RowKey='rk10a914d3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable10a914d3 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable10a914d3 - request: body: null headers: @@ -83,42 +83,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:08 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:08 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable10a914d3(PartitionKey='pk10a914d3',RowKey='rk10a914d3') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable10a914d3/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A07.5921964Z''\"","PartitionKey":"pk10a914d3","RowKey":"rk10a914d3","Timestamp":"2020-07-30T13:33:07.5921964Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable10a914d3/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A16.8874141Z''\"","PartitionKey":"pk10a914d3","RowKey":"rk10a914d3","Timestamp":"2020-09-02T21:17:16.8874141Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:07 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A07.5921964Z'" + date: Wed, 02 Sep 2020 21:17:15 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A16.8874141Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable10a914d3(PartitionKey='pk10a914d3',RowKey='rk10a914d3') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable10a914d3(PartitionKey='pk10a914d3',RowKey='rk10a914d3') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable10a914d3') response: @@ -127,12 +129,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:07 GMT + date: Wed, 02 Sep 2020 21:17:15 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable10a914d3') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable10a914d3') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity.yaml index 723ce487482f9..e51a6cd531b90 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,75 +26,76 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:08 GMT + date: Wed, 02 Sep 2020 21:17:16 GMT location: https://storagename.table.core.windows.net/Tables('uttable74f8115d') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk74f8115d", "RowKey": "rk74f8115d", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk74f8115d", "RowKey": "rk74f8115d", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable74f8115d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable74f8115d/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A08.4768117Z''\"","PartitionKey":"pk74f8115d","RowKey":"rk74f8115d","Timestamp":"2020-07-30T13:33:08.4768117Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable74f8115d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A17.1215459Z''\"","PartitionKey":"pk74f8115d","RowKey":"rk74f8115d","Timestamp":"2020-09-02T21:17:17.1215459Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:08 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A08.4768117Z'" + date: Wed, 02 Sep 2020 21:17:16 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A17.1215459Z'" location: https://storagename.table.core.windows.net/uttable74f8115d(PartitionKey='pk74f8115d',RowKey='rk74f8115d') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable74f8115d + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable74f8115d - request: body: null headers: + Accept: + - application/json;odata=minimalmetadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttable74f8115d(PartitionKey='pk74f8115d',RowKey='rk74f8115d') response: @@ -103,14 +104,14 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:08 GMT + date: Wed, 02 Sep 2020 21:17:16 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable74f8115d(PartitionKey='pk74f8115d',RowKey='rk74f8115d') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable74f8115d(PartitionKey='pk74f8115d',RowKey='rk74f8115d') - request: body: null headers: @@ -119,42 +120,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable74f8115d(PartitionKey='pk74f8115d',RowKey='rk74f8115d') response: body: string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:60a46c4d-d002-0020-1175-6666c6000000\nTime:2020-07-30T13:33:08.6499351Z"}}}' + specified resource does not exist.\nRequestId:4f0fcb48-5002-0009-356e-81c4ef000000\nTime:2020-09-02T21:17:17.1975986Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:08 GMT + date: Wed, 02 Sep 2020 21:17:16 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 404 message: Not Found - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable74f8115d(PartitionKey='pk74f8115d',RowKey='rk74f8115d') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable74f8115d(PartitionKey='pk74f8115d',RowKey='rk74f8115d') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable74f8115d') response: @@ -163,12 +166,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:08 GMT + date: Wed, 02 Sep 2020 21:17:16 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable74f8115d') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable74f8115d') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_not_existing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_not_existing.yaml index b7653b5883db5..d0000f1688d98 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_not_existing.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_not_existing.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:09 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,64 +26,64 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:08 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT location: https://storagename.table.core.windows.net/Tables('uttable7cd216d7') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json;odata=minimalmetadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttable7cd216d7(PartitionKey='pk7cd216d7',RowKey='rk7cd216d7') response: body: - string: 'ResourceNotFoundThe specified resource does not exist. - - RequestId:c2880782-2002-001c-6b75-66d21d000000 - - Time:2020-07-30T13:33:09.1571934Z' + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:060ff35b-5002-0002-5f6e-81dc9b000000\nTime:2020-09-02T21:17:17.3994300Z"}}}' headers: cache-control: no-cache - content-type: application/xml;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:08 GMT + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:17 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 404 message: Not Found - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable7cd216d7(PartitionKey='pk7cd216d7',RowKey='rk7cd216d7') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable7cd216d7(PartitionKey='pk7cd216d7',RowKey='rk7cd216d7') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable7cd216d7') response: @@ -92,12 +92,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:08 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable7cd216d7') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable7cd216d7') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_with_if_doesnt_match.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_with_if_doesnt_match.yaml index d4d913a0c1d99..bc4333591ddf6 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_with_if_doesnt_match.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_with_if_doesnt_match.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,108 +26,107 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:09 GMT + date: Wed, 02 Sep 2020 21:17:16 GMT location: https://storagename.table.core.windows.net/Tables('uttable409e19fe') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk409e19fe", "RowKey": "rk409e19fe", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk409e19fe", "RowKey": "rk409e19fe", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable409e19fe response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable409e19fe/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A09.6372886Z''\"","PartitionKey":"pk409e19fe","RowKey":"rk409e19fe","Timestamp":"2020-07-30T13:33:09.6372886Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable409e19fe/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A17.6068322Z''\"","PartitionKey":"pk409e19fe","RowKey":"rk409e19fe","Timestamp":"2020-09-02T21:17:17.6068322Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:09 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A09.6372886Z'" + date: Wed, 02 Sep 2020 21:17:16 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A17.6068322Z'" location: https://storagename.table.core.windows.net/uttable409e19fe(PartitionKey='pk409e19fe',RowKey='rk409e19fe') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable409e19fe + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable409e19fe - request: body: null headers: + Accept: + - application/json;odata=minimalmetadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT If-Match: - W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:16 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttable409e19fe(PartitionKey='pk409e19fe',RowKey='rk409e19fe') response: body: - string: 'UpdateConditionNotSatisfiedThe update condition specified in the request was not satisfied. - - RequestId:76b253b9-0002-006d-0775-66a024000000 - - Time:2020-07-30T13:33:09.7123389Z' + string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The + update condition specified in the request was not satisfied.\nRequestId:401b1534-f002-0062-386e-8199b9000000\nTime:2020-09-02T21:17:17.6398558Z"}}}' headers: cache-control: no-cache - content-type: application/xml;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:09 GMT + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:16 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 412 message: Precondition Failed - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable409e19fe(PartitionKey='pk409e19fe',RowKey='rk409e19fe') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable409e19fe(PartitionKey='pk409e19fe',RowKey='rk409e19fe') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable409e19fe') response: @@ -136,12 +135,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:09 GMT + date: Wed, 02 Sep 2020 21:17:16 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable409e19fe') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable409e19fe') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_with_if_matches.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_with_if_matches.yaml index 31afb48c7ea54..03fca7f0fb04f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_with_if_matches.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_delete_entity_with_if_matches.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:10 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,75 +26,76 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:09 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT location: https://storagename.table.core.windows.net/Tables('uttablec28517ea') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pkc28517ea", "RowKey": "rkc28517ea", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkc28517ea", "RowKey": "rkc28517ea", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablec28517ea response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec28517ea/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A10.2016072Z''\"","PartitionKey":"pkc28517ea","RowKey":"rkc28517ea","Timestamp":"2020-07-30T13:33:10.2016072Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec28517ea/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A17.8519281Z''\"","PartitionKey":"pkc28517ea","RowKey":"rkc28517ea","Timestamp":"2020-09-02T21:17:17.8519281Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:09 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A10.2016072Z'" + date: Wed, 02 Sep 2020 21:17:17 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A17.8519281Z'" location: https://storagename.table.core.windows.net/uttablec28517ea(PartitionKey='pkc28517ea',RowKey='rkc28517ea') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablec28517ea + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablec28517ea - request: body: null headers: + Accept: + - application/json;odata=minimalmetadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT If-Match: - - W/"datetime'2020-07-30T13%3A33%3A10.2016072Z'" + - W/"datetime'2020-09-02T21%3A17%3A17.8519281Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttablec28517ea(PartitionKey='pkc28517ea',RowKey='rkc28517ea') response: @@ -103,14 +104,14 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:09 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablec28517ea(PartitionKey='pkc28517ea',RowKey='rkc28517ea') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablec28517ea(PartitionKey='pkc28517ea',RowKey='rkc28517ea') - request: body: null headers: @@ -119,42 +120,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablec28517ea(PartitionKey='pkc28517ea',RowKey='rkc28517ea') response: body: string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:90187323-e002-0023-6275-6665c1000000\nTime:2020-07-30T13:33:10.3637214Z"}}}' + specified resource does not exist.\nRequestId:a1931673-9002-0072-7c6e-81af5f000000\nTime:2020-09-02T21:17:17.9199738Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:09 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 404 message: Not Found - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablec28517ea(PartitionKey='pkc28517ea',RowKey='rkc28517ea') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablec28517ea(PartitionKey='pkc28517ea',RowKey='rkc28517ea') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablec28517ea') response: @@ -163,12 +166,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:10 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablec28517ea') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablec28517ea') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_empty_and_spaces_property_value.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_empty_and_spaces_property_value.yaml index dee2b60660792..20fee52b7bdbe 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_empty_and_spaces_property_value.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_empty_and_spaces_property_value.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:10 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT location: https://storagename.table.core.windows.net/Tables('uttablef58f18ed') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pkf58f18ed", "RowKey": "rkf58f18ed", "EmptyByte": "", "EmptyUnicode": "", "SpacesOnlyByte": " ", "SpacesOnlyUnicode": " ", "SpacesBeforeByte": @@ -52,32 +52,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablef58f18ed response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef58f18ed/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A10.8499402Z''\"","PartitionKey":"pkf58f18ed","RowKey":"rkf58f18ed","Timestamp":"2020-07-30T13:33:10.8499402Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef58f18ed/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A18.1275077Z''\"","PartitionKey":"pkf58f18ed","RowKey":"rkf58f18ed","Timestamp":"2020-09-02T21:17:18.1275077Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:10 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A10.8499402Z'" + date: Wed, 02 Sep 2020 21:17:18 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A18.1275077Z'" location: https://storagename.table.core.windows.net/uttablef58f18ed(PartitionKey='pkf58f18ed',RowKey='rkf58f18ed') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablef58f18ed + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablef58f18ed - request: body: null headers: @@ -86,42 +86,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablef58f18ed(PartitionKey='pkf58f18ed',RowKey='rkf58f18ed') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef58f18ed/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A10.8499402Z''\"","PartitionKey":"pkf58f18ed","RowKey":"rkf58f18ed","Timestamp":"2020-07-30T13:33:10.8499402Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef58f18ed/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A18.1275077Z''\"","PartitionKey":"pkf58f18ed","RowKey":"rkf58f18ed","Timestamp":"2020-09-02T21:17:18.1275077Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:10 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A10.8499402Z'" + date: Wed, 02 Sep 2020 21:17:18 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A18.1275077Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablef58f18ed(PartitionKey='pkf58f18ed',RowKey='rkf58f18ed') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablef58f18ed(PartitionKey='pkf58f18ed',RowKey='rkf58f18ed') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:11 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablef58f18ed') response: @@ -130,12 +132,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:10 GMT + date: Wed, 02 Sep 2020 21:17:18 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablef58f18ed') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablef58f18ed') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity.yaml index 23ff699e1ce5e..ddeaeb9156743 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT location: https://storagename.table.core.windows.net/Tables('uttable42bf102a') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk42bf102a", "RowKey": "rk42bf102a", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk42bf102a", "RowKey": "rk42bf102a", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable42bf102a response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42bf102a/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A11.4231078Z''\"","PartitionKey":"pk42bf102a","RowKey":"rk42bf102a","Timestamp":"2020-07-30T13:33:11.4231078Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42bf102a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A18.4078801Z''\"","PartitionKey":"pk42bf102a","RowKey":"rk42bf102a","Timestamp":"2020-09-02T21:17:18.4078801Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A11.4231078Z'" + date: Wed, 02 Sep 2020 21:17:17 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A18.4078801Z'" location: https://storagename.table.core.windows.net/uttable42bf102a(PartitionKey='pk42bf102a',RowKey='rk42bf102a') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42bf102a + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42bf102a - request: body: null headers: @@ -88,42 +87,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable42bf102a(PartitionKey='pk42bf102a',RowKey='rk42bf102a') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42bf102a/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A11.4231078Z''\"","PartitionKey":"pk42bf102a","RowKey":"rk42bf102a","Timestamp":"2020-07-30T13:33:11.4231078Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42bf102a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A18.4078801Z''\"","PartitionKey":"pk42bf102a","RowKey":"rk42bf102a","Timestamp":"2020-09-02T21:17:18.4078801Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A11.4231078Z'" + date: Wed, 02 Sep 2020 21:17:17 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A18.4078801Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42bf102a(PartitionKey='pk42bf102a',RowKey='rk42bf102a') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42bf102a(PartitionKey='pk42bf102a',RowKey='rk42bf102a') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable42bf102a') response: @@ -132,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:11 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable42bf102a') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable42bf102a') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_full_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_full_metadata.yaml index d559f65c235e6..2a620fa92686f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_full_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_full_metadata.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:17 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,104 +26,105 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT + date: Wed, 02 Sep 2020 21:17:18 GMT location: https://storagename.table.core.windows.net/Tables('uttable4fed15dc') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk4fed15dc", "RowKey": "rk4fed15dc", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk4fed15dc", "RowKey": "rk4fed15dc", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:12 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable4fed15dc response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable4fed15dc/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A11.996063Z''\"","PartitionKey":"pk4fed15dc","RowKey":"rk4fed15dc","Timestamp":"2020-07-30T13:33:11.996063Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable4fed15dc/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A18.6417444Z''\"","PartitionKey":"pk4fed15dc","RowKey":"rk4fed15dc","Timestamp":"2020-09-02T21:17:18.6417444Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A11.996063Z'" + date: Wed, 02 Sep 2020 21:17:18 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A18.6417444Z'" location: https://storagename.table.core.windows.net/uttable4fed15dc(PartitionKey='pk4fed15dc',RowKey='rk4fed15dc') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable4fed15dc + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable4fed15dc - request: body: null headers: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) accept: - application/json;odata=fullmetadata x-ms-date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable4fed15dc(PartitionKey='pk4fed15dc',RowKey='rk4fed15dc') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable4fed15dc/@Element","odata.type":"storagename.uttable4fed15dc","odata.id":"https://storagename.table.core.windows.net/uttable4fed15dc(PartitionKey=''pk4fed15dc'',RowKey=''rk4fed15dc'')","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A11.996063Z''\"","odata.editLink":"uttable4fed15dc(PartitionKey=''pk4fed15dc'',RowKey=''rk4fed15dc'')","PartitionKey":"pk4fed15dc","RowKey":"rk4fed15dc","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-07-30T13:33:11.996063Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable4fed15dc/@Element","odata.type":"storagename.uttable4fed15dc","odata.id":"https://storagename.table.core.windows.net/uttable4fed15dc(PartitionKey=''pk4fed15dc'',RowKey=''rk4fed15dc'')","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A18.6417444Z''\"","odata.editLink":"uttable4fed15dc(PartitionKey=''pk4fed15dc'',RowKey=''rk4fed15dc'')","PartitionKey":"pk4fed15dc","RowKey":"rk4fed15dc","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:17:18.6417444Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=fullmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A11.996063Z'" + date: Wed, 02 Sep 2020 21:17:18 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A18.6417444Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable4fed15dc(PartitionKey='pk4fed15dc',RowKey='rk4fed15dc') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable4fed15dc(PartitionKey='pk4fed15dc',RowKey='rk4fed15dc') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable4fed15dc') response: @@ -132,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:11 GMT + date: Wed, 02 Sep 2020 21:17:18 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable4fed15dc') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable4fed15dc') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_if_match.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_if_match.yaml index 1c6e7e62b85b7..f8786cbebfe2f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_if_match.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_if_match.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT location: https://storagename.table.core.windows.net/Tables('uttablee60b13c4') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pke60b13c4", "RowKey": "rke60b13c4", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pke60b13c4", "RowKey": "rke60b13c4", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablee60b13c4 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee60b13c4/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A12.5681839Z''\"","PartitionKey":"pke60b13c4","RowKey":"rke60b13c4","Timestamp":"2020-07-30T13:33:12.5681839Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee60b13c4/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A18.9022353Z''\"","PartitionKey":"pke60b13c4","RowKey":"rke60b13c4","Timestamp":"2020-09-02T21:17:18.9022353Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A12.5681839Z'" + date: Wed, 02 Sep 2020 21:17:17 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A18.9022353Z'" location: https://storagename.table.core.windows.net/uttablee60b13c4(PartitionKey='pke60b13c4',RowKey='rke60b13c4') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablee60b13c4 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablee60b13c4 - request: body: null headers: @@ -88,46 +87,48 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablee60b13c4(PartitionKey='pke60b13c4',RowKey='rke60b13c4') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee60b13c4/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A12.5681839Z''\"","PartitionKey":"pke60b13c4","RowKey":"rke60b13c4","Timestamp":"2020-07-30T13:33:12.5681839Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee60b13c4/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A18.9022353Z''\"","PartitionKey":"pke60b13c4","RowKey":"rke60b13c4","Timestamp":"2020-09-02T21:17:18.9022353Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:11 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A12.5681839Z'" + date: Wed, 02 Sep 2020 21:17:17 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A18.9022353Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablee60b13c4(PartitionKey='pke60b13c4',RowKey='rke60b13c4') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablee60b13c4(PartitionKey='pke60b13c4',RowKey='rke60b13c4') - request: body: null headers: + Accept: + - application/json;odata=minimalmetadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT If-Match: - - W/"datetime'2020-07-30T13%3A33%3A12.5681839Z'" + - W/"datetime'2020-09-02T21%3A17%3A18.9022353Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/uttablee60b13c4(PartitionKey='pke60b13c4',RowKey='rke60b13c4') response: @@ -136,25 +137,27 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:11 GMT + date: Wed, 02 Sep 2020 21:17:17 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablee60b13c4(PartitionKey='pke60b13c4',RowKey='rke60b13c4') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablee60b13c4(PartitionKey='pke60b13c4',RowKey='rke60b13c4') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee60b13c4') response: @@ -163,12 +166,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:11 GMT + date: Wed, 02 Sep 2020 21:17:18 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablee60b13c4') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablee60b13c4') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_no_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_no_metadata.yaml index 00b4d7e7ee0b6..821742f78a280 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_no_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_no_metadata.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:13 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,104 +26,105 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:12 GMT + date: Wed, 02 Sep 2020 21:17:18 GMT location: https://storagename.table.core.windows.net/Tables('uttable24651506') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk24651506", "RowKey": "rk24651506", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk24651506", "RowKey": "rk24651506", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable24651506 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable24651506/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A13.2354777Z''\"","PartitionKey":"pk24651506","RowKey":"rk24651506","Timestamp":"2020-07-30T13:33:13.2354777Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable24651506/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A19.2095682Z''\"","PartitionKey":"pk24651506","RowKey":"rk24651506","Timestamp":"2020-09-02T21:17:19.2095682Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:12 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A13.2354777Z'" + date: Wed, 02 Sep 2020 21:17:18 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A19.2095682Z'" location: https://storagename.table.core.windows.net/uttable24651506(PartitionKey='pk24651506',RowKey='rk24651506') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable24651506 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable24651506 - request: body: null headers: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) accept: - application/json;odata=nometadata x-ms-date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable24651506(PartitionKey='pk24651506',RowKey='rk24651506') response: body: - string: '{"PartitionKey":"pk24651506","RowKey":"rk24651506","Timestamp":"2020-07-30T13:33:13.2354777Z","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"PartitionKey":"pk24651506","RowKey":"rk24651506","Timestamp":"2020-09-02T21:17:19.2095682Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=nometadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:12 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A13.2354777Z'" + date: Wed, 02 Sep 2020 21:17:18 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A19.2095682Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable24651506(PartitionKey='pk24651506',RowKey='rk24651506') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable24651506(PartitionKey='pk24651506',RowKey='rk24651506') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable24651506') response: @@ -132,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:12 GMT + date: Wed, 02 Sep 2020 21:17:18 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable24651506') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable24651506') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_not_existing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_not_existing.yaml index 562d270636fff..fcf26d14f331a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_not_existing.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_not_existing.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:12 GMT + date: Wed, 02 Sep 2020 21:17:18 GMT location: https://storagename.table.core.windows.net/Tables('uttable3b0215a4') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: null headers: @@ -44,42 +44,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable3b0215a4(PartitionKey='pk3b0215a4',RowKey='rk3b0215a4') response: body: string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:a97c0a5d-b002-0030-6775-665020000000\nTime:2020-07-30T13:33:13.8058709Z"}}}' + specified resource does not exist.\nRequestId:1e722a24-2002-002f-206e-815f5b000000\nTime:2020-09-02T21:17:19.4586282Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:13 GMT + date: Wed, 02 Sep 2020 21:17:18 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 404 message: Not Found - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable3b0215a4(PartitionKey='pk3b0215a4',RowKey='rk3b0215a4') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable3b0215a4(PartitionKey='pk3b0215a4',RowKey='rk3b0215a4') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3b0215a4') response: @@ -88,12 +90,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:13 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable3b0215a4') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable3b0215a4') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_with_hook.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_with_hook.yaml index 064b00c78381e..a12f4b77bd0e1 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_with_hook.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_with_hook.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:14 GMT + - Wed, 02 Sep 2020 21:17:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:13 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT location: https://storagename.table.core.windows.net/Tables('uttablefb3d1455') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pkfb3d1455", "RowKey": "rkfb3d1455", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkfb3d1455", "RowKey": "rkfb3d1455", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablefb3d1455 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefb3d1455/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A14.2838561Z''\"","PartitionKey":"pkfb3d1455","RowKey":"rkfb3d1455","Timestamp":"2020-07-30T13:33:14.2838561Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefb3d1455/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A19.6743096Z''\"","PartitionKey":"pkfb3d1455","RowKey":"rkfb3d1455","Timestamp":"2020-09-02T21:17:19.6743096Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:13 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A14.2838561Z'" + date: Wed, 02 Sep 2020 21:17:19 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A19.6743096Z'" location: https://storagename.table.core.windows.net/uttablefb3d1455(PartitionKey='pkfb3d1455',RowKey='rkfb3d1455') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablefb3d1455 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablefb3d1455 - request: body: null headers: @@ -88,42 +87,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablefb3d1455(PartitionKey='pkfb3d1455',RowKey='rkfb3d1455') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefb3d1455/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A14.2838561Z''\"","PartitionKey":"pkfb3d1455","RowKey":"rkfb3d1455","Timestamp":"2020-07-30T13:33:14.2838561Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefb3d1455/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A19.6743096Z''\"","PartitionKey":"pkfb3d1455","RowKey":"rkfb3d1455","Timestamp":"2020-09-02T21:17:19.6743096Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:13 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A14.2838561Z'" + date: Wed, 02 Sep 2020 21:17:19 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A19.6743096Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablefb3d1455(PartitionKey='pkfb3d1455',RowKey='rkfb3d1455') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablefb3d1455(PartitionKey='pkfb3d1455',RowKey='rkfb3d1455') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablefb3d1455') response: @@ -132,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:13 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablefb3d1455') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablefb3d1455') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_with_special_doubles.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_with_special_doubles.yaml index 89bfa2a0b07c1..82f409cdd168b 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_with_special_doubles.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_get_entity_with_special_doubles.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:14 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT location: https://storagename.table.core.windows.net/Tables('uttablef57d18d2') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pkf57d18d2", "RowKey": "rkf57d18d2", "inf": "Infinity", "inf@odata.type": "Edm.Double", "negativeinf": "-Infinity", "negativeinf@odata.type": @@ -50,32 +50,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablef57d18d2 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef57d18d2/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A14.8799464Z''\"","PartitionKey":"pkf57d18d2","RowKey":"rkf57d18d2","Timestamp":"2020-07-30T13:33:14.8799464Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef57d18d2/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A19.9042377Z''\"","PartitionKey":"pkf57d18d2","RowKey":"rkf57d18d2","Timestamp":"2020-09-02T21:17:19.9042377Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:14 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A14.8799464Z'" + date: Wed, 02 Sep 2020 21:17:19 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A19.9042377Z'" location: https://storagename.table.core.windows.net/uttablef57d18d2(PartitionKey='pkf57d18d2',RowKey='rkf57d18d2') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablef57d18d2 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablef57d18d2 - request: body: null headers: @@ -84,42 +84,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:15 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablef57d18d2(PartitionKey='pkf57d18d2',RowKey='rkf57d18d2') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef57d18d2/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A14.8799464Z''\"","PartitionKey":"pkf57d18d2","RowKey":"rkf57d18d2","Timestamp":"2020-07-30T13:33:14.8799464Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef57d18d2/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A19.9042377Z''\"","PartitionKey":"pkf57d18d2","RowKey":"rkf57d18d2","Timestamp":"2020-09-02T21:17:19.9042377Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:14 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A14.8799464Z'" + date: Wed, 02 Sep 2020 21:17:19 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A19.9042377Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablef57d18d2(PartitionKey='pkf57d18d2',RowKey='rkf57d18d2') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablef57d18d2(PartitionKey='pkf57d18d2',RowKey='rkf57d18d2') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablef57d18d2') response: @@ -128,12 +130,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:14 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablef57d18d2') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablef57d18d2') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_conflict.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_conflict.yaml index 1ab3026d9dc23..8662c8c19a303 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_conflict.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_conflict.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,114 +26,114 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:15 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT location: https://storagename.table.core.windows.net/Tables('uttable260d1530') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk260d1530", "RowKey": "rk260d1530", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk260d1530", "RowKey": "rk260d1530", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable260d1530 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable260d1530/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A15.4517171Z''\"","PartitionKey":"pk260d1530","RowKey":"rk260d1530","Timestamp":"2020-07-30T13:33:15.4517171Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable260d1530/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A20.1474981Z''\"","PartitionKey":"pk260d1530","RowKey":"rk260d1530","Timestamp":"2020-09-02T21:17:20.1474981Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:15 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A15.4517171Z'" + date: Wed, 02 Sep 2020 21:17:19 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A20.1474981Z'" location: https://storagename.table.core.windows.net/uttable260d1530(PartitionKey='pk260d1530',RowKey='rk260d1530') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable260d1530 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable260d1530 - request: - body: '{"PartitionKey": "pk260d1530", "RowKey": "rk260d1530", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk260d1530", "RowKey": "rk260d1530", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable260d1530 response: body: string: '{"odata.error":{"code":"EntityAlreadyExists","message":{"lang":"en-US","value":"The - specified entity already exists.\nRequestId:5786b892-3002-0003-3875-66090d000000\nTime:2020-07-30T13:33:15.5347750Z"}}}' + specified entity already exists.\nRequestId:099744e0-b002-0047-6b6e-81010a000000\nTime:2020-09-02T21:17:20.1925301Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:15 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 409 message: Conflict - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable260d1530 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable260d1530 - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable260d1530') response: @@ -142,12 +142,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:15 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable260d1530') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable260d1530') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_dictionary.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_dictionary.yaml index 6a44439fa6848..e22134721e03d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_dictionary.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_dictionary.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:16 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,71 +26,72 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:14 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT location: https://storagename.table.core.windows.net/Tables('uttable51a71614') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk51a71614", "RowKey": "rk51a71614", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk51a71614", "RowKey": "rk51a71614", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable51a71614 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable51a71614/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A16.0395768Z''\"","PartitionKey":"pk51a71614","RowKey":"rk51a71614","Timestamp":"2020-07-30T13:33:16.0395768Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable51a71614/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A20.3929912Z''\"","PartitionKey":"pk51a71614","RowKey":"rk51a71614","Timestamp":"2020-09-02T21:17:20.3929912Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:15 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A16.0395768Z'" + date: Wed, 02 Sep 2020 21:17:20 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A20.3929912Z'" location: https://storagename.table.core.windows.net/uttable51a71614(PartitionKey='pk51a71614',RowKey='rk51a71614') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable51a71614 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable51a71614 - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable51a71614') response: @@ -99,12 +100,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:15 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable51a71614') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable51a71614') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_empty_string_pk.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_empty_string_pk.yaml index 03513853ac48b..479b17696b945 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_empty_string_pk.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_empty_string_pk.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:15 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT location: https://storagename.table.core.windows.net/Tables('uttablec79a183d') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"RowKey": "rk", "PartitionKey": ""}' headers: @@ -48,43 +48,45 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:19 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablec79a183d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec79a183d/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A16.5337845Z''\"","PartitionKey":"","RowKey":"rk","Timestamp":"2020-07-30T13:33:16.5337845Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec79a183d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A20.6431443Z''\"","PartitionKey":"","RowKey":"rk","Timestamp":"2020-09-02T21:17:20.6431443Z"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:15 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A16.5337845Z'" + date: Wed, 02 Sep 2020 21:17:20 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A20.6431443Z'" location: https://storagename.table.core.windows.net/uttablec79a183d(PartitionKey='',RowKey='rk') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablec79a183d + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablec79a183d - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablec79a183d') response: @@ -93,12 +95,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:15 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablec79a183d') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablec79a183d') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_empty_string_rk.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_empty_string_rk.yaml index 6fa4f5a1f320b..7130d9e72b3b2 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_empty_string_rk.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_empty_string_rk.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:17 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:15 GMT + date: Wed, 02 Sep 2020 21:17:19 GMT location: https://storagename.table.core.windows.net/Tables('uttablec79e183f') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk", "RowKey": ""}' headers: @@ -48,43 +48,45 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablec79e183f response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec79e183f/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A17.0466104Z''\"","PartitionKey":"pk","RowKey":"","Timestamp":"2020-07-30T13:33:17.0466104Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec79e183f/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A20.9340893Z''\"","PartitionKey":"pk","RowKey":"","Timestamp":"2020-09-02T21:17:20.9340893Z"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:16 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A17.0466104Z'" + date: Wed, 02 Sep 2020 21:17:20 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A20.9340893Z'" location: https://storagename.table.core.windows.net/uttablec79e183f(PartitionKey='pk',RowKey='') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablec79e183f + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablec79e183f - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablec79e183f') response: @@ -93,12 +95,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:16 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablec79e183f') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablec79e183f') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_missing_pk.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_missing_pk.yaml index 7ea32dbb2b6bc..b50a59df36ac9 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_missing_pk.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_missing_pk.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,27 +26,29 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:17 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT location: https://storagename.table.core.windows.net/Tables('uttable52411612') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable52411612') response: @@ -55,12 +57,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:17 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable52411612') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable52411612') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_missing_rk.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_missing_rk.yaml index 5dcbe0d947a59..a432511867fd2 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_missing_rk.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_missing_rk.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,27 +26,29 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:17 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT location: https://storagename.table.core.windows.net/Tables('uttable52451614') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:18 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable52451614') response: @@ -55,12 +57,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:17 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable52451614') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable52451614') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_property_name_too_long.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_property_name_too_long.yaml index 8eb10a0aaabd5..25f4bb12a27ad 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_property_name_too_long.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_property_name_too_long.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:18 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT location: https://storagename.table.core.windows.net/Tables('uttable7d0b1b23') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk7d0b1b23", "RowKey": "rk7d0b1b23", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": "badval"}' @@ -49,42 +49,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable7d0b1b23 response: body: string: '{"odata.error":{"code":"PropertyNameTooLong","message":{"lang":"en-US","value":"The - property name exceeds the maximum allowed length (255).\nRequestId:a90cc38a-9002-002c-2675-668837000000\nTime:2020-07-30T13:33:18.4270043Z"}}}' + property name exceeds the maximum allowed length (255).\nRequestId:a2288d76-c002-000c-3c6e-813090000000\nTime:2020-09-02T21:17:21.4857344Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:18 GMT + date: Wed, 02 Sep 2020 21:17:20 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 400 message: Bad Request - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable7d0b1b23 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable7d0b1b23 - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable7d0b1b23') response: @@ -93,12 +95,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:18 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable7d0b1b23') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable7d0b1b23') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_too_many_properties.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_too_many_properties.yaml index 2d562e0e26dfb..d1924a6b39c6a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_too_many_properties.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_too_many_properties.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:20 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:18 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT location: https://storagename.table.core.windows.net/Tables('uttable2c5919f0') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk2c5919f0", "RowKey": "rk2c5919f0", "key0": "value0", "key1": "value1", "key2": "value2", "key3": "value3", "key4": "value4", "key5": @@ -117,43 +117,45 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:19 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable2c5919f0 response: body: string: '{"odata.error":{"code":"TooManyProperties","message":{"lang":"en-US","value":"The entity contains more properties than allowed. Each entity can include up to - 252 properties to store data. Each entity also has 3 system properties.\nRequestId:ea5fadab-6002-0032-2a75-6652da000000\nTime:2020-07-30T13:33:18.9421142Z"}}}' + 252 properties to store data. Each entity also has 3 system properties.\nRequestId:3f313a6b-f002-002d-516e-815da1000000\nTime:2020-09-02T21:17:21.6791082Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:18 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 400 message: Bad Request - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable2c5919f0 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable2c5919f0 - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable2c5919f0') response: @@ -162,12 +164,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:18 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable2c5919f0') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable2c5919f0') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_full_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_full_metadata.yaml index f2b0b22a505e3..0c0bf97fd714a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_full_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_full_metadata.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,71 +26,105 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:19 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT location: https://storagename.table.core.windows.net/Tables('uttable1172194c') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk1172194c", "RowKey": "rk1172194c", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk1172194c", "RowKey": "rk1172194c", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=fullmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable1172194c response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable1172194c/@Element","odata.type":"storagename.uttable1172194c","odata.id":"https://storagename.table.core.windows.net/uttable1172194c(PartitionKey=''pk1172194c'',RowKey=''rk1172194c'')","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A19.4416834Z''\"","odata.editLink":"uttable1172194c(PartitionKey=''pk1172194c'',RowKey=''rk1172194c'')","PartitionKey":"pk1172194c","RowKey":"rk1172194c","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-07-30T13:33:19.4416834Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable1172194c/@Element","odata.type":"storagename.uttable1172194c","odata.id":"https://storagename.table.core.windows.net/uttable1172194c(PartitionKey=''pk1172194c'',RowKey=''rk1172194c'')","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A21.8798322Z''\"","odata.editLink":"uttable1172194c(PartitionKey=''pk1172194c'',RowKey=''rk1172194c'')","PartitionKey":"pk1172194c","RowKey":"rk1172194c","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:17:21.8798322Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=fullmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:19 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A19.4416834Z'" + date: Wed, 02 Sep 2020 21:17:21 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A21.8798322Z'" location: https://storagename.table.core.windows.net/uttable1172194c(PartitionKey='pk1172194c',RowKey='rk1172194c') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable1172194c + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable1172194c - request: body: null headers: + Accept: + - application/json;odata=fullmetadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:17:21 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:17:21 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttable1172194c(PartitionKey='pk1172194c',RowKey='rk1172194c') + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable1172194c/@Element","odata.type":"storagename.uttable1172194c","odata.id":"https://storagename.table.core.windows.net/uttable1172194c(PartitionKey=''pk1172194c'',RowKey=''rk1172194c'')","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A21.8798322Z''\"","odata.editLink":"uttable1172194c(PartitionKey=''pk1172194c'',RowKey=''rk1172194c'')","PartitionKey":"pk1172194c","RowKey":"rk1172194c","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:17:21.8798322Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=fullmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:21 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A21.8798322Z'" + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable1172194c(PartitionKey='pk1172194c',RowKey='rk1172194c') +- request: + body: null + headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable1172194c') response: @@ -99,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:19 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable1172194c') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable1172194c') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_hook.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_hook.yaml index 379da267200c3..70cb7e9f71d75 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_hook.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_hook.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,71 +26,105 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:19 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT location: https://storagename.table.core.windows.net/Tables('uttable3c3715aa') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk3c3715aa", "RowKey": "rk3c3715aa", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk3c3715aa", "RowKey": "rk3c3715aa", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:20 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable3c3715aa response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3c3715aa/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A19.9370096Z''\"","PartitionKey":"pk3c3715aa","RowKey":"rk3c3715aa","Timestamp":"2020-07-30T13:33:19.9370096Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3c3715aa/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A22.1354505Z''\"","PartitionKey":"pk3c3715aa","RowKey":"rk3c3715aa","Timestamp":"2020-09-02T21:17:22.1354505Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:19 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A19.9370096Z'" + date: Wed, 02 Sep 2020 21:17:21 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A22.1354505Z'" location: https://storagename.table.core.windows.net/uttable3c3715aa(PartitionKey='pk3c3715aa',RowKey='rk3c3715aa') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable3c3715aa + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable3c3715aa - request: body: null headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:17:21 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:17:21 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttable3c3715aa(PartitionKey='pk3c3715aa',RowKey='rk3c3715aa') + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable3c3715aa/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A22.1354505Z''\"","PartitionKey":"pk3c3715aa","RowKey":"rk3c3715aa","Timestamp":"2020-09-02T21:17:22.1354505Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:21 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A22.1354505Z'" + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable3c3715aa(PartitionKey='pk3c3715aa',RowKey='rk3c3715aa') +- request: + body: null + headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3c3715aa') response: @@ -99,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:19 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable3c3715aa') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable3c3715aa') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_large_int32_value_throws.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_large_int32_value_throws.yaml index 1589d29c968ac..2c6b8ef776938 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_large_int32_value_throws.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_large_int32_value_throws.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,27 +26,29 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:19 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT location: https://storagename.table.core.windows.net/Tables('uttable3d151d95') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3d151d95') response: @@ -55,12 +57,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:20 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable3d151d95') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable3d151d95') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_large_int64_value_throws.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_large_int64_value_throws.yaml index 06958c4d088ad..669f9e74080fb 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_large_int64_value_throws.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_large_int64_value_throws.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,27 +26,29 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:20 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT location: https://storagename.table.core.windows.net/Tables('uttable3d5e1d9a') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3d5e1d9a') response: @@ -55,12 +57,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:20 GMT + date: Wed, 02 Sep 2020 21:17:22 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable3d5e1d9a') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable3d5e1d9a') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_no_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_no_metadata.yaml index 19a5e6b24ba0b..c07d17bd810fb 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_no_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_entity_with_no_metadata.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:21 GMT + - Wed, 02 Sep 2020 21:17:21 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,71 +26,105 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:20 GMT + date: Wed, 02 Sep 2020 21:17:21 GMT location: https://storagename.table.core.windows.net/Tables('uttabledefb1876') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pkdefb1876", "RowKey": "rkdefb1876", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkdefb1876", "RowKey": "rkdefb1876", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=nometadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttabledefb1876 response: body: - string: '{"PartitionKey":"pkdefb1876","RowKey":"rkdefb1876","Timestamp":"2020-07-30T13:33:21.239417Z","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"PartitionKey":"pkdefb1876","RowKey":"rkdefb1876","Timestamp":"2020-09-02T21:17:22.7652172Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=nometadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:20 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A21.239417Z'" + date: Wed, 02 Sep 2020 21:17:21 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A22.7652172Z'" location: https://storagename.table.core.windows.net/uttabledefb1876(PartitionKey='pkdefb1876',RowKey='rkdefb1876') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttabledefb1876 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttabledefb1876 - request: body: null headers: + Accept: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Wed, 02 Sep 2020 21:17:22 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:17:22 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/uttabledefb1876(PartitionKey='pkdefb1876',RowKey='rkdefb1876') + response: + body: + string: '{"PartitionKey":"pkdefb1876","RowKey":"rkdefb1876","Timestamp":"2020-09-02T21:17:22.7652172Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=nometadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:21 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A22.7652172Z'" + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttabledefb1876(PartitionKey='pkdefb1876',RowKey='rkdefb1876') +- request: + body: null + headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttabledefb1876') response: @@ -99,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:20 GMT + date: Wed, 02 Sep 2020 21:17:22 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttabledefb1876') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttabledefb1876') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_merge_entity_with_existing_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_merge_entity_with_existing_entity.yaml index 4520acc7d1fa6..f039d5fe7d928 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_merge_entity_with_existing_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_merge_entity_with_existing_entity.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:20 GMT + date: Wed, 02 Sep 2020 21:17:22 GMT location: https://storagename.table.core.windows.net/Tables('uttable42df1e0f') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk42df1e0f", "RowKey": "rk42df1e0f", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk42df1e0f", "RowKey": "rk42df1e0f", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable42df1e0f response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42df1e0f/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A21.7215424Z''\"","PartitionKey":"pk42df1e0f","RowKey":"rk42df1e0f","Timestamp":"2020-07-30T13:33:21.7215424Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42df1e0f/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A23.0016762Z''\"","PartitionKey":"pk42df1e0f","RowKey":"rk42df1e0f","Timestamp":"2020-09-02T21:17:23.0016762Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:20 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A21.7215424Z'" + date: Wed, 02 Sep 2020 21:17:22 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.0016762Z'" location: https://storagename.table.core.windows.net/uttable42df1e0f(PartitionKey='pk42df1e0f',RowKey='rk42df1e0f') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42df1e0f + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42df1e0f - request: body: '{"PartitionKey": "pk42df1e0f", "RowKey": "rk42df1e0f", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,13 +93,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable42df1e0f(PartitionKey='pk42df1e0f',RowKey='rk42df1e0f') response: @@ -107,15 +108,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:20 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A21.7979671Z'" + date: Wed, 02 Sep 2020 21:17:22 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.034974Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42df1e0f(PartitionKey='pk42df1e0f',RowKey='rk42df1e0f') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42df1e0f(PartitionKey='pk42df1e0f',RowKey='rk42df1e0f') - request: body: null headers: @@ -124,42 +125,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable42df1e0f(PartitionKey='pk42df1e0f',RowKey='rk42df1e0f') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42df1e0f/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A21.7979671Z''\"","PartitionKey":"pk42df1e0f","RowKey":"rk42df1e0f","Timestamp":"2020-07-30T13:33:21.7979671Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42df1e0f/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A23.034974Z''\"","PartitionKey":"pk42df1e0f","RowKey":"rk42df1e0f","Timestamp":"2020-09-02T21:17:23.034974Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large":933311100,"married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:20 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A21.7979671Z'" + date: Wed, 02 Sep 2020 21:17:22 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.034974Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42df1e0f(PartitionKey='pk42df1e0f',RowKey='rk42df1e0f') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42df1e0f(PartitionKey='pk42df1e0f',RowKey='rk42df1e0f') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:22 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable42df1e0f') response: @@ -168,12 +171,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:21 GMT + date: Wed, 02 Sep 2020 21:17:22 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable42df1e0f') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable42df1e0f') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_merge_entity_with_non_existing_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_merge_entity_with_non_existing_entity.yaml index d574267939a73..1e3289f70942d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_merge_entity_with_non_existing_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_merge_entity_with_non_existing_entity.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,21 +26,23 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:22 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT location: https://storagename.table.core.windows.net/Tables('uttablebeb51fb9') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pkbeb51fb9", "RowKey": "rkbeb51fb9", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -48,13 +50,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttablebeb51fb9(PartitionKey='pkbeb51fb9',RowKey='rkbeb51fb9') response: @@ -63,15 +65,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:22 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A22.3793844Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.2981553Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablebeb51fb9(PartitionKey='pkbeb51fb9',RowKey='rkbeb51fb9') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablebeb51fb9(PartitionKey='pkbeb51fb9',RowKey='rkbeb51fb9') - request: body: null headers: @@ -80,42 +82,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablebeb51fb9(PartitionKey='pkbeb51fb9',RowKey='rkbeb51fb9') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablebeb51fb9/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A22.3793844Z''\"","PartitionKey":"pkbeb51fb9","RowKey":"rkbeb51fb9","Timestamp":"2020-07-30T13:33:22.3793844Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablebeb51fb9/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A23.2981553Z''\"","PartitionKey":"pkbeb51fb9","RowKey":"rkbeb51fb9","Timestamp":"2020-09-02T21:17:23.2981553Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:22 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A22.3793844Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.2981553Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablebeb51fb9(PartitionKey='pkbeb51fb9',RowKey='rkbeb51fb9') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablebeb51fb9(PartitionKey='pkbeb51fb9',RowKey='rkbeb51fb9') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablebeb51fb9') response: @@ -124,12 +128,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:22 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablebeb51fb9') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablebeb51fb9') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_replace_entity_with_existing_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_replace_entity_with_existing_entity.yaml index 96bdf6ac19f63..7491bced1d1b5 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_replace_entity_with_existing_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_replace_entity_with_existing_entity.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:21 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT location: https://storagename.table.core.windows.net/Tables('uttable7edf1edb') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk7edf1edb", "RowKey": "rk7edf1edb", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk7edf1edb", "RowKey": "rk7edf1edb", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:23 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable7edf1edb response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7edf1edb/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A22.9650908Z''\"","PartitionKey":"pk7edf1edb","RowKey":"rk7edf1edb","Timestamp":"2020-07-30T13:33:22.9650908Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7edf1edb/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A23.5339043Z''\"","PartitionKey":"pk7edf1edb","RowKey":"rk7edf1edb","Timestamp":"2020-09-02T21:17:23.5339043Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:21 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A22.9650908Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.5339043Z'" location: https://storagename.table.core.windows.net/uttable7edf1edb(PartitionKey='pk7edf1edb',RowKey='rk7edf1edb') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable7edf1edb + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable7edf1edb - request: body: '{"PartitionKey": "pk7edf1edb", "RowKey": "rk7edf1edb", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,13 +93,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttable7edf1edb(PartitionKey='pk7edf1edb',RowKey='rk7edf1edb') response: @@ -107,15 +108,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:22 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A23.0428641Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.5653384Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable7edf1edb(PartitionKey='pk7edf1edb',RowKey='rk7edf1edb') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable7edf1edb(PartitionKey='pk7edf1edb',RowKey='rk7edf1edb') - request: body: null headers: @@ -124,42 +125,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:22 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:22 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable7edf1edb(PartitionKey='pk7edf1edb',RowKey='rk7edf1edb') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7edf1edb/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A23.0428641Z''\"","PartitionKey":"pk7edf1edb","RowKey":"rk7edf1edb","Timestamp":"2020-07-30T13:33:23.0428641Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7edf1edb/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A23.5653384Z''\"","PartitionKey":"pk7edf1edb","RowKey":"rk7edf1edb","Timestamp":"2020-09-02T21:17:23.5653384Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:22 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A23.0428641Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.5653384Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable7edf1edb(PartitionKey='pk7edf1edb',RowKey='rk7edf1edb') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable7edf1edb(PartitionKey='pk7edf1edb',RowKey='rk7edf1edb') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable7edf1edb') response: @@ -168,12 +171,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:22 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable7edf1edb') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable7edf1edb') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_replace_entity_with_non_existing_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_replace_entity_with_non_existing_entity.yaml index 8bf49e04586f1..29d35ba3a4e69 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_replace_entity_with_non_existing_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_insert_or_replace_entity_with_non_existing_entity.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,21 +26,23 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:23 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT location: https://storagename.table.core.windows.net/Tables('uttablefde52085') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pkfde52085", "RowKey": "rkfde52085", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -48,13 +50,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttablefde52085(PartitionKey='pkfde52085',RowKey='rkfde52085') response: @@ -63,15 +65,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:23 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A23.6242812Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.8225143Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablefde52085(PartitionKey='pkfde52085',RowKey='rkfde52085') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablefde52085(PartitionKey='pkfde52085',RowKey='rkfde52085') - request: body: null headers: @@ -80,42 +82,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablefde52085(PartitionKey='pkfde52085',RowKey='rkfde52085') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefde52085/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A23.6242812Z''\"","PartitionKey":"pkfde52085","RowKey":"rkfde52085","Timestamp":"2020-07-30T13:33:23.6242812Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefde52085/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A23.8225143Z''\"","PartitionKey":"pkfde52085","RowKey":"rkfde52085","Timestamp":"2020-09-02T21:17:23.8225143Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:23 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A23.6242812Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A23.8225143Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablefde52085(PartitionKey='pkfde52085',RowKey='rkfde52085') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablefde52085(PartitionKey='pkfde52085',RowKey='rkfde52085') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablefde52085') response: @@ -124,12 +128,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:23 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablefde52085') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablefde52085') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity.yaml index 8dc57b3a47bc6..80a002e17ef0e 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:24 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:23 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT location: https://storagename.table.core.windows.net/Tables('uttable641610fa') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk641610fa", "RowKey": "rk641610fa", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk641610fa", "RowKey": "rk641610fa", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable641610fa response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable641610fa/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A24.1995293Z''\"","PartitionKey":"pk641610fa","RowKey":"rk641610fa","Timestamp":"2020-07-30T13:33:24.1995293Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable641610fa/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A24.06559Z''\"","PartitionKey":"pk641610fa","RowKey":"rk641610fa","Timestamp":"2020-09-02T21:17:24.06559Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:23 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A24.1995293Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A24.06559Z'" location: https://storagename.table.core.windows.net/uttable641610fa(PartitionKey='pk641610fa',RowKey='rk641610fa') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable641610fa + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable641610fa - request: body: '{"PartitionKey": "pk641610fa", "RowKey": "rk641610fa", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,15 +93,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable641610fa(PartitionKey='pk641610fa',RowKey='rk641610fa') response: @@ -109,15 +110,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:23 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A24.2867548Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A24.1097116Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable641610fa(PartitionKey='pk641610fa',RowKey='rk641610fa') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable641610fa(PartitionKey='pk641610fa',RowKey='rk641610fa') - request: body: null headers: @@ -126,42 +127,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable641610fa(PartitionKey='pk641610fa',RowKey='rk641610fa') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable641610fa/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A24.2867548Z''\"","PartitionKey":"pk641610fa","RowKey":"rk641610fa","Timestamp":"2020-07-30T13:33:24.2867548Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable641610fa/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A24.1097116Z''\"","PartitionKey":"pk641610fa","RowKey":"rk641610fa","Timestamp":"2020-09-02T21:17:24.1097116Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large":933311100,"married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:23 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A24.2867548Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A24.1097116Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable641610fa(PartitionKey='pk641610fa',RowKey='rk641610fa') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable641610fa(PartitionKey='pk641610fa',RowKey='rk641610fa') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable641610fa') response: @@ -170,12 +173,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:23 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable641610fa') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable641610fa') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_not_existing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_not_existing.yaml index 0b46ed07058da..c623cb6475d1e 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_not_existing.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_not_existing.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,21 +26,23 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:24 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT location: https://storagename.table.core.windows.net/Tables('uttable66e91674') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk66e91674", "RowKey": "rk66e91674", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -48,48 +50,46 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable66e91674(PartitionKey='pk66e91674',RowKey='rk66e91674') response: body: - string: 'ResourceNotFoundThe specified resource does not exist. - - RequestId:ae81374a-8002-005e-7276-66f909000000 - - Time:2020-07-30T13:33:24.8775073Z' + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:346c4235-5002-002b-586e-81aad9000000\nTime:2020-09-02T21:17:24.3461297Z"}}}' headers: cache-control: no-cache - content-type: application/xml;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:24 GMT + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:24 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 404 message: Not Found - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable66e91674(PartitionKey='pk66e91674',RowKey='rk66e91674') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable66e91674(PartitionKey='pk66e91674',RowKey='rk66e91674') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:25 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable66e91674') response: @@ -98,12 +98,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:24 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable66e91674') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable66e91674') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_with_if_doesnt_match.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_with_if_doesnt_match.yaml index 348da17ccc4a6..ff7d37bf5840f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_with_if_doesnt_match.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_with_if_doesnt_match.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:24 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT location: https://storagename.table.core.windows.net/Tables('uttable279d199b') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk279d199b", "RowKey": "rk279d199b", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk279d199b", "RowKey": "rk279d199b", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable279d199b response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable279d199b/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A25.3681155Z''\"","PartitionKey":"pk279d199b","RowKey":"rk279d199b","Timestamp":"2020-07-30T13:33:25.3681155Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable279d199b/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A24.5560074Z''\"","PartitionKey":"pk279d199b","RowKey":"rk279d199b","Timestamp":"2020-09-02T21:17:24.5560074Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:25 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A25.3681155Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A24.5560074Z'" location: https://storagename.table.core.windows.net/uttable279d199b(PartitionKey='pk279d199b',RowKey='rk279d199b') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable279d199b + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable279d199b - request: body: '{"PartitionKey": "pk279d199b", "RowKey": "rk279d199b", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,48 +93,46 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:23 GMT If-Match: - W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttable279d199b(PartitionKey='pk279d199b',RowKey='rk279d199b') response: body: - string: 'UpdateConditionNotSatisfiedThe update condition specified in the request was not satisfied. - - RequestId:a318a23c-d002-0064-5c76-66baaa000000 - - Time:2020-07-30T13:33:25.4471689Z' + string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The + update condition specified in the request was not satisfied.\nRequestId:c48806cf-b002-0065-7c6e-816f3c000000\nTime:2020-09-02T21:17:24.5930329Z"}}}' headers: cache-control: no-cache - content-type: application/xml;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:25 GMT + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:23 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 412 message: Precondition Failed - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable279d199b(PartitionKey='pk279d199b',RowKey='rk279d199b') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable279d199b(PartitionKey='pk279d199b',RowKey='rk279d199b') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:23 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:23 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable279d199b') response: @@ -142,12 +141,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:25 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable279d199b') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable279d199b') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_with_if_matches.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_with_if_matches.yaml index d5fd83830dc29..c0b46d8a9252a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_with_if_matches.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_merge_entity_with_if_matches.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:25 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT location: https://storagename.table.core.windows.net/Tables('uttableab731787') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pkab731787", "RowKey": "rkab731787", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkab731787", "RowKey": "rkab731787", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:26 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttableab731787 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableab731787/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A25.9352892Z''\"","PartitionKey":"pkab731787","RowKey":"rkab731787","Timestamp":"2020-07-30T13:33:25.9352892Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableab731787/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A24.8260755Z''\"","PartitionKey":"pkab731787","RowKey":"rkab731787","Timestamp":"2020-09-02T21:17:24.8260755Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:25 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A25.9352892Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A24.8260755Z'" location: https://storagename.table.core.windows.net/uttableab731787(PartitionKey='pkab731787',RowKey='rkab731787') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttableab731787 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttableab731787 - request: body: '{"PartitionKey": "pkab731787", "RowKey": "rkab731787", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,15 +93,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT If-Match: - - W/"datetime'2020-07-30T13%3A33%3A25.9352892Z'" + - W/"datetime'2020-09-02T21%3A17%3A24.8260755Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PATCH uri: https://storagename.table.core.windows.net/uttableab731787(PartitionKey='pkab731787',RowKey='rkab731787') response: @@ -109,15 +110,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:25 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A26.0170037Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A24.8572244Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttableab731787(PartitionKey='pkab731787',RowKey='rkab731787') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttableab731787(PartitionKey='pkab731787',RowKey='rkab731787') - request: body: null headers: @@ -126,42 +127,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttableab731787(PartitionKey='pkab731787',RowKey='rkab731787') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableab731787/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A26.0170037Z''\"","PartitionKey":"pkab731787","RowKey":"rkab731787","Timestamp":"2020-07-30T13:33:26.0170037Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableab731787/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A24.8572244Z''\"","PartitionKey":"pkab731787","RowKey":"rkab731787","Timestamp":"2020-09-02T21:17:24.8572244Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"evenratio":3.0,"large":933311100,"married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:25 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A26.0170037Z'" + date: Wed, 02 Sep 2020 21:17:23 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A24.8572244Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttableab731787(PartitionKey='pkab731787',RowKey='rkab731787') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttableab731787(PartitionKey='pkab731787',RowKey='rkab731787') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttableab731787') response: @@ -170,12 +173,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:26 GMT + date: Wed, 02 Sep 2020 21:17:23 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttableab731787') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttableab731787') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_none_property_value.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_none_property_value.yaml index 935b170b5dbad..fe412f4940818 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_none_property_value.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_none_property_value.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:25 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT location: https://storagename.table.core.windows.net/Tables('uttablee7f813fe') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pke7f813fe", "RowKey": "rke7f813fe"}' headers: @@ -48,32 +48,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablee7f813fe response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7f813fe/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A26.5834879Z''\"","PartitionKey":"pke7f813fe","RowKey":"rke7f813fe","Timestamp":"2020-07-30T13:33:26.5834879Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7f813fe/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.1051593Z''\"","PartitionKey":"pke7f813fe","RowKey":"rke7f813fe","Timestamp":"2020-09-02T21:17:25.1051593Z"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:25 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A26.5834879Z'" + date: Wed, 02 Sep 2020 21:17:24 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A25.1051593Z'" location: https://storagename.table.core.windows.net/uttablee7f813fe(PartitionKey='pke7f813fe',RowKey='rke7f813fe') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablee7f813fe + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablee7f813fe - request: body: null headers: @@ -82,42 +82,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablee7f813fe(PartitionKey='pke7f813fe',RowKey='rke7f813fe') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7f813fe/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A26.5834879Z''\"","PartitionKey":"pke7f813fe","RowKey":"rke7f813fe","Timestamp":"2020-07-30T13:33:26.5834879Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7f813fe/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.1051593Z''\"","PartitionKey":"pke7f813fe","RowKey":"rke7f813fe","Timestamp":"2020-09-02T21:17:25.1051593Z"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:25 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A26.5834879Z'" + date: Wed, 02 Sep 2020 21:17:24 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A25.1051593Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablee7f813fe(PartitionKey='pke7f813fe',RowKey='rke7f813fe') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablee7f813fe(PartitionKey='pke7f813fe',RowKey='rke7f813fe') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee7f813fe') response: @@ -126,12 +128,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:25 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablee7f813fe') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablee7f813fe') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities.yaml index dcdeb04dde321..cf1ec16991574 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:27 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:26 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT location: https://storagename.table.core.windows.net/Tables('uttable88c411e8') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"TableName": "querytable88c411e8"}' headers: @@ -48,13 +48,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -63,104 +63,102 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:26 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT location: https://storagename.table.core.windows.net/Tables('querytable88c411e8') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk88c411e8", "RowKey": "rk88c411e81", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk88c411e8", "RowKey": "rk88c411e81", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable88c411e8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable88c411e8/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A27.2270172Z''\"","PartitionKey":"pk88c411e8","RowKey":"rk88c411e81","Timestamp":"2020-07-30T13:33:27.2270172Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable88c411e8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.3782133Z''\"","PartitionKey":"pk88c411e8","RowKey":"rk88c411e81","Timestamp":"2020-09-02T21:17:25.3782133Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:26 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A27.2270172Z'" + date: Wed, 02 Sep 2020 21:17:24 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A25.3782133Z'" location: https://storagename.table.core.windows.net/querytable88c411e8(PartitionKey='pk88c411e8',RowKey='rk88c411e81') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable88c411e8 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable88c411e8 - request: - body: '{"PartitionKey": "pk88c411e8", "RowKey": "rk88c411e812", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk88c411e8", "RowKey": "rk88c411e812", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable88c411e8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable88c411e8/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A27.3090776Z''\"","PartitionKey":"pk88c411e8","RowKey":"rk88c411e812","Timestamp":"2020-07-30T13:33:27.3090776Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable88c411e8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.4142396Z''\"","PartitionKey":"pk88c411e8","RowKey":"rk88c411e812","Timestamp":"2020-09-02T21:17:25.4142396Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:26 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A27.3090776Z'" + date: Wed, 02 Sep 2020 21:17:24 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A25.4142396Z'" location: https://storagename.table.core.windows.net/querytable88c411e8(PartitionKey='pk88c411e8',RowKey='rk88c411e812') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable88c411e8 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable88c411e8 - request: body: null headers: @@ -169,41 +167,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable88c411e8() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable88c411e8","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A27.2270172Z''\"","PartitionKey":"pk88c411e8","RowKey":"rk88c411e81","Timestamp":"2020-07-30T13:33:27.2270172Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A27.3090776Z''\"","PartitionKey":"pk88c411e8","RowKey":"rk88c411e812","Timestamp":"2020-07-30T13:33:27.3090776Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable88c411e8","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.3782133Z''\"","PartitionKey":"pk88c411e8","RowKey":"rk88c411e81","Timestamp":"2020-09-02T21:17:25.3782133Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.4142396Z''\"","PartitionKey":"pk88c411e8","RowKey":"rk88c411e812","Timestamp":"2020-09-02T21:17:25.4142396Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:26 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable88c411e8() + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable88c411e8() - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable88c411e8') response: @@ -212,25 +212,27 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:27 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable88c411e8') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable88c411e8') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable88c411e8') response: @@ -239,12 +241,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:27 GMT + date: Wed, 02 Sep 2020 21:17:24 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('querytable88c411e8') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('querytable88c411e8') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_full_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_full_metadata.yaml index f795f77d9bfb2..bdb9a278f04c0 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_full_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_full_metadata.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:24 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:27 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT location: https://storagename.table.core.windows.net/Tables('uttableae56179a') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"TableName": "querytableae56179a"}' headers: @@ -48,13 +48,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:28 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -63,147 +63,147 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:27 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT location: https://storagename.table.core.windows.net/Tables('querytableae56179a') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pkae56179a", "RowKey": "rkae56179a1", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkae56179a", "RowKey": "rkae56179a1", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytableae56179a response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytableae56179a/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A28.0729727Z''\"","PartitionKey":"pkae56179a","RowKey":"rkae56179a1","Timestamp":"2020-07-30T13:33:28.0729727Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytableae56179a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.7673869Z''\"","PartitionKey":"pkae56179a","RowKey":"rkae56179a1","Timestamp":"2020-09-02T21:17:25.7673869Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:27 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A28.0729727Z'" + date: Wed, 02 Sep 2020 21:17:25 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A25.7673869Z'" location: https://storagename.table.core.windows.net/querytableae56179a(PartitionKey='pkae56179a',RowKey='rkae56179a1') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytableae56179a + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytableae56179a - request: - body: '{"PartitionKey": "pkae56179a", "RowKey": "rkae56179a12", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkae56179a", "RowKey": "rkae56179a12", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytableae56179a response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytableae56179a/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A28.1550282Z''\"","PartitionKey":"pkae56179a","RowKey":"rkae56179a12","Timestamp":"2020-07-30T13:33:28.1550282Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytableae56179a/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.8004098Z''\"","PartitionKey":"pkae56179a","RowKey":"rkae56179a12","Timestamp":"2020-09-02T21:17:25.8004098Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:27 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A28.1550282Z'" + date: Wed, 02 Sep 2020 21:17:25 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A25.8004098Z'" location: https://storagename.table.core.windows.net/querytableae56179a(PartitionKey='pkae56179a',RowKey='rkae56179a12') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytableae56179a + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytableae56179a - request: body: null headers: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) accept: - application/json;odata=fullmetadata x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytableae56179a() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytableae56179a","value":[{"odata.type":"storagename.querytableae56179a","odata.id":"https://storagename.table.core.windows.net/querytableae56179a(PartitionKey=''pkae56179a'',RowKey=''rkae56179a1'')","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A28.0729727Z''\"","odata.editLink":"querytableae56179a(PartitionKey=''pkae56179a'',RowKey=''rkae56179a1'')","PartitionKey":"pkae56179a","RowKey":"rkae56179a1","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-07-30T13:33:28.0729727Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.type":"storagename.querytableae56179a","odata.id":"https://storagename.table.core.windows.net/querytableae56179a(PartitionKey=''pkae56179a'',RowKey=''rkae56179a12'')","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A28.1550282Z''\"","odata.editLink":"querytableae56179a(PartitionKey=''pkae56179a'',RowKey=''rkae56179a12'')","PartitionKey":"pkae56179a","RowKey":"rkae56179a12","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-07-30T13:33:28.1550282Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytableae56179a","value":[{"odata.type":"storagename.querytableae56179a","odata.id":"https://storagename.table.core.windows.net/querytableae56179a(PartitionKey=''pkae56179a'',RowKey=''rkae56179a1'')","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.7673869Z''\"","odata.editLink":"querytableae56179a(PartitionKey=''pkae56179a'',RowKey=''rkae56179a1'')","PartitionKey":"pkae56179a","RowKey":"rkae56179a1","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:17:25.7673869Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.type":"storagename.querytableae56179a","odata.id":"https://storagename.table.core.windows.net/querytableae56179a(PartitionKey=''pkae56179a'',RowKey=''rkae56179a12'')","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A25.8004098Z''\"","odata.editLink":"querytableae56179a(PartitionKey=''pkae56179a'',RowKey=''rkae56179a12'')","PartitionKey":"pkae56179a","RowKey":"rkae56179a12","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2020-09-02T21:17:25.8004098Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=fullmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:27 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytableae56179a() + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytableae56179a() - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttableae56179a') response: @@ -212,25 +212,27 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:27 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttableae56179a') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttableae56179a') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytableae56179a') response: @@ -239,12 +241,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:27 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('querytableae56179a') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('querytableae56179a') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_no_metadata.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_no_metadata.yaml index b137d54d1715f..9f3a48d2451b0 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_no_metadata.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_no_metadata.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:28 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT location: https://storagename.table.core.windows.net/Tables('uttable7f5216c4') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"TableName": "querytable7f5216c4"}' headers: @@ -48,13 +48,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -63,147 +63,147 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:28 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT location: https://storagename.table.core.windows.net/Tables('querytable7f5216c4') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk7f5216c4", "RowKey": "rk7f5216c41", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk7f5216c4", "RowKey": "rk7f5216c41", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable7f5216c4 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable7f5216c4/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A28.8912087Z''\"","PartitionKey":"pk7f5216c4","RowKey":"rk7f5216c41","Timestamp":"2020-07-30T13:33:28.8912087Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable7f5216c4/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A26.1179418Z''\"","PartitionKey":"pk7f5216c4","RowKey":"rk7f5216c41","Timestamp":"2020-09-02T21:17:26.1179418Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:28 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A28.8912087Z'" + date: Wed, 02 Sep 2020 21:17:25 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A26.1179418Z'" location: https://storagename.table.core.windows.net/querytable7f5216c4(PartitionKey='pk7f5216c4',RowKey='rk7f5216c41') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable7f5216c4 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable7f5216c4 - request: - body: '{"PartitionKey": "pk7f5216c4", "RowKey": "rk7f5216c412", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk7f5216c4", "RowKey": "rk7f5216c412", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:29 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable7f5216c4 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable7f5216c4/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A28.9752708Z''\"","PartitionKey":"pk7f5216c4","RowKey":"rk7f5216c412","Timestamp":"2020-07-30T13:33:28.9752708Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable7f5216c4/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A26.1489631Z''\"","PartitionKey":"pk7f5216c4","RowKey":"rk7f5216c412","Timestamp":"2020-09-02T21:17:26.1489631Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:28 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A28.9752708Z'" + date: Wed, 02 Sep 2020 21:17:26 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A26.1489631Z'" location: https://storagename.table.core.windows.net/querytable7f5216c4(PartitionKey='pk7f5216c4',RowKey='rk7f5216c412') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable7f5216c4 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable7f5216c4 - request: body: null headers: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) accept: - application/json;odata=nometadata x-ms-date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable7f5216c4() response: body: - string: '{"value":[{"PartitionKey":"pk7f5216c4","RowKey":"rk7f5216c41","Timestamp":"2020-07-30T13:33:28.8912087Z","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"PartitionKey":"pk7f5216c4","RowKey":"rk7f5216c412","Timestamp":"2020-07-30T13:33:28.9752708Z","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"value":[{"PartitionKey":"pk7f5216c4","RowKey":"rk7f5216c41","Timestamp":"2020-09-02T21:17:26.1179418Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"PartitionKey":"pk7f5216c4","RowKey":"rk7f5216c412","Timestamp":"2020-09-02T21:17:26.1489631Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=nometadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:28 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable7f5216c4() + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable7f5216c4() - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable7f5216c4') response: @@ -212,25 +212,27 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:28 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable7f5216c4') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable7f5216c4') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable7f5216c4') response: @@ -239,12 +241,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:29 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('querytable7f5216c4') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('querytable7f5216c4') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_filter.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_filter.yaml index 62d2b7e7fb87e..22ab9f295e577 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_filter.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_filter.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:28 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT location: https://storagename.table.core.windows.net/Tables('uttable800416e8') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk800416e8", "RowKey": "rk800416e8", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk800416e8", "RowKey": "rk800416e8", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable800416e8 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable800416e8/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A29.6529072Z''\"","PartitionKey":"pk800416e8","RowKey":"rk800416e8","Timestamp":"2020-07-30T13:33:29.6529072Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable800416e8/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A26.4155309Z''\"","PartitionKey":"pk800416e8","RowKey":"rk800416e8","Timestamp":"2020-09-02T21:17:26.4155309Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:28 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A29.6529072Z'" + date: Wed, 02 Sep 2020 21:17:25 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A26.4155309Z'" location: https://storagename.table.core.windows.net/uttable800416e8(PartitionKey='pk800416e8',RowKey='rk800416e8') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable800416e8 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable800416e8 - request: body: null headers: @@ -88,41 +87,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable800416e8() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable800416e8","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A29.6529072Z''\"","PartitionKey":"pk800416e8","RowKey":"rk800416e8","Timestamp":"2020-07-30T13:33:29.6529072Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable800416e8","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A26.4155309Z''\"","PartitionKey":"pk800416e8","RowKey":"rk800416e8","Timestamp":"2020-09-02T21:17:26.4155309Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:28 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable800416e8() + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable800416e8() - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable800416e8') response: @@ -131,12 +132,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:28 GMT + date: Wed, 02 Sep 2020 21:17:25 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable800416e8') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable800416e8') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_select.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_select.yaml index 3df27b7389292..5678dbcabd818 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_select.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_select.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:30 GMT + - Wed, 02 Sep 2020 21:17:25 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:30 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT location: https://storagename.table.core.windows.net/Tables('uttable800f16e2') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"TableName": "querytable800f16e2"}' headers: @@ -48,13 +48,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -63,104 +63,102 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:30 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT location: https://storagename.table.core.windows.net/Tables('querytable800f16e2') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk800f16e2", "RowKey": "rk800f16e21", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk800f16e2", "RowKey": "rk800f16e21", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable800f16e2 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable800f16e2/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A30.5282919Z''\"","PartitionKey":"pk800f16e2","RowKey":"rk800f16e21","Timestamp":"2020-07-30T13:33:30.5282919Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable800f16e2/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A26.7087442Z''\"","PartitionKey":"pk800f16e2","RowKey":"rk800f16e21","Timestamp":"2020-09-02T21:17:26.7087442Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:30 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A30.5282919Z'" + date: Wed, 02 Sep 2020 21:17:26 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A26.7087442Z'" location: https://storagename.table.core.windows.net/querytable800f16e2(PartitionKey='pk800f16e2',RowKey='rk800f16e21') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable800f16e2 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable800f16e2 - request: - body: '{"PartitionKey": "pk800f16e2", "RowKey": "rk800f16e212", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk800f16e2", "RowKey": "rk800f16e212", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable800f16e2 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable800f16e2/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A30.6073436Z''\"","PartitionKey":"pk800f16e2","RowKey":"rk800f16e212","Timestamp":"2020-07-30T13:33:30.6073436Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable800f16e2/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A26.74477Z''\"","PartitionKey":"pk800f16e2","RowKey":"rk800f16e212","Timestamp":"2020-09-02T21:17:26.74477Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:30 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A30.6073436Z'" + date: Wed, 02 Sep 2020 21:17:26 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A26.74477Z'" location: https://storagename.table.core.windows.net/querytable800f16e2(PartitionKey='pk800f16e2',RowKey='rk800f16e212') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable800f16e2 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable800f16e2 - request: body: null headers: @@ -169,41 +167,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable800f16e2()?$select=age,%20sex response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable800f16e2&$select=age,%20sex","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A30.5282919Z''\"","age@odata.type":"Edm.Int64","age":"39","sex":"male"},{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A30.6073436Z''\"","age@odata.type":"Edm.Int64","age":"39","sex":"male"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable800f16e2&$select=age,%20sex","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A26.7087442Z''\"","age":39,"sex":"male"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A26.74477Z''\"","age":39,"sex":"male"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:30 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable800f16e2()?$select=age,%20sex + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable800f16e2()?$select=age,%20sex - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable800f16e2') response: @@ -212,25 +212,27 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:30 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable800f16e2') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable800f16e2') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable800f16e2') response: @@ -239,12 +241,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:30 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('querytable800f16e2') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('querytable800f16e2') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_top.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_top.yaml index af7f41dca97d6..b456858f8e73f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_top.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_top.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:31 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT location: https://storagename.table.core.windows.net/Tables('uttable3ccf15b5') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"TableName": "querytable3ccf15b5"}' headers: @@ -48,13 +48,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -63,148 +63,145 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT location: https://storagename.table.core.windows.net/Tables('querytable3ccf15b5') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk3ccf15b5", "RowKey": "rk3ccf15b51", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk3ccf15b5", "RowKey": "rk3ccf15b51", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable3ccf15b5 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A31.3262287Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b51","Timestamp":"2020-07-30T13:33:31.3262287Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.062147Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b51","Timestamp":"2020-09-02T21:17:27.062147Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A31.3262287Z'" + date: Wed, 02 Sep 2020 21:17:26 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A27.062147Z'" location: https://storagename.table.core.windows.net/querytable3ccf15b5(PartitionKey='pk3ccf15b5',RowKey='rk3ccf15b51') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable3ccf15b5 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable3ccf15b5 - request: - body: '{"PartitionKey": "pk3ccf15b5", "RowKey": "rk3ccf15b512", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk3ccf15b5", "RowKey": "rk3ccf15b512", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable3ccf15b5 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A31.4082838Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b512","Timestamp":"2020-07-30T13:33:31.4082838Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.0931693Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b512","Timestamp":"2020-09-02T21:17:27.0931693Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A31.4082838Z'" + date: Wed, 02 Sep 2020 21:17:26 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A27.0931693Z'" location: https://storagename.table.core.windows.net/querytable3ccf15b5(PartitionKey='pk3ccf15b5',RowKey='rk3ccf15b512') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable3ccf15b5 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable3ccf15b5 - request: - body: '{"PartitionKey": "pk3ccf15b5", "RowKey": "rk3ccf15b5123", "age": "39", - "age@odata.type": "Edm.Int64", "sex": "male", "married": true, "deceased": false, - "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", - "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": - "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", - "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk3ccf15b5", "RowKey": "rk3ccf15b5123", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '540' + - '472' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable3ccf15b5 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A31.4863362Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b5123","Timestamp":"2020-07-30T13:33:31.4863362Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.1241911Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b5123","Timestamp":"2020-09-02T21:17:27.1241911Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A31.4863362Z'" + date: Wed, 02 Sep 2020 21:17:26 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A27.1241911Z'" location: https://storagename.table.core.windows.net/querytable3ccf15b5(PartitionKey='pk3ccf15b5',RowKey='rk3ccf15b5123') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable3ccf15b5 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable3ccf15b5 - request: body: null headers: @@ -213,32 +210,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable3ccf15b5()?$top=2 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A31.3262287Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b51","Timestamp":"2020-07-30T13:33:31.3262287Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A31.4082838Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b512","Timestamp":"2020-07-30T13:33:31.4082838Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.062147Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b51","Timestamp":"2020-09-02T21:17:27.062147Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.0931693Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b512","Timestamp":"2020-09-02T21:17:27.0931693Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff x-ms-continuation-nextpartitionkey: 1!16!cGszY2NmMTViNQ-- x-ms-continuation-nextrowkey: 1!20!cmszY2NmMTViNTEyMw-- - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable3ccf15b5()?$top=2 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable3ccf15b5()?$top=2 - request: body: null headers: @@ -247,41 +244,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable3ccf15b5()?$top=2&NextPartitionKey=1!16!cGszY2NmMTViNQ--&NextRowKey=1!20!cmszY2NmMTViNTEyMw-- response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A31.4863362Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b5123","Timestamp":"2020-07-30T13:33:31.4863362Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable3ccf15b5","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.1241911Z''\"","PartitionKey":"pk3ccf15b5","RowKey":"rk3ccf15b5123","Timestamp":"2020-09-02T21:17:27.1241911Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable3ccf15b5()?$top=2&NextPartitionKey=1!16!cGszY2NmMTViNQ--&NextRowKey=1!20!cmszY2NmMTViNTEyMw-- + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable3ccf15b5()?$top=2&NextPartitionKey=1!16!cGszY2NmMTViNQ--&NextRowKey=1!20!cmszY2NmMTViNTEyMw-- - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable3ccf15b5') response: @@ -290,25 +289,27 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:31 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable3ccf15b5') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable3ccf15b5') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable3ccf15b5') response: @@ -317,12 +318,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:31 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('querytable3ccf15b5') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('querytable3ccf15b5') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_top_and_next.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_top_and_next.yaml index 0fedde43bb5a9..14aa40f194c7a 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_top_and_next.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_entities_with_top_and_next.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:32 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT location: https://storagename.table.core.windows.net/Tables('uttable121a1965') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"TableName": "querytable121a1965"}' headers: @@ -48,13 +48,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -63,236 +63,231 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:31 GMT + date: Wed, 02 Sep 2020 21:17:26 GMT location: https://storagename.table.core.windows.net/Tables('querytable121a1965') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a19651", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a19651", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '538' + - '470' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable121a1965 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.3079379Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a19651","Timestamp":"2020-07-30T13:33:32.3079379Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.4531617Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a19651","Timestamp":"2020-09-02T21:17:27.4531617Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A32.3079379Z'" + date: Wed, 02 Sep 2020 21:17:26 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A27.4531617Z'" location: https://storagename.table.core.windows.net/querytable121a1965(PartitionKey='pk121a1965',RowKey='rk121a19651') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable121a1965 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable121a1965 - request: - body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a196512", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a196512", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '539' + - '471' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable121a1965 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.3849929Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a196512","Timestamp":"2020-07-30T13:33:32.3849929Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.5021959Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a196512","Timestamp":"2020-09-02T21:17:27.5021959Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A32.3849929Z'" + date: Wed, 02 Sep 2020 21:17:27 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A27.5021959Z'" location: https://storagename.table.core.windows.net/querytable121a1965(PartitionKey='pk121a1965',RowKey='rk121a196512') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable121a1965 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable121a1965 - request: - body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a1965123", "age": "39", - "age@odata.type": "Edm.Int64", "sex": "male", "married": true, "deceased": false, - "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", - "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": - "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", - "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a1965123", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '540' + - '472' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable121a1965 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.4630479Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a1965123","Timestamp":"2020-07-30T13:33:32.4630479Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.5322162Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a1965123","Timestamp":"2020-09-02T21:17:27.5322162Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A32.4630479Z'" + date: Wed, 02 Sep 2020 21:17:27 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A27.5322162Z'" location: https://storagename.table.core.windows.net/querytable121a1965(PartitionKey='pk121a1965',RowKey='rk121a1965123') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable121a1965 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable121a1965 - request: - body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a19651234", "age": "39", - "age@odata.type": "Edm.Int64", "sex": "male", "married": true, "deceased": false, - "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", - "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": - "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", - "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a19651234", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '541' + - '473' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable121a1965 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.5411024Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a19651234","Timestamp":"2020-07-30T13:33:32.5411024Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.5642384Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a19651234","Timestamp":"2020-09-02T21:17:27.5642384Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A32.5411024Z'" + date: Wed, 02 Sep 2020 21:17:27 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A27.5642384Z'" location: https://storagename.table.core.windows.net/querytable121a1965(PartitionKey='pk121a1965',RowKey='rk121a19651234') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable121a1965 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable121a1965 - request: - body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a196512345", "age": "39", - "age@odata.type": "Edm.Int64", "sex": "male", "married": true, "deceased": false, - "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", - "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": - "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", - "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk121a1965", "RowKey": "rk121a196512345", "age": 39, + "sex": "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": + 3.0, "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '542' + - '474' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/querytable121a1965 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.6241603Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a196512345","Timestamp":"2020-07-30T13:33:32.6241603Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.6062679Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a196512345","Timestamp":"2020-09-02T21:17:27.6062679Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A32.6241603Z'" + date: Wed, 02 Sep 2020 21:17:27 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A27.6062679Z'" location: https://storagename.table.core.windows.net/querytable121a1965(PartitionKey='pk121a1965',RowKey='rk121a196512345') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable121a1965 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable121a1965 - request: body: null headers: @@ -301,32 +296,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:26 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable121a1965()?$top=2 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.3079379Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a19651","Timestamp":"2020-07-30T13:33:32.3079379Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.3849929Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a196512","Timestamp":"2020-07-30T13:33:32.3849929Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.4531617Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a19651","Timestamp":"2020-09-02T21:17:27.4531617Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.5021959Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a196512","Timestamp":"2020-09-02T21:17:27.5021959Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff x-ms-continuation-nextpartitionkey: 1!16!cGsxMjFhMTk2NQ-- x-ms-continuation-nextrowkey: 1!20!cmsxMjFhMTk2NTEyMw-- - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable121a1965()?$top=2 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable121a1965()?$top=2 - request: body: null headers: @@ -335,32 +330,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable121a1965()?$top=2&NextPartitionKey=1!16!cGsxMjFhMTk2NQ--&NextRowKey=1!20!cmsxMjFhMTk2NTEyMw-- response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.4630479Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a1965123","Timestamp":"2020-07-30T13:33:32.4630479Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.5411024Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a19651234","Timestamp":"2020-07-30T13:33:32.5411024Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.5322162Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a1965123","Timestamp":"2020-09-02T21:17:27.5322162Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.5642384Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a19651234","Timestamp":"2020-09-02T21:17:27.5642384Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff x-ms-continuation-nextpartitionkey: 1!16!cGsxMjFhMTk2NQ-- x-ms-continuation-nextrowkey: 1!20!cmsxMjFhMTk2NTEyMzQ1 - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable121a1965()?$top=2&NextPartitionKey=1!16!cGsxMjFhMTk2NQ--&NextRowKey=1!20!cmsxMjFhMTk2NTEyMw-- + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable121a1965()?$top=2&NextPartitionKey=1!16!cGsxMjFhMTk2NQ--&NextRowKey=1!20!cmsxMjFhMTk2NTEyMw-- - request: body: null headers: @@ -369,41 +364,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytable121a1965()?$top=2&NextPartitionKey=1!16!cGsxMjFhMTk2NQ--&NextRowKey=1!20!cmsxMjFhMTk2NTEyMzQ1 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A32.6241603Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a196512345","Timestamp":"2020-07-30T13:33:32.6241603Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable121a1965","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A27.6062679Z''\"","PartitionKey":"pk121a1965","RowKey":"rk121a196512345","Timestamp":"2020-09-02T21:17:27.6062679Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytable121a1965()?$top=2&NextPartitionKey=1!16!cGsxMjFhMTk2NQ--&NextRowKey=1!20!cmsxMjFhMTk2NTEyMzQ1 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytable121a1965()?$top=2&NextPartitionKey=1!16!cGsxMjFhMTk2NQ--&NextRowKey=1!20!cmsxMjFhMTk2NTEyMzQ1 - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:33 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable121a1965') response: @@ -412,25 +409,27 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:32 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable121a1965') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable121a1965') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytable121a1965') response: @@ -439,12 +438,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:32 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('querytable121a1965') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('querytable121a1965') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_zero_entities.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_zero_entities.yaml index e85ccf3abfcb6..e842d0e460972 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_zero_entities.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_query_zero_entities.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT location: https://storagename.table.core.windows.net/Tables('uttablee8d41407') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"TableName": "querytablee8d41407"}' headers: @@ -48,13 +48,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -63,16 +63,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT location: https://storagename.table.core.windows.net/Tables('querytablee8d41407') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: null headers: @@ -81,13 +81,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/querytablee8d41407() response: @@ -96,26 +96,28 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:32 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/querytablee8d41407() + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/querytablee8d41407() - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee8d41407') response: @@ -124,25 +126,27 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:33 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablee8d41407') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablee8d41407') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('querytablee8d41407') response: @@ -151,12 +155,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:33 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('querytablee8d41407') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('querytablee8d41407') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add.yaml index 3b20767dc4ccc..1ffb2172ef272 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:34 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:33 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT location: https://storagename.table.core.windows.net/Tables('uttable13ae0ebd') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk13ae0ebd", "RowKey": "rk13ae0ebd", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk13ae0ebd", "RowKey": "rk13ae0ebd", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST - uri: https://storagename.table.core.windows.net/uttable13ae0ebd?st=2020-07-30T13:32:35Z&se=2020-07-30T14:33:35Z&sp=a&sv=2019-07-07&tn=uttable13ae0ebd&sig=WxzHZgYHDTlzLoEOhOtqM2qCfpzt/sMOfTbaHPOn58s%3D + uri: https://storagename.table.core.windows.net/uttable13ae0ebd?st=2020-09-02T21:16:27Z&se=2020-09-02T22:17:27Z&sp=a&sv=2019-02-02&tn=uttable13ae0ebd&sig=LSYPmJm9PKR9V1UlbPOADxXyv6EcsFUlA8klhxFR1hA%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable13ae0ebd/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A34.3757525Z''\"","PartitionKey":"pk13ae0ebd","RowKey":"rk13ae0ebd","Timestamp":"2020-07-30T13:33:34.3757525Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable13ae0ebd/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A28.4142168Z''\"","PartitionKey":"pk13ae0ebd","RowKey":"rk13ae0ebd","Timestamp":"2020-09-02T21:17:28.4142168Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:33 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A34.3757525Z'" + date: Wed, 02 Sep 2020 21:17:28 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A28.4142168Z'" location: https://storagename.table.core.windows.net/uttable13ae0ebd(PartitionKey='pk13ae0ebd',RowKey='rk13ae0ebd') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable13ae0ebd?st=2020-07-30T13:32:35Z&se=2020-07-30T14:33:35Z&sp=a&sv=2019-07-07&tn=uttable13ae0ebd&sig=WxzHZgYHDTlzLoEOhOtqM2qCfpzt/sMOfTbaHPOn58s%3D + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable13ae0ebd?st=2020-09-02T21:16:27Z&se=2020-09-02T22:17:27Z&sp=a&sv=2019-02-02&tn=uttable13ae0ebd&sig=LSYPmJm9PKR9V1UlbPOADxXyv6EcsFUlA8klhxFR1hA%3D - request: body: null headers: @@ -88,42 +87,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable13ae0ebd(PartitionKey='pk13ae0ebd',RowKey='rk13ae0ebd') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable13ae0ebd/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A34.3757525Z''\"","PartitionKey":"pk13ae0ebd","RowKey":"rk13ae0ebd","Timestamp":"2020-07-30T13:33:34.3757525Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable13ae0ebd/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A28.4142168Z''\"","PartitionKey":"pk13ae0ebd","RowKey":"rk13ae0ebd","Timestamp":"2020-09-02T21:17:28.4142168Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:33 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A34.3757525Z'" + date: Wed, 02 Sep 2020 21:17:27 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A28.4142168Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable13ae0ebd(PartitionKey='pk13ae0ebd',RowKey='rk13ae0ebd') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable13ae0ebd(PartitionKey='pk13ae0ebd',RowKey='rk13ae0ebd') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable13ae0ebd') response: @@ -132,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:33 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable13ae0ebd') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable13ae0ebd') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add_inside_range.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add_inside_range.yaml index 24a27ff11755d..7e43b7a825965 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add_inside_range.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add_inside_range.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:27 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:27 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:34 GMT + date: Wed, 02 Sep 2020 21:17:27 GMT location: https://storagename.table.core.windows.net/Tables('uttablef8471404') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "test", "RowKey": "test1", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", + body: '{"PartitionKey": "test", "RowKey": "test1", "age": 39, "sex": "male", "married": + true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, "large": 933311100, + "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": + "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", + "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '526' + - '458' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:35 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST - uri: https://storagename.table.core.windows.net/uttablef8471404?se=2020-07-30T14:33:35Z&sp=a&sv=2019-07-07&tn=uttablef8471404&spk=test&srk=test1&epk=test&erk=test1&sig=7duoTvsLWKu/FhiLqPQM5VxWnCc/a4fARPfYUuPOqZw%3D + uri: https://storagename.table.core.windows.net/uttablef8471404?se=2020-09-02T22:17:28Z&sp=a&sv=2019-02-02&tn=uttablef8471404&spk=test&srk=test1&epk=test&erk=test1&sig=Fo9h2wnxUtw9RwEs7tEgxTJ6Dj5C%2BeHhYJOFfn45BNI%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef8471404/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A35.2671919Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-07-30T13:33:35.2671919Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef8471404/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A28.8023358Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-09-02T21:17:28.8023358Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:34 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A35.2671919Z'" + date: Wed, 02 Sep 2020 21:17:28 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A28.8023358Z'" location: https://storagename.table.core.windows.net/uttablef8471404(PartitionKey='test',RowKey='test1') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablef8471404?se=2020-07-30T14:33:35Z&sp=a&sv=2019-07-07&tn=uttablef8471404&spk=test&srk=test1&epk=test&erk=test1&sig=7duoTvsLWKu/FhiLqPQM5VxWnCc/a4fARPfYUuPOqZw%3D + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablef8471404?se=2020-09-02T22:17:28Z&sp=a&sv=2019-02-02&tn=uttablef8471404&spk=test&srk=test1&epk=test&erk=test1&sig=Fo9h2wnxUtw9RwEs7tEgxTJ6Dj5C%2BeHhYJOFfn45BNI%3D - request: body: null headers: @@ -88,42 +87,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:36 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:36 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablef8471404(PartitionKey='test',RowKey='test1') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef8471404/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A35.2671919Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-07-30T13:33:35.2671919Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef8471404/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A28.8023358Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2020-09-02T21:17:28.8023358Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:34 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A35.2671919Z'" + date: Wed, 02 Sep 2020 21:17:28 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A28.8023358Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablef8471404(PartitionKey='test',RowKey='test1') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablef8471404(PartitionKey='test',RowKey='test1') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:36 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:36 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablef8471404') response: @@ -132,12 +133,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:35 GMT + date: Wed, 02 Sep 2020 21:17:28 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablef8471404') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablef8471404') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add_outside_range.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add_outside_range.yaml index b3ccdbcfd5056..1df71ec118b18 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add_outside_range.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_add_outside_range.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:36 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:36 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,70 +26,71 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:35 GMT + date: Wed, 02 Sep 2020 21:17:28 GMT location: https://storagename.table.core.windows.net/Tables('uttablede71485') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pkde71485", "RowKey": "rkde71485", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkde71485", "RowKey": "rkde71485", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '535' + - '467' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:36 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:36 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST - uri: https://storagename.table.core.windows.net/uttablede71485?se=2020-07-30T14:33:36Z&sp=a&sv=2019-07-07&tn=uttablede71485&spk=test&srk=test1&epk=test&erk=test1&sig=TwwbtbiFSisOHC74dgcQHfcipNxl2Nw15ydMVKpJ9U4%3D + uri: https://storagename.table.core.windows.net/uttablede71485?se=2020-09-02T22:17:28Z&sp=a&sv=2019-02-02&tn=uttablede71485&spk=test&srk=test1&epk=test&erk=test1&sig=yFn3Zhs4Sdj4KeFJiQkOTlSpLwEI7NrX4s/1kLalTI%3D response: body: string: '{"odata.error":{"code":"AuthorizationFailure","message":{"lang":"en-US","value":"This - request is not authorized to perform this operation.\nRequestId:552d0ca1-f002-0073-1f76-667ac9000000\nTime:2020-07-30T13:33:36.0762491Z"}}}' + request is not authorized to perform this operation.\nRequestId:a2288f58-c002-000c-5e6e-813090000000\nTime:2020-09-02T21:17:29.1791618Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:35 GMT + date: Wed, 02 Sep 2020 21:17:28 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 403 message: Forbidden - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablede71485?se=2020-07-30T14:33:36Z&sp=a&sv=2019-07-07&tn=uttablede71485&spk=test&srk=test1&epk=test&erk=test1&sig=TwwbtbiFSisOHC74dgcQHfcipNxl2Nw15ydMVKpJ9U4%3D + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablede71485?se=2020-09-02T22:17:28Z&sp=a&sv=2019-02-02&tn=uttablede71485&spk=test&srk=test1&epk=test&erk=test1&sig=yFn3Zhs4Sdj4KeFJiQkOTlSpLwEI7NrX4s//1kLalTI%3D - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablede71485') response: @@ -98,12 +99,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:35 GMT + date: Wed, 02 Sep 2020 21:17:28 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablede71485') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablede71485') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_delete.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_delete.yaml index 92a1f00000706..f8a5d62b712ee 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_delete.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_delete.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,91 +26,92 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:35 GMT + date: Wed, 02 Sep 2020 21:17:28 GMT location: https://storagename.table.core.windows.net/Tables('uttable42981007') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk42981007", "RowKey": "rk42981007", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk42981007", "RowKey": "rk42981007", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable42981007 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42981007/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A36.5681979Z''\"","PartitionKey":"pk42981007","RowKey":"rk42981007","Timestamp":"2020-07-30T13:33:36.5681979Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42981007/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A29.380468Z''\"","PartitionKey":"pk42981007","RowKey":"rk42981007","Timestamp":"2020-09-02T21:17:29.380468Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:35 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A36.5681979Z'" + date: Wed, 02 Sep 2020 21:17:28 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A29.380468Z'" location: https://storagename.table.core.windows.net/uttable42981007(PartitionKey='pk42981007',RowKey='rk42981007') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42981007 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42981007 - request: body: null headers: + Accept: + - application/json;odata=minimalmetadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE - uri: https://storagename.table.core.windows.net/uttable42981007(PartitionKey='pk42981007',RowKey='rk42981007')?se=2020-07-30T14:33:37Z&sp=d&sv=2019-07-07&tn=uttable42981007&sig=4Z9kxh5oJNJvciPDm3x52tEKQ7RkjwQ6dz2/zZIBHAo%3D + uri: https://storagename.table.core.windows.net/uttable42981007(PartitionKey='pk42981007',RowKey='rk42981007')?se=2020-09-02T22:17:28Z&sp=d&sv=2019-02-02&tn=uttable42981007&sig=l1kyYslGOYZlxSQsQO9iFIIrp45OxHXT92ZqnkY%2Bdy0%3D response: body: string: '' headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:36 GMT + date: Wed, 02 Sep 2020 21:17:29 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42981007(PartitionKey='pk42981007',RowKey='rk42981007')?se=2020-07-30T14:33:37Z&sp=d&sv=2019-07-07&tn=uttable42981007&sig=4Z9kxh5oJNJvciPDm3x52tEKQ7RkjwQ6dz2/zZIBHAo%3D + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42981007(PartitionKey='pk42981007',RowKey='rk42981007')?se=2020-09-02T22:17:28Z&sp=d&sv=2019-02-02&tn=uttable42981007&sig=l1kyYslGOYZlxSQsQO9iFIIrp45OxHXT92ZqnkY%2Bdy0%3D - request: body: null headers: @@ -119,42 +120,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:37 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable42981007(PartitionKey='pk42981007',RowKey='rk42981007') response: body: string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:ab8779d8-d002-004d-5a76-66cce8000000\nTime:2020-07-30T13:33:36.9524748Z"}}}' + specified resource does not exist.\nRequestId:950e94ab-d002-0031-3d6e-8185b6000000\nTime:2020-09-02T21:17:29.5706019Z"}}}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:36 GMT + date: Wed, 02 Sep 2020 21:17:28 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 404 message: Not Found - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42981007(PartitionKey='pk42981007',RowKey='rk42981007') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42981007(PartitionKey='pk42981007',RowKey='rk42981007') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:28 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:28 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable42981007') response: @@ -163,12 +166,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:36 GMT + date: Wed, 02 Sep 2020 21:17:28 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable42981007') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable42981007') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_query.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_query.yaml index 159f9d6cf3551..1167b31f8f21d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_query.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_query.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:29 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:29 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:36 GMT + date: Wed, 02 Sep 2020 21:17:29 GMT location: https://storagename.table.core.windows.net/Tables('uttable331c0fca') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk331c0fca", "RowKey": "rk331c0fca", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk331c0fca", "RowKey": "rk331c0fca", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:29 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:29 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable331c0fca response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable331c0fca/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A37.4490452Z''\"","PartitionKey":"pk331c0fca","RowKey":"rk331c0fca","Timestamp":"2020-07-30T13:33:37.4490452Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable331c0fca/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A29.7829678Z''\"","PartitionKey":"pk331c0fca","RowKey":"rk331c0fca","Timestamp":"2020-09-02T21:17:29.7829678Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:36 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A37.4490452Z'" + date: Wed, 02 Sep 2020 21:17:29 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A29.7829678Z'" location: https://storagename.table.core.windows.net/uttable331c0fca(PartitionKey='pk331c0fca',RowKey='rk331c0fca') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable331c0fca + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable331c0fca - request: body: null headers: @@ -88,41 +87,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:29 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:29 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/uttable331c0fca()?st=2020-07-30T13:32:38Z&se=2020-07-30T14:33:38Z&sp=r&sv=2019-07-07&tn=uttable331c0fca&sig=3rch/4gu9Mvfd4m3oaojF5iruQ8d4qQgSVcSD/GfRIw%3D + uri: https://storagename.table.core.windows.net/uttable331c0fca()?st=2020-09-02T21:16:29Z&se=2020-09-02T22:17:29Z&sp=r&sv=2019-02-02&tn=uttable331c0fca&sig=cDNvVyQR7Ys0a8AENKN6/S7kd9LNlfENxkweV5cbnK0%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable331c0fca","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A37.4490452Z''\"","PartitionKey":"pk331c0fca","RowKey":"rk331c0fca","Timestamp":"2020-07-30T13:33:37.4490452Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable331c0fca","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A29.7829678Z''\"","PartitionKey":"pk331c0fca","RowKey":"rk331c0fca","Timestamp":"2020-09-02T21:17:29.7829678Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:37 GMT + date: Wed, 02 Sep 2020 21:17:29 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable331c0fca()?st=2020-07-30T13:32:38Z&se=2020-07-30T14:33:38Z&sp=r&sv=2019-07-07&tn=uttable331c0fca&sig=3rch/4gu9Mvfd4m3oaojF5iruQ8d4qQgSVcSD/GfRIw%3D + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable331c0fca()?st=2020-09-02T21:16:29Z&se=2020-09-02T22:17:29Z&sp=r&sv=2019-02-02&tn=uttable331c0fca&sig=cDNvVyQR7Ys0a8AENKN6/S7kd9LNlfENxkweV5cbnK0%3D - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:29 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:17:29 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable331c0fca') response: @@ -131,12 +132,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:37 GMT + date: Wed, 02 Sep 2020 21:17:29 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable331c0fca') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable331c0fca') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_signed_identifier.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_signed_identifier.yaml index 7619d39d62fee..885a8a7146957 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_signed_identifier.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_signed_identifier.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:24:58 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:38 GMT + - Wed, 02 Sep 2020 21:24:58 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:37 GMT + date: Wed, 02 Sep 2020 21:24:58 GMT location: https://storagename.table.core.windows.net/Tables('uttablee481490') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstorageow3agmqbfu5b.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pke481490", "RowKey": "rke481490", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pke481490", "RowKey": "rke481490", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '535' + - '467' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:24:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:24:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablee481490 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee481490/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A38.2608037Z''\"","PartitionKey":"pke481490","RowKey":"rke481490","Timestamp":"2020-07-30T13:33:38.2608037Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee481490/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A24%3A59.7394638Z''\"","PartitionKey":"pke481490","RowKey":"rke481490","Timestamp":"2020-09-02T21:24:59.7394638Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:37 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A38.2608037Z'" + date: Wed, 02 Sep 2020 21:24:58 GMT + etag: W/"datetime'2020-09-02T21%3A24%3A59.7394638Z'" location: https://storagename.table.core.windows.net/uttablee481490(PartitionKey='pke481490',RowKey='rke481490') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablee481490 + url: https://pyacrstorageow3agmqbfu5b.table.core.windows.net/uttablee481490 - request: body: ' @@ -92,13 +91,13 @@ interactions: Content-Type: - application/xml Date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:24:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:24:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttablee481490?comp=acl response: @@ -106,13 +105,13 @@ interactions: string: '' headers: content-length: '0' - date: Thu, 30 Jul 2020 13:33:38 GMT + date: Wed, 02 Sep 2020 21:24:58 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablee481490?comp=acl + url: https://pyacrstorageow3agmqbfu5b.table.core.windows.net/uttablee481490?comp=acl - request: body: null headers: @@ -121,41 +120,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:24:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:24:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/uttablee481490()?sv=2019-07-07&si=testid&tn=uttablee481490&sig=RWZ1rGuXKKZLqORU0cZb%2BJNGhO3/2QlfMY0Osw1Ukmo%3D + uri: https://storagename.table.core.windows.net/uttablee481490()?sv=2019-02-02&si=testid&tn=uttablee481490&sig=dsfdRE9/C8atH%2BGSNf7U/WqNgTCttZJcG/E2/LKAcc0%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee481490","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A38.2608037Z''\"","PartitionKey":"pke481490","RowKey":"rke481490","Timestamp":"2020-07-30T13:33:38.2608037Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee481490","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A24%3A59.7394638Z''\"","PartitionKey":"pke481490","RowKey":"rke481490","Timestamp":"2020-09-02T21:24:59.7394638Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:38 GMT + date: Wed, 02 Sep 2020 21:24:59 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablee481490()?sv=2019-07-07&si=testid&tn=uttablee481490&sig=RWZ1rGuXKKZLqORU0cZb%2BJNGhO3/2QlfMY0Osw1Ukmo%3D + url: https://pyacrstorageow3agmqbfu5b.table.core.windows.net/uttablee481490()?sv=2019-02-02&si=testid&tn=uttablee481490&sig=dsfdRE9/C8atH%2BGSNf7U/WqNgTCttZJcG/E2/LKAcc0%3D - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:24:59 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:24:59 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablee481490') response: @@ -164,12 +165,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:38 GMT + date: Wed, 02 Sep 2020 21:24:59 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablee481490') + url: https://pyacrstorageow3agmqbfu5b.table.core.windows.net/Tables('uttablee481490') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_update.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_update.yaml index f224177c6b42a..35af44f12f274 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_update.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_update.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:17:29 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:39 GMT + - Wed, 02 Sep 2020 21:17:29 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:38 GMT + date: Wed, 02 Sep 2020 21:17:29 GMT location: https://storagename.table.core.windows.net/Tables('uttable43091017') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk43091017", "RowKey": "rk43091017", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk43091017", "RowKey": "rk43091017", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:29 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:29 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable43091017 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable43091017/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A39.2403647Z''\"","PartitionKey":"pk43091017","RowKey":"rk43091017","Timestamp":"2020-07-30T13:33:39.2403647Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable43091017/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A30.5327249Z''\"","PartitionKey":"pk43091017","RowKey":"rk43091017","Timestamp":"2020-09-02T21:17:30.5327249Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:38 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A39.2403647Z'" + date: Wed, 02 Sep 2020 21:17:29 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A30.5327249Z'" location: https://storagename.table.core.windows.net/uttable43091017(PartitionKey='pk43091017',RowKey='rk43091017') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable43091017 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable43091017 - request: body: '{"PartitionKey": "pk43091017", "RowKey": "rk43091017", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,32 +93,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:29 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:29 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT - uri: https://storagename.table.core.windows.net/uttable43091017(PartitionKey='pk43091017',RowKey='rk43091017')?se=2020-07-30T14:33:40Z&sp=u&sv=2019-07-07&tn=uttable43091017&sig=/M5WdeL2zW%2B%2Biy3EwaS/ceaedpQXFs0OMKWXRdfnaCs%3D + uri: https://storagename.table.core.windows.net/uttable43091017(PartitionKey='pk43091017',RowKey='rk43091017')?se=2020-09-02T22:17:29Z&sp=u&sv=2019-02-02&tn=uttable43091017&sig=UKI6C1ckS%2BAmPz9uWWu4YEEtsgWGContcCXrf9ULPVI%3D response: body: string: '' headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:39 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A39.5627442Z'" + date: Wed, 02 Sep 2020 21:17:30 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A30.6782293Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable43091017(PartitionKey='pk43091017',RowKey='rk43091017')?se=2020-07-30T14:33:40Z&sp=u&sv=2019-07-07&tn=uttable43091017&sig=/M5WdeL2zW%2B%2Biy3EwaS/ceaedpQXFs0OMKWXRdfnaCs%3D + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable43091017(PartitionKey='pk43091017',RowKey='rk43091017')?se=2020-09-02T22:17:29Z&sp=u&sv=2019-02-02&tn=uttable43091017&sig=UKI6C1ckS%2BAmPz9uWWu4YEEtsgWGContcCXrf9ULPVI%3D - request: body: null headers: @@ -126,42 +127,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable43091017(PartitionKey='pk43091017',RowKey='rk43091017') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable43091017/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A39.5627442Z''\"","PartitionKey":"pk43091017","RowKey":"rk43091017","Timestamp":"2020-07-30T13:33:39.5627442Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable43091017/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A30.6782293Z''\"","PartitionKey":"pk43091017","RowKey":"rk43091017","Timestamp":"2020-09-02T21:17:30.6782293Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:39 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A39.5627442Z'" + date: Wed, 02 Sep 2020 21:17:29 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A30.6782293Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable43091017(PartitionKey='pk43091017',RowKey='rk43091017') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable43091017(PartitionKey='pk43091017',RowKey='rk43091017') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable43091017') response: @@ -170,12 +173,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:39 GMT + date: Wed, 02 Sep 2020 21:17:29 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable43091017') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable43091017') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_upper_case_table_name.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_upper_case_table_name.yaml index 5341421c5fe81..c3b4fe42ff283 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_upper_case_table_name.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_sas_upper_case_table_name.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:40 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,60 +26,59 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:39 GMT + date: Wed, 02 Sep 2020 21:17:30 GMT location: https://storagename.table.core.windows.net/Tables('uttable65261622') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk65261622", "RowKey": "rk65261622", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk65261622", "RowKey": "rk65261622", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable65261622 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65261622/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A40.1430638Z''\"","PartitionKey":"pk65261622","RowKey":"rk65261622","Timestamp":"2020-07-30T13:33:40.1430638Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65261622/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A30.9622954Z''\"","PartitionKey":"pk65261622","RowKey":"rk65261622","Timestamp":"2020-09-02T21:17:30.9622954Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:39 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A40.1430638Z'" + date: Wed, 02 Sep 2020 21:17:30 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A30.9622954Z'" location: https://storagename.table.core.windows.net/uttable65261622(PartitionKey='pk65261622',RowKey='rk65261622') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable65261622 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable65261622 - request: body: null headers: @@ -88,41 +87,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET - uri: https://storagename.table.core.windows.net/uttable65261622()?st=2020-07-30T13:32:41Z&se=2020-07-30T14:33:41Z&sp=r&sv=2019-07-07&tn=UTTABLE65261622&sig=8sgKEU7fUTZ87pIwZNa7aZMUE6bs5YtrYTEBfgSa7Pc%3D + uri: https://storagename.table.core.windows.net/uttable65261622()?st=2020-09-02T21:16:30Z&se=2020-09-02T22:17:30Z&sp=r&sv=2019-02-02&tn=UTTABLE65261622&sig=baEEZGo6JDlzM9kssFbcyDmn2JRRm8JKfskSTjStLJU%3D response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65261622","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A40.1430638Z''\"","PartitionKey":"pk65261622","RowKey":"rk65261622","Timestamp":"2020-07-30T13:33:40.1430638Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65261622","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A30.9622954Z''\"","PartitionKey":"pk65261622","RowKey":"rk65261622","Timestamp":"2020-09-02T21:17:30.9622954Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:39 GMT + date: Wed, 02 Sep 2020 21:17:30 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable65261622()?st=2020-07-30T13:32:41Z&se=2020-07-30T14:33:41Z&sp=r&sv=2019-07-07&tn=UTTABLE65261622&sig=8sgKEU7fUTZ87pIwZNa7aZMUE6bs5YtrYTEBfgSa7Pc%3D + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable65261622()?st=2020-09-02T21:16:30Z&se=2020-09-02T22:17:30Z&sp=r&sv=2019-02-02&tn=UTTABLE65261622&sig=baEEZGo6JDlzM9kssFbcyDmn2JRRm8JKfskSTjStLJU%3D - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable65261622') response: @@ -131,12 +132,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:40 GMT + date: Wed, 02 Sep 2020 21:17:30 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable65261622') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable65261622') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_timezone.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_timezone.yaml index b0c69c3ce162f..e9b3357c8bc02 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_timezone.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_timezone.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:40 GMT + date: Wed, 02 Sep 2020 21:17:30 GMT location: https://storagename.table.core.windows.net/Tables('uttable23a30f59') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk23a30f59", "RowKey": "rk23a30f59", "date": "2003-09-27T09:52:43Z", "date@odata.type": "Edm.DateTime"}' @@ -49,32 +49,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable23a30f59 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable23a30f59/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A40.9211942Z''\"","PartitionKey":"pk23a30f59","RowKey":"rk23a30f59","Timestamp":"2020-07-30T13:33:40.9211942Z","date@odata.type":"Edm.DateTime","date":"2003-09-27T09:52:43Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable23a30f59/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.3002548Z''\"","PartitionKey":"pk23a30f59","RowKey":"rk23a30f59","Timestamp":"2020-09-02T21:17:31.3002548Z","date@odata.type":"Edm.DateTime","date":"2003-09-27T09:52:43Z"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:40 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A40.9211942Z'" + date: Wed, 02 Sep 2020 21:17:30 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A31.3002548Z'" location: https://storagename.table.core.windows.net/uttable23a30f59(PartitionKey='pk23a30f59',RowKey='rk23a30f59') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable23a30f59 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable23a30f59 - request: body: null headers: @@ -83,42 +83,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:41 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable23a30f59(PartitionKey='pk23a30f59',RowKey='rk23a30f59') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable23a30f59/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A40.9211942Z''\"","PartitionKey":"pk23a30f59","RowKey":"rk23a30f59","Timestamp":"2020-07-30T13:33:40.9211942Z","date@odata.type":"Edm.DateTime","date":"2003-09-27T09:52:43Z"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable23a30f59/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.3002548Z''\"","PartitionKey":"pk23a30f59","RowKey":"rk23a30f59","Timestamp":"2020-09-02T21:17:31.3002548Z","date@odata.type":"Edm.DateTime","date":"2003-09-27T09:52:43Z"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:40 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A40.9211942Z'" + date: Wed, 02 Sep 2020 21:17:30 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A31.3002548Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable23a30f59(PartitionKey='pk23a30f59',RowKey='rk23a30f59') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable23a30f59(PartitionKey='pk23a30f59',RowKey='rk23a30f59') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable23a30f59') response: @@ -127,12 +129,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:40 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable23a30f59') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable23a30f59') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_unicode_property_name.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_unicode_property_name.yaml index 088e51bb0e137..97fed46d0d053 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_unicode_property_name.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_unicode_property_name.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:40 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT location: https://storagename.table.core.windows.net/Tables('uttable103b14b9') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk103b14b9", "RowKey": "rk103b14b9", "\u554a\u9f44\u4e02\u72db\u72dc": "\ua015"}' @@ -49,32 +49,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable103b14b9 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable103b14b9/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A41.4943173Z''\"","PartitionKey":"pk103b14b9","RowKey":"rk103b14b9","Timestamp":"2020-07-30T13:33:41.4943173Z","\u554a\u9f44\u4e02\u72db\u72dc":"\ua015"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable103b14b9/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.5755451Z''\"","PartitionKey":"pk103b14b9","RowKey":"rk103b14b9","Timestamp":"2020-09-02T21:17:31.5755451Z","\u554a\u9f44\u4e02\u72db\u72dc":"\ua015"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:40 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A41.4943173Z'" + date: Wed, 02 Sep 2020 21:17:31 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A31.5755451Z'" location: https://storagename.table.core.windows.net/uttable103b14b9(PartitionKey='pk103b14b9',RowKey='rk103b14b9') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable103b14b9 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable103b14b9 - request: body: '{"PartitionKey": "pk103b14b9", "RowKey": "test2", "\u554a\u9f44\u4e02\u72db\u72dc": "hello"}' @@ -88,32 +88,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:30 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:30 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable103b14b9 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable103b14b9/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A41.5763716Z''\"","PartitionKey":"pk103b14b9","RowKey":"test2","Timestamp":"2020-07-30T13:33:41.5763716Z","\u554a\u9f44\u4e02\u72db\u72dc":"hello"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable103b14b9/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.6165747Z''\"","PartitionKey":"pk103b14b9","RowKey":"test2","Timestamp":"2020-09-02T21:17:31.6165747Z","\u554a\u9f44\u4e02\u72db\u72dc":"hello"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:40 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A41.5763716Z'" + date: Wed, 02 Sep 2020 21:17:31 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A31.6165747Z'" location: https://storagename.table.core.windows.net/uttable103b14b9(PartitionKey='pk103b14b9',RowKey='test2') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable103b14b9 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable103b14b9 - request: body: null headers: @@ -122,41 +122,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable103b14b9() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable103b14b9","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A41.4943173Z''\"","PartitionKey":"pk103b14b9","RowKey":"rk103b14b9","Timestamp":"2020-07-30T13:33:41.4943173Z","\u554a\u9f44\u4e02\u72db\u72dc":"\ua015"},{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A41.5763716Z''\"","PartitionKey":"pk103b14b9","RowKey":"test2","Timestamp":"2020-07-30T13:33:41.5763716Z","\u554a\u9f44\u4e02\u72db\u72dc":"hello"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable103b14b9","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.5755451Z''\"","PartitionKey":"pk103b14b9","RowKey":"rk103b14b9","Timestamp":"2020-09-02T21:17:31.5755451Z","\u554a\u9f44\u4e02\u72db\u72dc":"\ua015"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.6165747Z''\"","PartitionKey":"pk103b14b9","RowKey":"test2","Timestamp":"2020-09-02T21:17:31.6165747Z","\u554a\u9f44\u4e02\u72db\u72dc":"hello"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:41 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable103b14b9() + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable103b14b9() - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable103b14b9') response: @@ -165,12 +167,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:41 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable103b14b9') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable103b14b9') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_unicode_property_value.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_unicode_property_value.yaml index 779fda5149a2c..69dbff5129f38 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_unicode_property_value.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_unicode_property_value.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:42 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,16 +26,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:41 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT location: https://storagename.table.core.windows.net/Tables('uttable259e1535') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk259e1535", "RowKey": "rk259e1535", "Description": "\ua015"}' headers: @@ -48,32 +48,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable259e1535 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable259e1535/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A42.1455988Z''\"","PartitionKey":"pk259e1535","RowKey":"rk259e1535","Timestamp":"2020-07-30T13:33:42.1455988Z","Description":"\ua015"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable259e1535/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.8539956Z''\"","PartitionKey":"pk259e1535","RowKey":"rk259e1535","Timestamp":"2020-09-02T21:17:31.8539956Z","Description":"\ua015"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:41 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A42.1455988Z'" + date: Wed, 02 Sep 2020 21:17:31 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A31.8539956Z'" location: https://storagename.table.core.windows.net/uttable259e1535(PartitionKey='pk259e1535',RowKey='rk259e1535') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable259e1535 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable259e1535 - request: body: '{"PartitionKey": "pk259e1535", "RowKey": "test2", "Description": "\ua015"}' headers: @@ -86,32 +86,32 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable259e1535 response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable259e1535/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A42.2226551Z''\"","PartitionKey":"pk259e1535","RowKey":"test2","Timestamp":"2020-07-30T13:33:42.2226551Z","Description":"\ua015"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable259e1535/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.8840166Z''\"","PartitionKey":"pk259e1535","RowKey":"test2","Timestamp":"2020-09-02T21:17:31.8840166Z","Description":"\ua015"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:42 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A42.2226551Z'" + date: Wed, 02 Sep 2020 21:17:31 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A31.8840166Z'" location: https://storagename.table.core.windows.net/uttable259e1535(PartitionKey='pk259e1535',RowKey='test2') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable259e1535 + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable259e1535 - request: body: null headers: @@ -120,41 +120,43 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable259e1535() response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable259e1535","value":[{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A42.1455988Z''\"","PartitionKey":"pk259e1535","RowKey":"rk259e1535","Timestamp":"2020-07-30T13:33:42.1455988Z","Description":"\ua015"},{"odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A42.2226551Z''\"","PartitionKey":"pk259e1535","RowKey":"test2","Timestamp":"2020-07-30T13:33:42.2226551Z","Description":"\ua015"}]}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable259e1535","value":[{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.8539956Z''\"","PartitionKey":"pk259e1535","RowKey":"rk259e1535","Timestamp":"2020-09-02T21:17:31.8539956Z","Description":"\ua015"},{"odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A31.8840166Z''\"","PartitionKey":"pk259e1535","RowKey":"test2","Timestamp":"2020-09-02T21:17:31.8840166Z","Description":"\ua015"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:42 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable259e1535() + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable259e1535() - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable259e1535') response: @@ -163,12 +165,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:42 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable259e1535') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable259e1535') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity.yaml index 0d134f54739d4..bc3e8c5618093 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:42 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT location: https://storagename.table.core.windows.net/Tables('uttable75d9116d') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk75d9116d", "RowKey": "rk75d9116d", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk75d9116d", "RowKey": "rk75d9116d", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable75d9116d response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable75d9116d/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A42.8016945Z''\"","PartitionKey":"pk75d9116d","RowKey":"rk75d9116d","Timestamp":"2020-07-30T13:33:42.8016945Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable75d9116d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A32.1575269Z''\"","PartitionKey":"pk75d9116d","RowKey":"rk75d9116d","Timestamp":"2020-09-02T21:17:32.1575269Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:42 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A42.8016945Z'" + date: Wed, 02 Sep 2020 21:17:31 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A32.1575269Z'" location: https://storagename.table.core.windows.net/uttable75d9116d(PartitionKey='pk75d9116d',RowKey='rk75d9116d') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable75d9116d + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable75d9116d - request: body: '{"PartitionKey": "pk75d9116d", "RowKey": "rk75d9116d", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,15 +93,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttable75d9116d(PartitionKey='pk75d9116d',RowKey='rk75d9116d') response: @@ -109,15 +110,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:42 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A42.8821308Z'" + date: Wed, 02 Sep 2020 21:17:31 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A32.1982687Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable75d9116d(PartitionKey='pk75d9116d',RowKey='rk75d9116d') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable75d9116d(PartitionKey='pk75d9116d',RowKey='rk75d9116d') - request: body: null headers: @@ -126,42 +127,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:43 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttable75d9116d(PartitionKey='pk75d9116d',RowKey='rk75d9116d') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable75d9116d/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A42.8821308Z''\"","PartitionKey":"pk75d9116d","RowKey":"rk75d9116d","Timestamp":"2020-07-30T13:33:42.8821308Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable75d9116d/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A32.1982687Z''\"","PartitionKey":"pk75d9116d","RowKey":"rk75d9116d","Timestamp":"2020-09-02T21:17:32.1982687Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:42 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A42.8821308Z'" + date: Wed, 02 Sep 2020 21:17:31 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A32.1982687Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable75d9116d(PartitionKey='pk75d9116d',RowKey='rk75d9116d') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable75d9116d(PartitionKey='pk75d9116d',RowKey='rk75d9116d') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable75d9116d') response: @@ -170,12 +173,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:42 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable75d9116d') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable75d9116d') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_not_existing.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_not_existing.yaml index 3c820f4b0c608..b35c447cec579 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_not_existing.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_not_existing.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,21 +26,23 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:43 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT location: https://storagename.table.core.windows.net/Tables('uttable7e8316e7') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: body: '{"PartitionKey": "pk7e8316e7", "RowKey": "rk7e8316e7", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -48,48 +50,46 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT If-Match: - '*' User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttable7e8316e7(PartitionKey='pk7e8316e7',RowKey='rk7e8316e7') response: body: - string: 'ResourceNotFoundThe specified resource does not exist. - - RequestId:7fdb0557-b002-0012-6176-663e16000000 - - Time:2020-07-30T13:33:43.4765134Z' + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:8403cf8e-1002-0063-196e-819844000000\nTime:2020-09-02T21:17:32.4349938Z"}}}' headers: cache-control: no-cache - content-type: application/xml;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:43 GMT + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:31 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 404 message: Not Found - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable7e8316e7(PartitionKey='pk7e8316e7',RowKey='rk7e8316e7') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable7e8316e7(PartitionKey='pk7e8316e7',RowKey='rk7e8316e7') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable7e8316e7') response: @@ -98,12 +98,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:43 GMT + date: Wed, 02 Sep 2020 21:17:31 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable7e8316e7') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable7e8316e7') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_with_if_doesnt_match.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_with_if_doesnt_match.yaml index d6aa209277dbc..6458d58a9ff60 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_with_if_doesnt_match.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_with_if_doesnt_match.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:31 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:43 GMT + date: Wed, 02 Sep 2020 21:17:32 GMT location: https://storagename.table.core.windows.net/Tables('uttable42cf1a0e') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pk42cf1a0e", "RowKey": "rk42cf1a0e", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pk42cf1a0e", "RowKey": "rk42cf1a0e", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:32 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:44 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttable42cf1a0e response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42cf1a0e/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A43.9720295Z''\"","PartitionKey":"pk42cf1a0e","RowKey":"rk42cf1a0e","Timestamp":"2020-07-30T13:33:43.9720295Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable42cf1a0e/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A32.6495029Z''\"","PartitionKey":"pk42cf1a0e","RowKey":"rk42cf1a0e","Timestamp":"2020-09-02T21:17:32.6495029Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:43 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A43.9720295Z'" + date: Wed, 02 Sep 2020 21:17:32 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A32.6495029Z'" location: https://storagename.table.core.windows.net/uttable42cf1a0e(PartitionKey='pk42cf1a0e',RowKey='rk42cf1a0e') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42cf1a0e + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42cf1a0e - request: body: '{"PartitionKey": "pk42cf1a0e", "RowKey": "rk42cf1a0e", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,48 +93,46 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT If-Match: - W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttable42cf1a0e(PartitionKey='pk42cf1a0e',RowKey='rk42cf1a0e') response: body: - string: 'UpdateConditionNotSatisfiedThe update condition specified in the request was not satisfied. - - RequestId:d60563e1-d002-006f-1976-66a2de000000 - - Time:2020-07-30T13:33:44.0560854Z' + string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The + update condition specified in the request was not satisfied.\nRequestId:a161c4c9-2002-0060-6b6e-819b43000000\nTime:2020-09-02T21:17:32.6875300Z"}}}' headers: cache-control: no-cache - content-type: application/xml;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:43 GMT + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Wed, 02 Sep 2020 21:17:32 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 412 message: Precondition Failed - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttable42cf1a0e(PartitionKey='pk42cf1a0e',RowKey='rk42cf1a0e') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttable42cf1a0e(PartitionKey='pk42cf1a0e',RowKey='rk42cf1a0e') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttable42cf1a0e') response: @@ -142,12 +141,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:43 GMT + date: Wed, 02 Sep 2020 21:17:33 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttable42cf1a0e') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttable42cf1a0e') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_with_if_matches.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_with_if_matches.yaml index 2451cec2d1ef2..0af26ff9a733d 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_with_if_matches.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_entity_async.test_update_entity_with_if_matches.yaml @@ -11,13 +11,13 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/Tables response: @@ -26,65 +26,66 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:43 GMT + date: Wed, 02 Sep 2020 21:17:32 GMT location: https://storagename.table.core.windows.net/Tables('uttablec46617fa') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables - request: - body: '{"PartitionKey": "pkc46617fa", "RowKey": "rkc46617fa", "age": "39", "age@odata.type": - "Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1, - "evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday": - "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", - "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": - "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", - "clsid@odata.type": "Edm.Guid"}' + body: '{"PartitionKey": "pkc46617fa", "RowKey": "rkc46617fa", "age": 39, "sex": + "male", "married": true, "deceased": false, "ratio": 3.1, "evenratio": 3.0, + "large": 933311100, "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": + "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' headers: Accept: - application/json;odata=minimalmetadata Content-Length: - - '537' + - '469' Content-Type: - application/json;odata=nometadata DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: POST uri: https://storagename.table.core.windows.net/uttablec46617fa response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec46617fa/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A44.565449Z''\"","PartitionKey":"pkc46617fa","RowKey":"rkc46617fa","Timestamp":"2020-07-30T13:33:44.565449Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec46617fa/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A33.2071468Z''\"","PartitionKey":"pkc46617fa","RowKey":"rkc46617fa","Timestamp":"2020-09-02T21:17:33.2071468Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:43 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A44.565449Z'" + date: Wed, 02 Sep 2020 21:17:32 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A33.2071468Z'" location: https://storagename.table.core.windows.net/uttablec46617fa(PartitionKey='pkc46617fa',RowKey='rkc46617fa') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 201 message: Created - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablec46617fa + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablec46617fa - request: body: '{"PartitionKey": "pkc46617fa", "RowKey": "rkc46617fa", "age": "abc", "sex": "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime"}' headers: + Accept: + - application/json Content-Length: - '180' Content-Type: @@ -92,15 +93,15 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT If-Match: - - W/"datetime'2020-07-30T13%3A33%3A44.565449Z'" + - W/"datetime'2020-09-02T21%3A17%3A33.2071468Z'" User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/uttablec46617fa(PartitionKey='pkc46617fa',RowKey='rkc46617fa') response: @@ -109,15 +110,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:43 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A44.6504014Z'" + date: Wed, 02 Sep 2020 21:17:32 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A33.2379829Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablec46617fa(PartitionKey='pkc46617fa',RowKey='rkc46617fa') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablec46617fa(PartitionKey='pkc46617fa',RowKey='rkc46617fa') - request: body: null headers: @@ -126,42 +127,44 @@ interactions: DataServiceVersion: - '3.0' Date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/uttablec46617fa(PartitionKey='pkc46617fa',RowKey='rkc46617fa') response: body: - string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec46617fa/@Element","odata.etag":"W/\"datetime''2020-07-30T13%3A33%3A44.6504014Z''\"","PartitionKey":"pkc46617fa","RowKey":"rkc46617fa","Timestamp":"2020-07-30T13:33:44.6504014Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablec46617fa/@Element","odata.etag":"W/\"datetime''2020-09-02T21%3A17%3A33.2379829Z''\"","PartitionKey":"pkc46617fa","RowKey":"rkc46617fa","Timestamp":"2020-09-02T21:17:33.2379829Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Thu, 30 Jul 2020 13:33:43 GMT - etag: W/"datetime'2020-07-30T13%3A33%3A44.6504014Z'" + date: Wed, 02 Sep 2020 21:17:32 GMT + etag: W/"datetime'2020-09-02T21%3A17%3A33.2379829Z'" server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/uttablec46617fa(PartitionKey='pkc46617fa',RowKey='rkc46617fa') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/uttablec46617fa(PartitionKey='pkc46617fa',RowKey='rkc46617fa') - request: body: null headers: + Accept: + - application/json Date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 30 Jul 2020 13:33:45 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: DELETE uri: https://storagename.table.core.windows.net/Tables('uttablec46617fa') response: @@ -170,12 +173,12 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 30 Jul 2020 13:33:44 GMT + date: Wed, 02 Sep 2020 21:17:32 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: nosniff - x-ms-version: '2019-07-07' + x-ms-version: '2019-02-02' status: code: 204 message: No Content - url: https://pyacrstorageubqarxe6dhep.table.core.windows.net/Tables('uttablec46617fa') + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/Tables('uttablec46617fa') version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_retention_too_long.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_retention_too_long.yaml index 2261cd4e7fdfe..6575896294b1c 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_retention_too_long.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_retention_too_long.yaml @@ -5,7 +5,7 @@ interactions: 1.0truetruetrue366' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -15,13 +15,13 @@ interactions: Content-Type: - application/xml Date: - - Mon, 27 Jul 2020 14:13:17 GMT + - Wed, 02 Sep 2020 21:17:32 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:13:17 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -29,22 +29,22 @@ interactions: string: 'InvalidXmlDocumentXML specified is not syntactically valid. - RequestId:64885058-b002-006e-2a20-647748000000 + RequestId:7cb77e92-3002-0030-636e-81844b000000 - Time:2020-07-27T14:13:17.6459931Z' + Time:2020-09-02T21:17:33.5056313Z' headers: content-length: - '327' content-type: - application/xml date: - - Mon, 27 Jul 2020 14:13:17 GMT + - Wed, 02 Sep 2020 21:17:32 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: - InvalidXmlDocument x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 400 message: XML specified is not syntactically valid. diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_cors.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_cors.yaml index 0d783e68fc655..7c4bdf681e565 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_cors.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_cors.yaml @@ -6,7 +6,7 @@ interactions: />0www.xyz.com,www.ab.com,www.bc.comGET,PUTx-ms-meta-data*,x-ms-meta-target*,x-ms-meta-xyz,x-ms-meta-foox-ms-meta-data*,x-ms-meta-source*,x-ms-meta-abc,x-ms-meta-bcd500' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -16,13 +16,13 @@ interactions: Content-Type: - application/xml Date: - - Mon, 27 Jul 2020 14:13:17 GMT + - Wed, 02 Sep 2020 21:17:32 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:13:17 GMT + - Wed, 02 Sep 2020 21:17:32 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -30,13 +30,13 @@ interactions: string: '' headers: date: - - Mon, 27 Jul 2020 14:13:17 GMT + - Wed, 02 Sep 2020 21:17:33 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 202 message: Accepted @@ -50,13 +50,13 @@ interactions: Connection: - keep-alive Date: - - Mon, 27 Jul 2020 14:13:48 GMT + - Wed, 02 Sep 2020 21:18:03 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:13:48 GMT + - Wed, 02 Sep 2020 21:18:03 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -67,7 +67,7 @@ interactions: content-type: - application/xml date: - - Mon, 27 Jul 2020 14:13:47 GMT + - Wed, 02 Sep 2020 21:18:03 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -75,7 +75,7 @@ interactions: vary: - Origin x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_hour_metrics.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_hour_metrics.yaml index 2869e4fcbb326..ae75627b3f1f8 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_hour_metrics.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_hour_metrics.yaml @@ -5,7 +5,7 @@ interactions: 1.0truetruetrue5' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -15,13 +15,13 @@ interactions: Content-Type: - application/xml Date: - - Mon, 27 Jul 2020 14:13:48 GMT + - Wed, 02 Sep 2020 21:18:03 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:13:48 GMT + - Wed, 02 Sep 2020 21:18:03 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -29,13 +29,13 @@ interactions: string: '' headers: date: - - Mon, 27 Jul 2020 14:13:48 GMT + - Wed, 02 Sep 2020 21:18:03 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 202 message: Accepted @@ -49,13 +49,13 @@ interactions: Connection: - keep-alive Date: - - Mon, 27 Jul 2020 14:14:18 GMT + - Wed, 02 Sep 2020 21:18:33 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:14:18 GMT + - Wed, 02 Sep 2020 21:18:33 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -66,7 +66,7 @@ interactions: content-type: - application/xml date: - - Mon, 27 Jul 2020 14:14:18 GMT + - Wed, 02 Sep 2020 21:18:33 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -74,7 +74,7 @@ interactions: vary: - Origin x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_logging.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_logging.yaml index 3cf3b29b2d6b0..b67fc18d236ce 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_logging.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_logging.yaml @@ -5,7 +5,7 @@ interactions: 1.0truetruetruetrue5' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -15,13 +15,13 @@ interactions: Content-Type: - application/xml Date: - - Mon, 27 Jul 2020 14:14:18 GMT + - Wed, 02 Sep 2020 21:18:33 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:14:18 GMT + - Wed, 02 Sep 2020 21:18:33 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -29,13 +29,13 @@ interactions: string: '' headers: date: - - Mon, 27 Jul 2020 14:14:18 GMT + - Wed, 02 Sep 2020 21:18:33 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 202 message: Accepted @@ -49,13 +49,13 @@ interactions: Connection: - keep-alive Date: - - Mon, 27 Jul 2020 14:14:49 GMT + - Wed, 02 Sep 2020 21:19:04 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:14:49 GMT + - Wed, 02 Sep 2020 21:19:04 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -66,7 +66,7 @@ interactions: content-type: - application/xml date: - - Mon, 27 Jul 2020 14:14:48 GMT + - Wed, 02 Sep 2020 21:19:03 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -74,7 +74,7 @@ interactions: vary: - Origin x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_minute_metrics.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_minute_metrics.yaml index fbb969d648165..d4b8770264224 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_minute_metrics.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_set_minute_metrics.yaml @@ -5,7 +5,7 @@ interactions: 1.0truetruetrue5' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -15,13 +15,13 @@ interactions: Content-Type: - application/xml Date: - - Mon, 27 Jul 2020 14:14:49 GMT + - Wed, 02 Sep 2020 21:19:04 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:14:49 GMT + - Wed, 02 Sep 2020 21:19:04 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -29,13 +29,13 @@ interactions: string: '' headers: date: - - Mon, 27 Jul 2020 14:14:49 GMT + - Wed, 02 Sep 2020 21:19:04 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 202 message: Accepted @@ -49,13 +49,13 @@ interactions: Connection: - keep-alive Date: - - Mon, 27 Jul 2020 14:15:19 GMT + - Wed, 02 Sep 2020 21:19:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:15:19 GMT + - Wed, 02 Sep 2020 21:19:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -66,7 +66,7 @@ interactions: content-type: - application/xml date: - - Mon, 27 Jul 2020 14:15:19 GMT + - Wed, 02 Sep 2020 21:19:34 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -74,7 +74,7 @@ interactions: vary: - Origin x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_table_service_properties.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_table_service_properties.yaml index 7ead60c10ac16..a73b891cc3d12 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_table_service_properties.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_table_service_properties.yaml @@ -6,7 +6,7 @@ interactions: />' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -16,13 +16,13 @@ interactions: Content-Type: - application/xml Date: - - Mon, 27 Jul 2020 14:15:19 GMT + - Wed, 02 Sep 2020 21:19:34 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:15:19 GMT + - Wed, 02 Sep 2020 21:19:34 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -30,13 +30,13 @@ interactions: string: '' headers: date: - - Mon, 27 Jul 2020 14:15:19 GMT + - Wed, 02 Sep 2020 21:19:34 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 202 message: Accepted @@ -50,13 +50,13 @@ interactions: Connection: - keep-alive Date: - - Mon, 27 Jul 2020 14:15:50 GMT + - Wed, 02 Sep 2020 21:20:04 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:15:50 GMT + - Wed, 02 Sep 2020 21:20:04 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -67,13 +67,13 @@ interactions: content-type: - application/xml date: - - Mon, 27 Jul 2020 14:15:49 GMT + - Wed, 02 Sep 2020 21:20:04 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_too_many_cors_rules.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_too_many_cors_rules.yaml index 19c947aaa589f..02504ed0ab6a1 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_too_many_cors_rules.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties.test_too_many_cors_rules.yaml @@ -11,7 +11,7 @@ interactions: />0' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -21,13 +21,13 @@ interactions: Content-Type: - application/xml Date: - - Mon, 27 Jul 2020 14:15:50 GMT + - Wed, 02 Sep 2020 21:20:04 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:15:50 GMT + - Wed, 02 Sep 2020 21:20:04 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: PUT uri: https://storagename.table.core.windows.net/?restype=service&comp=properties response: @@ -35,22 +35,22 @@ interactions: string: 'InvalidXmlDocumentXML specified is not syntactically valid. - RequestId:2f02f88a-4002-0016-0920-641fff000000 + RequestId:47961634-9002-001f-7d6e-810571000000 - Time:2020-07-27T14:15:50.7668519Z' + Time:2020-09-02T21:20:05.7661747Z' headers: content-length: - '327' content-type: - application/xml date: - - Mon, 27 Jul 2020 14:15:49 GMT + - Wed, 02 Sep 2020 21:20:05 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: - InvalidXmlDocument x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 400 message: XML specified is not syntactically valid. diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_retention_too_long_async.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_retention_too_long_async.yaml new file mode 100644 index 0000000000000..b09afbe4c5c75 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_retention_too_long_async.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: ' + + 1.0truetruetrue366' + headers: + Content-Length: + - '273' + Content-Type: + - application/xml + Date: + - Tue, 11 Aug 2020 15:51:18 GMT + User-Agent: + - azsdk-python-storage-table/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 11 Aug 2020 15:51:18 GMT + x-ms-version: + - '2019-07-07' + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: 'InvalidXmlDocumentXML specified is not syntactically valid. + + RequestId:68177ab8-2002-0017-1ef7-6fca69000000 + + Time:2020-08-11T15:51:21.0443126Z' + headers: + content-length: '327' + content-type: application/xml + date: Tue, 11 Aug 2020 15:51:20 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: InvalidXmlDocument + x-ms-version: '2019-07-07' + status: + code: 400 + message: XML specified is not syntactically valid. + url: https://pyacrstorage6jyx4hvspyg2.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_cors.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_cors.yaml new file mode 100644 index 0000000000000..5f2105c9acc70 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_cors.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: ' + + www.xyz.comGET0www.xyz.com,www.ab.com,www.bc.comGET,PUTx-ms-meta-data*,x-ms-meta-target*,x-ms-meta-xyz,x-ms-meta-foox-ms-meta-data*,x-ms-meta-source*,x-ms-meta-abc,x-ms-meta-bcd500' + headers: + Content-Length: + - '631' + Content-Type: + - application/xml + Date: + - Mon, 10 Aug 2020 16:44:50 GMT + User-Agent: + - azsdk-python-storage-table/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 10 Aug 2020 16:44:50 GMT + x-ms-version: + - 12.0.0b1 + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF\r\n\r\n + \ InvalidHeaderValue\r\n The value + for one of the HTTP headers is not in the correct format.\nRequestId:16266bd7-7002-006d-3835-6fffef000000\nTime:2020-08-10T16:44:51.9401828Z\r\n" + headers: + content-length: '371' + content-type: application/xml + date: Mon, 10 Aug 2020 16:44:51 GMT + server: Microsoft-HTTPAPI/2.0 + status: + code: 400 + message: The value for one of the HTTP headers is not in the correct format. + url: https://storagename.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_cors_async.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_cors_async.yaml new file mode 100644 index 0000000000000..0cf841fc06d2f --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_cors_async.yaml @@ -0,0 +1,66 @@ +interactions: +- request: + body: ' + + www.xyz.comGET0www.xyz.com,www.ab.com,www.bc.comGET,PUTx-ms-meta-data*,x-ms-meta-target*,x-ms-meta-xyz,x-ms-meta-foox-ms-meta-data*,x-ms-meta-source*,x-ms-meta-abc,x-ms-meta-bcd500' + headers: + Accept: + - application/xml + Content-Length: + - '631' + Content-Type: + - application/xml + Date: + - Wed, 02 Sep 2020 21:20:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:20:05 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: Wed, 02 Sep 2020 21:20:05 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Wed, 02 Sep 2020 21:20:35 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:20:35 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsefalsefalsefalse1.0falsefalse1.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + headers: + content-type: application/xml + date: Wed, 02 Sep 2020 21:20:35 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + vary: Origin + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_hour_metrics.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_hour_metrics.yaml new file mode 100644 index 0000000000000..25ff77268b76b --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_hour_metrics.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: ' + + 1.0truetruetrue5' + headers: + Content-Length: + - '267' + Content-Type: + - application/xml + Date: + - Mon, 10 Aug 2020 16:44:51 GMT + User-Agent: + - azsdk-python-storage-table/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 10 Aug 2020 16:44:51 GMT + x-ms-version: + - 12.0.0b1 + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF\r\n\r\n + \ InvalidHeaderValue\r\n The value + for one of the HTTP headers is not in the correct format.\nRequestId:b6f9f451-0002-008c-7d35-6f189a000000\nTime:2020-08-10T16:44:52.2987018Z\r\n" + headers: + content-length: '371' + content-type: application/xml + date: Mon, 10 Aug 2020 16:44:51 GMT + server: Microsoft-HTTPAPI/2.0 + status: + code: 400 + message: The value for one of the HTTP headers is not in the correct format. + url: https://storagename.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_hour_metrics_async.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_hour_metrics_async.yaml new file mode 100644 index 0000000000000..aa06fee801ba8 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_hour_metrics_async.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: ' + + 1.0truetruetrue5' + headers: + Accept: + - application/xml + Content-Length: + - '267' + Content-Type: + - application/xml + Date: + - Wed, 02 Sep 2020 21:20:35 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:20:35 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: Wed, 02 Sep 2020 21:20:36 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Wed, 02 Sep 2020 21:21:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:21:05 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue51.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + headers: + content-type: application/xml + date: Wed, 02 Sep 2020 21:21:05 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + vary: Origin + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_logging.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_logging.yaml new file mode 100644 index 0000000000000..3b2ea91b04fad --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_logging.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: ' + + 1.0truetruetruetrue5' + headers: + Content-Length: + - '262' + Content-Type: + - application/xml + Date: + - Mon, 10 Aug 2020 16:38:41 GMT + User-Agent: + - azsdk-python-storage-table/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 10 Aug 2020 16:38:41 GMT + x-ms-version: + - 12.0.0b1 + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF\r\n\r\n + \ InvalidHeaderValue\r\n The value + for one of the HTTP headers is not in the correct format.\nRequestId:617bd8f1-c002-0116-7534-6fd20a000000\nTime:2020-08-10T16:38:42.9984604Z\r\n" + headers: + content-length: '371' + content-type: application/xml + date: Mon, 10 Aug 2020 16:38:42 GMT + server: Microsoft-HTTPAPI/2.0 + status: + code: 400 + message: The value for one of the HTTP headers is not in the correct format. + url: https://storagename.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_logging_async.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_logging_async.yaml new file mode 100644 index 0000000000000..a4e1c8906aafa --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_logging_async.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: ' + + 1.0truetruetruetrue5' + headers: + Accept: + - application/xml + Content-Length: + - '262' + Content-Type: + - application/xml + Date: + - Wed, 02 Sep 2020 21:21:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:21:05 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: Wed, 02 Sep 2020 21:21:06 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Wed, 02 Sep 2020 21:21:36 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:21:36 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0truetruetruetrue51.0truetruetrue51.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + headers: + content-type: application/xml + date: Wed, 02 Sep 2020 21:21:36 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + vary: Origin + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_minute_metrics.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_minute_metrics.yaml new file mode 100644 index 0000000000000..0aa821f621615 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_minute_metrics.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: ' + + 1.0truetruetrue5' + headers: + Content-Length: + - '271' + Content-Type: + - application/xml + Date: + - Mon, 10 Aug 2020 16:44:51 GMT + User-Agent: + - azsdk-python-storage-table/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 10 Aug 2020 16:44:51 GMT + x-ms-version: + - 12.0.0b1 + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF\r\n\r\n + \ InvalidHeaderValue\r\n The value + for one of the HTTP headers is not in the correct format.\nRequestId:3f3ccf8b-8002-005a-2835-6f5340000000\nTime:2020-08-10T16:44:52.6990255Z\r\n" + headers: + content-length: '371' + content-type: application/xml + date: Mon, 10 Aug 2020 16:44:52 GMT + server: Microsoft-HTTPAPI/2.0 + status: + code: 400 + message: The value for one of the HTTP headers is not in the correct format. + url: https://storagename.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_minute_metrics_async.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_minute_metrics_async.yaml new file mode 100644 index 0000000000000..d8139781526ba --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_set_minute_metrics_async.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: ' + + 1.0truetruetrue5' + headers: + Accept: + - application/xml + Content-Length: + - '271' + Content-Type: + - application/xml + Date: + - Wed, 02 Sep 2020 21:21:36 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:21:36 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: Wed, 02 Sep 2020 21:21:36 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Wed, 02 Sep 2020 21:22:06 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:22:06 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0truetruetruetrue51.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + headers: + content-type: application/xml + date: Wed, 02 Sep 2020 21:22:07 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + vary: Origin + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_table_service_properties.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_table_service_properties.yaml new file mode 100644 index 0000000000000..81930db36e2b9 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_table_service_properties.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: ' + + 1.0falsefalsefalsefalse1.0falsefalse1.0falsefalse' + headers: + Content-Length: + - '528' + Content-Type: + - application/xml + Date: + - Mon, 10 Aug 2020 16:38:03 GMT + User-Agent: + - azsdk-python-storage-table/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 10 Aug 2020 16:38:03 GMT + x-ms-version: + - 12.0.0b1 + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF\r\n\r\n + \ InvalidHeaderValue\r\n The value + for one of the HTTP headers is not in the correct format.\nRequestId:66b65521-9002-0082-3734-6ff491000000\nTime:2020-08-10T16:38:05.2926871Z\r\n" + headers: + content-length: '371' + content-type: application/xml + date: Mon, 10 Aug 2020 16:38:04 GMT + server: Microsoft-HTTPAPI/2.0 + status: + code: 400 + message: The value for one of the HTTP headers is not in the correct format. + url: https://storagename.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_table_service_properties_async.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_table_service_properties_async.yaml new file mode 100644 index 0000000000000..2774d4b97bf4c --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_properties_async.test_table_service_properties_async.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: ' + + 1.0falsefalsefalsefalse1.0falsefalse1.0falsefalse' + headers: + Accept: + - application/xml + Content-Length: + - '528' + Content-Type: + - application/xml + Date: + - Wed, 02 Sep 2020 21:22:06 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:22:06 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: Wed, 02 Sep 2020 21:22:06 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Wed, 02 Sep 2020 21:22:36 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:22:36 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://storagename.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsefalsefalsefalse1.0falsefalse1.0falsefalse" + headers: + content-type: application/xml + date: Wed, 02 Sep 2020 21:22:36 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragewfzwusgqqhrx.table.core.windows.net/?restype=service&comp=properties +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats.test_table_service_stats_f.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats.test_table_service_stats_f.yaml index a0d6be6a65325..1ad0af8bfe3bc 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats.test_table_service_stats_f.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats.test_table_service_stats_f.yaml @@ -9,13 +9,13 @@ interactions: Connection: - keep-alive Date: - - Mon, 27 Jul 2020 14:26:52 GMT + - Wed, 02 Sep 2020 21:22:56 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:26:52 GMT + - Wed, 02 Sep 2020 21:22:56 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://pyacrstoragestorname-secondary.table.core.windows.net/?restype=service&comp=stats response: @@ -25,13 +25,13 @@ interactions: content-type: - application/xml date: - - Mon, 27 Jul 2020 14:26:52 GMT + - Wed, 02 Sep 2020 21:22:57 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats.test_table_service_stats_when_unavailable.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats.test_table_service_stats_when_unavailable.yaml index 9dc1202b85e1d..d7bbd374e0af7 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats.test_table_service_stats_when_unavailable.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats.test_table_service_stats_when_unavailable.yaml @@ -9,13 +9,13 @@ interactions: Connection: - keep-alive Date: - - Mon, 27 Jul 2020 14:27:17 GMT + - Wed, 02 Sep 2020 21:23:18 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 27 Jul 2020 14:27:17 GMT + - Wed, 02 Sep 2020 21:23:18 GMT x-ms-version: - - '2019-07-07' + - '2019-02-02' method: GET uri: https://pyacrstoragestorname-secondary.table.core.windows.net/?restype=service&comp=stats response: @@ -25,13 +25,13 @@ interactions: content-type: - application/xml date: - - Mon, 27 Jul 2020 14:27:17 GMT + - Wed, 02 Sep 2020 21:23:19 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-07-07' + - '2019-02-02' status: code: 200 message: OK diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats_async.test_table_service_stats_f_async.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats_async.test_table_service_stats_f_async.yaml new file mode 100644 index 0000000000000..337e16f94d13c --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats_async.test_table_service_stats_f_async.yaml @@ -0,0 +1,30 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Wed, 02 Sep 2020 21:23:41 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:23:41 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://pyacrstoragestorname-secondary.table.core.windows.net/?restype=service&comp=stats + response: + body: + string: "\uFEFFunavailable" + headers: + content-type: application/xml + date: Wed, 02 Sep 2020 21:23:42 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstorageamdnko65e4pj-secondary.table.core.windows.net/?restype=service&comp=stats +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats_async.test_table_service_stats_when_unavailable_async.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats_async.test_table_service_stats_when_unavailable_async.yaml new file mode 100644 index 0000000000000..9f2362f0e1aed --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_service_stats_async.test_table_service_stats_when_unavailable_async.yaml @@ -0,0 +1,31 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Wed, 02 Sep 2020 21:24:06 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b1 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 02 Sep 2020 21:24:06 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://pyacrstoragestorname-secondary.table.core.windows.net/?restype=service&comp=stats + response: + body: + string: "\uFEFFunavailable" + headers: + connection: close + content-type: application/xml + date: Wed, 02 Sep 2020 21:24:07 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pyacrstoragec4ugfeufcsxf-secondary.table.core.windows.net/?restype=service&comp=stats +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/test_table.py b/sdk/tables/azure-data-tables/tests/test_table.py index bb6acef688920..06327149fe778 100644 --- a/sdk/tables/azure-data-tables/tests/test_table.py +++ b/sdk/tables/azure-data-tables/tests/test_table.py @@ -9,22 +9,22 @@ import sys import locale import os -from azure.data.tables import TableServiceClient +from azure.data.tables import TableServiceClient, TableItem from datetime import ( datetime, timedelta, ) - + from azure.data.tables import ( - ResourceTypes, - AccountSasPermissions, - TableSasPermissions, - CorsRule, - RetentionPolicy, - UpdateMode, - AccessPolicy, - TableAnalyticsLogging, + ResourceTypes, + AccountSasPermissions, + TableSasPermissions, + CorsRule, + RetentionPolicy, + UpdateMode, + AccessPolicy, + TableAnalyticsLogging, Metrics ) from azure.core.pipeline import Pipeline @@ -99,7 +99,6 @@ def test_create_properties(self, resource_group, location, storage_account, stor assert created.table_name == table_name properties = ts.get_service_properties() - print(properties) ts.set_service_properties(analytics_logging=TableAnalyticsLogging(write=True)) # have to wait for return to service p = ts.get_service_properties() @@ -108,8 +107,6 @@ def test_create_properties(self, resource_group, location, storage_account, stor retention_policy=RetentionPolicy(enabled=True, days=5))) ps = ts.get_service_properties() - print(ps) - print(p) ts.delete_table(table_name) # @pytest.mark.skip("pending") @@ -133,17 +130,42 @@ def test_create_table_fail_on_exist(self, resource_group, location, storage_acco # Arrange ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) table_name = self._get_table_reference() - # btable_client = ts.get_table_client(table_name) # Act created = ts.create_table(table_name) with self.assertRaises(ResourceExistsError): ts.create_table(table_name) + print(created) + + name_filter = "TableName eq '{}'".format(table_name) + existing = list(ts.query_tables(filter=name_filter)) # Assert - self.assertTrue(created) - # existing = list(ts.query_tables(query_options=QueryOptions(filter="TableName eq '{}'".format(table_name)))) - # self.assertEqual(existing[0], [table_name]) + self.assertIsNotNone(created) + ts.delete_table(table_name) + + @GlobalStorageAccountPreparer() + def test_create_table_if_exists(self, resource_group, location, storage_account, storage_account_key): + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + + t0 = ts.create_table(table_name) + t1 = ts.create_table_if_not_exists(table_name) + + self.assertIsNotNone(t0) + self.assertIsNotNone(t1) + self.assertEqual(t0.table_name, t1.table_name) + ts.delete_table(table_name) + + @GlobalStorageAccountPreparer() + def test_create_table_if_exists_new_table(self, resource_group, location, storage_account, storage_account_key): + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + + t = ts.create_table_if_not_exists(table_name) + + self.assertIsNotNone(t) + self.assertEqual(t.table_name, table_name) ts.delete_table(table_name) @GlobalStorageAccountPreparer() @@ -170,39 +192,42 @@ def test_delete_table_invalid_name(self, resource_group, location, storage_accou assert "Table names must be alphanumeric, cannot begin with a number, and must be between 3-63 characters long.""" in str( excinfo) - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() - def test_query_tables(self, resource_group, location, storage_account, storage_account_key): + def test_list_tables(self, resource_group, location, storage_account, storage_account_key): # Arrange ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) - table = self._create_table(ts) + t = self._create_table(ts) # Act tables = list(ts.list_tables()) # Assert + for table_item in tables: + self.assertIsInstance(table_item, TableItem) + self.assertIsNotNone(tables) self.assertGreaterEqual(len(tables), 1) self.assertIsNotNone(tables[0]) - # self.assertNamedItemInContainer(tables, table.table_name) - ts.delete_table(table.table_name) + ts.delete_table(t.table_name) # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_query_tables_with_filter(self, resource_group, location, storage_account, storage_account_key): # Arrange ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) - table = self._create_table(ts) + t = self._create_table(ts) # Act - name_filter = "TableName eq '{}'".format(table.table_name) + name_filter = "TableName eq '{}'".format(t.table_name) tables = list(ts.query_tables(filter=name_filter)) + + for table_item in tables: + self.assertIsInstance(table_item, TableItem) + # Assert self.assertIsNotNone(tables) self.assertEqual(len(tables), 1) - # self.assertEqual(tables[0].table_name, [table.table_name]) - # table.delete_table() - ts.delete_table(table.table_name) + ts.delete_table(t.table_name) # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() @@ -221,8 +246,6 @@ def test_query_tables_with_num_results(self, resource_group, location, storage_a small_page.append(s) for t in next(ts.list_tables().by_page()): big_page.append(t) - # big_page = (next(ts.query_tables().by_page())) - # small_page = (next(ts.query_tables(results_per_page=3).by_page())) # Assert self.assertEqual(len(small_page), 3) @@ -263,13 +286,12 @@ def test_delete_table_with_existing_table(self, resource_group, location, storag table = self._create_table(ts) # Act - # deleted = table.delete_table() deleted = ts.delete_table(table_name=table.table_name) + existing = list(ts.query_tables("TableName eq '{}'".format(table.table_name))) # Assert self.assertIsNone(deleted) - # existing = list(ts.query_tables("TableName eq '{}'".format(table.table_name))) - # self.assertEqual(existing, []) + self.assertEqual(len(existing), 0) # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() @@ -473,9 +495,9 @@ def test_locale(self, resource_group, location, storage_account, storage_account ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) table = (self._get_table_reference()) init_locale = locale.getlocale() - if os.name is "nt": + if os.name == "nt": culture = "Spanish_Spain" - elif os.name is 'posix': + elif os.name == 'posix': culture = 'es_ES.UTF-8' else: culture = 'es_ES.utf8' diff --git a/sdk/tables/azure-data-tables/tests/test_table_async.py b/sdk/tables/azure-data-tables/tests/test_table_async.py index 061122548b9a1..9072eb2a440c0 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_async.py @@ -7,8 +7,14 @@ from azure.core.exceptions import ResourceNotFoundError, ResourceExistsError, HttpResponseError from _shared.asynctestcase import AsyncTableTestCase from _shared.testcase import GlobalStorageAccountPreparer -from azure.data.tables import AccessPolicy, TableSasPermissions, ResourceTypes, AccountSasPermissions -from azure.data.tables.aio import TableServiceClient +from azure.data.tables import ( + AccessPolicy, + TableSasPermissions, + ResourceTypes, + AccountSasPermissions, + TableItem +) +from azure.data.tables.aio import TableServiceClient, TableClient from azure.data.tables._generated.models import QueryOptions from azure.data.tables._table_shared_access_signature import generate_account_sas @@ -42,6 +48,29 @@ async def _delete_table(self, ts, table): pass # --Test cases for tables -------------------------------------------------- + @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + def test_create_properties(self, resource_group, location, storage_account, storage_account_key): + # # Arrange + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + # Act + created = ts.create_table(table_name) + + # Assert + assert created.table_name == table_name + + properties = ts.get_service_properties() + ts.set_service_properties(analytics_logging=TableAnalyticsLogging(write=True)) + # have to wait for return to service + p = ts.get_service_properties() + # have to wait for return to service + ts.set_service_properties(minute_metrics= Metrics(enabled=True, include_apis=True, + retention_policy=RetentionPolicy(enabled=True, days=5))) + + ps = ts.get_service_properties() + ts.delete_table(table_name) + # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() async def test_create_table(self, resource_group, location, storage_account, storage_account_key): @@ -54,7 +83,6 @@ async def test_create_table(self, resource_group, location, storage_account, sto # Assert assert created.table_name == table_name - await ts.delete_table(table_name=table_name) # @pytest.mark.skip("pending") @@ -69,10 +97,39 @@ async def test_create_table_fail_on_exist(self, resource_group, location, storag with self.assertRaises(ResourceExistsError): await ts.create_table(table_name=table_name) + name_filter = "TableName eq '{}'".format(table_name) + existing = ts.query_tables(filter=name_filter) + # Assert - self.assertTrue(created) + self.assertIsInstance(created, TableClient) + # self.assertEqual(len(existing), 1) + # TODO: the AsyncItemPaged does not have a length property, and cannot be used as an iterator await ts.delete_table(table_name=table_name) + @GlobalStorageAccountPreparer() + async def test_create_table_if_exists(self, resource_group, location, storage_account, storage_account_key): + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + + t0 = await ts.create_table(table_name) + t1 = await ts.create_table_if_not_exists(table_name) + + self.assertIsNotNone(t0) + self.assertIsNotNone(t1) + self.assertEqual(t0.table_name, t1.table_name) + await ts.delete_table(table_name) + + @GlobalStorageAccountPreparer() + async def test_create_table_if_exists_new_table(self, resource_group, location, storage_account, storage_account_key): + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + + t = await ts.create_table_if_not_exists(table_name) + + self.assertIsNotNone(t) + self.assertEqual(t.table_name, table_name) + await ts.delete_table(table_name) + @GlobalStorageAccountPreparer() async def test_create_table_invalid_name(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -110,9 +167,13 @@ async def test_list_tables(self, resource_group, location, storage_account, stor tables.append(t) # Assert + for table_item in tables: + self.assertIsInstance(table_item, TableItem) + self.assertIsNotNone(tables) self.assertGreaterEqual(len(tables), 1) self.assertIsNotNone(tables[0]) + await ts.delete_table(table.table_name) # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() @@ -130,12 +191,36 @@ async def test_query_tables_with_filter(self, resource_group, location, storage_ # Assert self.assertIsNotNone(tables) self.assertEqual(len(tables), 1) - # self.assertEqual(tables[0].table_name, [table.table_name]) - # table.delete_table() + for table_item in tables: + self.assertIsInstance(table_item, TableItem) + self.assertIsNotNone(table_item.date) + self.assertIsNotNone(table_item.table_name) await ts.delete_table(table.table_name) - # @pytest.mark.skip("pending") - # TODO: the small_page is getting 16, can't figure it out, skipping for now + @pytest.mark.skip("pending") + # TODO: TablePropertiesPaged is not an iterator, should inherit from AsyncPageIterator + @GlobalStorageAccountPreparer() + async def test_query_tables_with_num_results(self, resource_group, location, storage_account, storage_account_key): + # Arrange + prefix = 'listtable' + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_list = [] + for i in range(0, 4): + await self._create_table(ts, prefix + str(i), table_list) + + # Act + small_page = [] + big_page = [] + for s in next(ts.list_tables(results_per_page=3).by_page()): + small_page.append(s) + for t in next(ts.list_tables().by_page()): + big_page.append(t) + + # Assert + self.assertEqual(len(small_page), 3) + self.assertGreaterEqual(len(big_page), 4) + + @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() async def test_list_tables_with_num_results(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -167,8 +252,6 @@ async def test_list_tables_with_marker(self, resource_group, location, storage_a for i in range(0, 4): await self._create_table(ts, prefix + str(i), table_names) - # table_names.sort() - # Act generator1 = ts.list_tables(query_options=QueryOptions(top=2)).by_page() tables1 = [] @@ -283,7 +366,7 @@ async def test_set_table_acl_with_empty_signed_identifiers(self, resource_group, @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() - async def test_set_table_acl_with_empty_signed_identifier(self, resource_group, location, storage_account, + async def test_set_table_acl_with_none_signed_identifier(self, resource_group, location, storage_account, storage_account_key): # Arrange url = self.account_url(storage_account, "table") @@ -316,7 +399,7 @@ async def test_set_table_acl_with_signed_identifiers(self, resource_group, locat pytest.skip("Cosmos endpoint does not support this") ts = TableServiceClient(url, storage_account_key) table = await self._create_table(ts) - client = ts.get_table_client(table=table.table_name) + client = ts.get_table_client(table_name=table.table_name) # Act identifiers = dict() diff --git a/sdk/tables/azure-data-tables/tests/test_table_batch.py b/sdk/tables/azure-data-tables/tests/test_table_batch.py index 62d20bd42bd3e..b628b10cf508f 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_batch.py +++ b/sdk/tables/azure-data-tables/tests/test_table_batch.py @@ -16,6 +16,7 @@ from azure.core import MatchConditions from azure.core.exceptions import ( ResourceExistsError) +from azure.data.tables import EdmType, TableEntity, EntityProperty from _shared.testcase import GlobalStorageAccountPreparer, TableTestCase, LogCaptured @@ -78,7 +79,7 @@ def _create_random_entity_dict(self, pk=None, rk=None): 'Birthday': datetime(1973, 10, 4, tzinfo=tzutc()), 'birthday': datetime(1970, 10, 4, tzinfo=tzutc()), 'binary': b'binary', - 'other': EntityProperty(EdmType.INT32, 20), + 'other': EntityProperty(20, EdmType.INT32), 'clsid': uuid.UUID('c9da6455-213d-42c9-9a79-3e9149a57833') } return Entity(**properties) @@ -148,6 +149,33 @@ def _assert_updated_entity(self, entity): self.assertIsInstance(entity.timestamp, datetime) #--Test cases for batch --------------------------------------------- + + def test_inferred_types(self): + # Arrange + # Act + entity = TableEntity() + entity.PartitionKey = '003' + entity.RowKey = 'batch_all_operations_together-1' + entity.test = EntityProperty(True) + entity.test2 = EntityProperty(b'abcdef') + entity.test3 = EntityProperty(u'c9da6455-213d-42c9-9a79-3e9149a57833') + entity.test4 = EntityProperty(datetime(1973, 10, 4, tzinfo=tzutc())) + entity.test5 = EntityProperty(u"stringystring") + entity.test6 = EntityProperty(3.14159) + entity.test7 = EntityProperty(100) + entity.test8 = EntityProperty(2 ** 33, EdmType.INT64) + + # Assert + self.assertEqual(entity.test.type, EdmType.BOOLEAN) + self.assertEqual(entity.test2.type, EdmType.BINARY) + self.assertEqual(entity.test3.type, EdmType.GUID) + self.assertEqual(entity.test4.type, EdmType.DATETIME) + self.assertEqual(entity.test5.type, EdmType.STRING) + self.assertEqual(entity.test6.type, EdmType.DOUBLE) + self.assertEqual(entity.test7.type, EdmType.INT32) + self.assertEqual(entity.test8.type, EdmType.INT64) + + @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_batch_insert(self, resource_group, location, storage_account, storage_account_key): @@ -158,10 +186,10 @@ def test_batch_insert(self, resource_group, location, storage_account, storage_a entity = Entity() entity.PartitionKey = '001' entity.RowKey = 'batch_insert' - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() batch = self.table.create_batch() @@ -185,10 +213,10 @@ def test_batch_update(self, resource_group, location, storage_account, storage_a entity = Entity() entity.PartitionKey = '001' entity.RowKey = 'batch_update' - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() self.table.create_item(entity) @@ -218,10 +246,10 @@ def test_batch_merge(self, resource_group, location, storage_account, storage_ac entity = Entity() entity.PartitionKey = '001' entity.RowKey = 'batch_merge' - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() self.table.create_item(entity) @@ -313,7 +341,7 @@ def test_batch_insert_replace(self, resource_group, location, storage_account, s entity.test = True entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() batch = self.table.create_batch() @@ -343,7 +371,7 @@ def test_batch_insert_merge(self, resource_group, location, storage_account, sto entity.test = True entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() batch = self.table.create_batch() @@ -370,10 +398,10 @@ def test_batch_delete(self, resource_group, location, storage_account, storage_a entity = Entity() entity.PartitionKey = '001' entity.RowKey = 'batch_delete' - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() self.table.create_item(entity) @@ -399,10 +427,10 @@ def test_batch_inserts(self, resource_group, location, storage_account, storage_ # Act entity = Entity() entity.PartitionKey = 'batch_inserts' - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) batch = self.table.create_batch() for i in range(100): @@ -428,10 +456,10 @@ def test_batch_all_operations_together(self, resource_group, location, storage_a entity = Entity() entity.PartitionKey = '003' entity.RowKey = 'batch_all_operations_together-1' - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() self.table.create_item(entity) entity.RowKey = 'batch_all_operations_together-2' @@ -476,10 +504,10 @@ def test_batch_all_operations_together_context_manager(self, resource_group, loc entity = Entity() entity.PartitionKey = '003' entity.RowKey = 'batch_all_operations_together-1' - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() self.table.create_item(entity) entity.RowKey = 'batch_all_operations_together-2' @@ -525,10 +553,10 @@ def test_batch_reuse(self, resource_group, location, storage_account, storage_ac entity = Entity() entity.PartitionKey = '003' entity.RowKey = 'batch_all_operations_together-1' - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'value' entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime.utcnow() batch = TableBatchClient() diff --git a/sdk/tables/azure-data-tables/tests/test_table_client.py b/sdk/tables/azure-data-tables/tests/test_table_client.py index 34ba05da9fb62..3eff586b2e6a0 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_client.py +++ b/sdk/tables/azure-data-tables/tests/test_table_client.py @@ -20,10 +20,10 @@ from azure.core.exceptions import HttpResponseError # ------------------------------------------------------------------------------ SERVICES = { - #TableServiceClient: 'table', - #TableClient: 'table', - #TableServiceClient: 'cosmos', - #TableClient: 'cosmos', + TableServiceClient: 'table', + TableClient: 'table', + # TableServiceClient: 'cosmos', + # TableClient: 'cosmos', } _CONNECTION_ENDPOINTS = {'table': 'TableEndpoint', 'cosmos': 'TableEndpoint'} @@ -45,9 +45,9 @@ def validate_standard_account_endpoints(self, service, account_name, account_key self.assertTrue( ('{}.{}'.format(account_name, 'table.core.windows.net') in service.url) or ('{}.{}'.format(account_name, 'table.cosmos.azure.com') in service.url)) - self.assertTrue( - ('{}-secondary.{}'.format(account_name, 'table.core.windows.net') in service.secondary_endpoint) or - ('{}-secondary.{}'.format(account_name, 'table.cosmos.azure.com') in service.secondary_endpoint)) + # self.assertTrue( + # ('{}-secondary.{}'.format(account_name, 'table.core.windows.net') in service.secondary_endpoint) or + # ('{}-secondary.{}'.format(account_name, 'table.cosmos.azure.com') in service.secondary_endpoint)) # --Direct Parameters Test Cases -------------------------------------------- #@pytest.mark.skip("pending") @@ -143,10 +143,10 @@ def test_create_service_china(self, resource_group, location, storage_account, s self.assertEqual(service.account_name, storage_account.name) self.assertEqual(service.credential.account_name, storage_account.name) self.assertEqual(service.credential.account_key, storage_account_key) - self.assertTrue(service.primary_endpoint.startswith( + self.assertTrue(service._primary_endpoint.startswith( 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) - self.assertTrue(service.secondary_endpoint.startswith( - 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) + # self.assertTrue(service.secondary_endpoint.startswith( + # 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() @@ -244,8 +244,8 @@ def test_create_service_with_connection_string_cosmos(self, resource_group, loca self.assertTrue(service.url.startswith('https://' + storage_account.name + '.table.cosmos.azure.com')) self.assertEqual(service.credential.account_name, storage_account.name) self.assertEqual(service.credential.account_key, storage_account_key) - self.assertTrue(service.primary_endpoint.startswith('https://' + storage_account.name + '.table.cosmos.azure.com')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.cosmos.azure.com')) + self.assertTrue(service._primary_endpoint.startswith('https://' + storage_account.name + '.table.cosmos.azure.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.cosmos.azure.com')) self.assertEqual(service.scheme, 'https') #@pytest.mark.skip("pending") @@ -265,11 +265,11 @@ def test_create_service_with_connection_string_endpoint_protocol(self, resource_ self.assertEqual(service.credential.account_name, storage_account.name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue( - service.primary_endpoint.startswith( + service._primary_endpoint.startswith( 'http://{}.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) - self.assertTrue( - service.secondary_endpoint.startswith( - 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) + # self.assertTrue( + # service.secondary_endpoint.startswith( + # 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) self.assertEqual(service.scheme, 'http') #@pytest.mark.skip("pending") @@ -299,8 +299,8 @@ def test_create_service_with_connection_string_custom_domain(self, resource_grou self.assertEqual(service.account_name, storage_account.name) self.assertEqual(service.credential.account_name, storage_account.name) self.assertEqual(service.credential.account_key, storage_account_key) - self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.core.windows.net')) + self.assertTrue(service._primary_endpoint.startswith('https://www.mydomain.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.core.windows.net')) #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() @@ -318,8 +318,8 @@ def test_create_service_with_conn_str_custom_domain_trailing_slash(self, resourc self.assertEqual(service.account_name, storage_account.name) self.assertEqual(service.credential.account_name, storage_account.name) self.assertEqual(service.credential.account_key, storage_account_key) - self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.core.windows.net')) + self.assertTrue(service._primary_endpoint.startswith('https://www.mydomain.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.core.windows.net')) #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() @@ -338,8 +338,8 @@ def test_create_service_with_conn_str_custom_domain_sec_override(self, resource_ self.assertEqual(service.account_name, storage_account.name) self.assertEqual(service.credential.account_name, storage_account.name) self.assertEqual(service.credential.account_key, storage_account_key) - self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com')) - self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com')) + self.assertTrue(service._primary_endpoint.startswith('https://www.mydomain.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com')) #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() @@ -375,8 +375,8 @@ def test_create_service_with_conn_str_succeeds_if_sec_with_primary(self, resourc self.assertEqual(service.account_name, storage_account.name) self.assertEqual(service.credential.account_name, storage_account.name) self.assertEqual(service.credential.account_key, storage_account_key) - self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com')) - self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com')) + self.assertTrue(service._primary_endpoint.startswith('https://www.mydomain.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com')) # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() @@ -393,7 +393,7 @@ def test_create_service_with_custom_account_endpoint_path(self, resource_group, self.assertEqual(service.account_name, storage_account.name) self.assertEqual(service.credential.account_name, storage_account.name) self.assertEqual(service.credential.account_key, storage_account_key) - self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') + self.assertEqual(service._primary_hostname, 'local-machine:11002/custom/account/path') service = TableServiceClient(account_url=custom_account_url) self.assertEqual(service.account_name, None) @@ -433,7 +433,7 @@ def callback(response): tables = list(service.list_tables(raw_response_hook=callback)) self.assertIsInstance(tables, list) - # @pytest.mark.skip("pending") + @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_user_agent_custom(self, resource_group, location, storage_account, storage_account_key): custom_app = "TestApp/v1.0" @@ -443,7 +443,7 @@ def test_user_agent_custom(self, resource_group, location, storage_account, stor def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertIn( - "TestApp/v1.0 azsdk-python-storage-table/{} Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-data-tables/{} Python/{} ({})".format( VERSION, platform.python_version(), platform.platform()), @@ -456,7 +456,7 @@ def callback(response): def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertIn( - "TestApp/v2.0 TestApp/v1.0 azsdk-python-storage-table/{} Python/{} ({})".format( + "TestApp/v2.0 TestApp/v1.0 azsdk-python-data-tables/{} Python/{} ({})".format( VERSION, platform.python_version(), platform.platform()), @@ -514,11 +514,11 @@ def test_create_table_client_with_invalid_name(self, resource_group, location, s # Arrange table_url = "https://{}.table.core.windows.net:443/foo".format(storage_account.name) invalid_table_name = "my_table" - + # Assert with pytest.raises(ValueError) as excinfo: service = TableClient(account_url=table_url, table_name=invalid_table_name, credential=storage_account_key) - + assert "Table names must be alphanumeric, cannot begin with a number, and must be between 3-63 characters long.""" in str(excinfo) @@ -531,7 +531,7 @@ def test_error_with_malformed_conn_str(self): # Act with self.assertRaises(ValueError) as e: service = service_type[0].from_connection_string(conn_str, table_name="test") - + if conn_str in("", "foobar", "foo;bar;baz", ";"): self.assertEqual( str(e.exception), "Connection string is either blank or malformed.") diff --git a/sdk/tables/azure-data-tables/tests/test_table_client_async.py b/sdk/tables/azure-data-tables/tests/test_table_client_async.py new file mode 100644 index 0000000000000..2b90e0da2ac33 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/test_table_client_async.py @@ -0,0 +1,541 @@ +# ------------------------------------------------------------------------- +# 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 pytest +import platform + +from azure.data.tables.aio import TableServiceClient, TableClient +from azure.data.tables._version import VERSION +from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer + +from _shared.testcase import GlobalStorageAccountPreparer, TableTestCase + +from azure.core.exceptions import HttpResponseError +# ------------------------------------------------------------------------------ +SERVICES = { + TableServiceClient: 'table', + TableClient: 'table', + #TableServiceClient: 'cosmos', + #TableClient: 'cosmos', +} + +_CONNECTION_ENDPOINTS = {'table': 'TableEndpoint', 'cosmos': 'TableEndpoint'} + +_CONNECTION_ENDPOINTS_SECONDARY = {'table': 'TableSecondaryEndpoint', 'cosmos': 'TableSecondaryEndpoint'} + +class StorageTableClientTest(TableTestCase): + def setUp(self): + super(StorageTableClientTest, self).setUp() + self.sas_token = self.generate_sas_token() + self.token_credential = self.generate_oauth_token() + + # --Helpers----------------------------------------------------------------- + def validate_standard_account_endpoints(self, service, account_name, account_key): + self.assertIsNotNone(service) + self.assertEqual(service.account_name, account_name) + self.assertEqual(service.credential.account_name, account_name) + self.assertEqual(service.credential.account_key, account_key) + self.assertTrue( + ('{}.{}'.format(account_name, 'table.core.windows.net') in service.url) or + ('{}.{}'.format(account_name, 'table.cosmos.azure.com') in service.url)) + # self.assertTrue( + # ('{}-secondary.{}'.format(account_name, 'table.core.windows.net') in service.secondary_endpoint) or + # ('{}-secondary.{}'.format(account_name, 'table.cosmos.azure.com') in service.secondary_endpoint)) + + # --Direct Parameters Test Cases -------------------------------------------- + @GlobalStorageAccountPreparer() + async def test_create_service_with_key_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + + for client, url in SERVICES.items(): + # Act + service = client( + self.account_url(storage_account, url), credential=storage_account_key, table_name='foo') + + # Assert + self.validate_standard_account_endpoints(service, storage_account.name, storage_account_key) + self.assertEqual(service.scheme, 'https') + + @GlobalStorageAccountPreparer() + async def test_create_service_with_connection_string_async(self, resource_group, location, storage_account, storage_account_key): + + for service_type in SERVICES.items(): + # Act + service = service_type[0].from_connection_string( + self.connection_string(storage_account, storage_account_key), table_name="test") + + # Assert + self.validate_standard_account_endpoints(service, storage_account.name, storage_account_key) + self.assertEqual(service.scheme, 'https') + + @GlobalStorageAccountPreparer() + async def test_create_service_with_sas_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + url = self.account_url(storage_account, "table") + suffix = '.table.core.windows.net' + if 'cosmos' in url: + suffix = '.table.cosmos.azure.com' + for service_type in SERVICES: + # Act + service = service_type( + self.account_url(storage_account, "table"), credential=self.sas_token, table_name='foo') + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertTrue(service.url.startswith('https://' + storage_account.name + suffix)) + self.assertTrue(service.url.endswith(self.sas_token)) + self.assertIsNone(service.credential) + + @GlobalStorageAccountPreparer() + async def test_create_service_with_token_async(self, resource_group, location, storage_account, storage_account_key): + url = self.account_url(storage_account, "table") + suffix = '.table.core.windows.net' + if 'cosmos' in url: + suffix = '.table.cosmos.azure.com' + for service_type in SERVICES: + # Act + service = service_type(url, credential=self.token_credential, table_name='foo') + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertTrue(service.url.startswith('https://' + storage_account.name + suffix)) + self.assertEqual(service.credential, self.token_credential) + self.assertFalse(hasattr(service.credential, 'account_key')) + self.assertTrue(hasattr(service.credential, 'get_token')) + + @GlobalStorageAccountPreparer() + async def test_create_service_with_token_and_http_async(self, resource_group, location, storage_account, storage_account_key): + for service_type in SERVICES: + # Act + with self.assertRaises(ValueError): + url = self.account_url(storage_account, "table").replace('https', 'http') + service_type(url, credential=self.token_credential, table_name='foo') + + @GlobalStorageAccountPreparer() + async def test_create_service_china_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + # TODO: Confirm regional cloud cosmos URLs + for service_type in SERVICES.items(): + # Act + url = self.account_url(storage_account, "table").replace('core.windows.net', 'core.chinacloudapi.cn') + if 'cosmos.azure' in url: + pytest.skip("Confirm cosmos national cloud URLs") + service = service_type[0]( + url, credential=storage_account_key, table_name='foo') + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.credential.account_key, storage_account_key) + self.assertTrue(service._primary_endpoint.startswith( + 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) + # self.assertTrue(service.secondary_endpoint.startswith( + # 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) + + @GlobalStorageAccountPreparer() + async def test_create_service_protocol_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + + for service_type in SERVICES.items(): + # Act + url = self.account_url(storage_account, "table").replace('https', 'http') + service = service_type[0]( + url, credential=storage_account_key, table_name='foo') + + # Assert + self.validate_standard_account_endpoints(service, storage_account.name, storage_account_key) + self.assertEqual(service.scheme, 'http') + + + @GlobalStorageAccountPreparer() + async def test_create_service_empty_key_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + TABLE_SERVICES = [TableServiceClient, TableClient] + + for service_type in TABLE_SERVICES: + # Act + with self.assertRaises(ValueError) as e: + test_service = service_type('testaccount', credential='', table_name='foo') + + self.assertEqual( + str(e.exception), "You need to provide either a SAS token or an account shared key to authenticate.") + + + @GlobalStorageAccountPreparer() + async def test_create_service_with_socket_timeout_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + + for service_type in SERVICES.items(): + # Act + default_service = service_type[0]( + self.account_url(storage_account, "table"), credential=storage_account_key, table_name='foo') + service = service_type[0]( + self.account_url(storage_account, "table"), credential=storage_account_key, + table_name='foo', connection_timeout=22) + + # Assert + self.validate_standard_account_endpoints(service, storage_account.name, storage_account_key) + assert service._client._client._pipeline._transport.connection_config.timeout == 22 + assert default_service._client._client._pipeline._transport.connection_config.timeout in [20, (20, 2000)] + + # --Connection String Test Cases -------------------------------------------- + @GlobalStorageAccountPreparer() + async def test_create_service_with_connection_string_key_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + conn_string = 'AccountName={};AccountKey={};'.format(storage_account.name, storage_account_key) + + for service_type in SERVICES.items(): + # Act + service = service_type[0].from_connection_string(conn_string, table_name='foo') + + # Assert + self.validate_standard_account_endpoints(service, storage_account.name, storage_account_key) + self.assertEqual(service.scheme, 'https') + + @GlobalStorageAccountPreparer() + async def test_create_service_with_connection_string_sas_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account.name, self.sas_token) + + for service_type in SERVICES: + # Act + service = service_type.from_connection_string(conn_string, table_name='foo') + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertTrue(service.url.startswith('https://' + storage_account.name + '.table.core.windows.net')) + self.assertTrue(service.url.endswith(self.sas_token)) + self.assertIsNone(service.credential) + + @GlobalStorageAccountPreparer() # TODO: Prepare Cosmos tables account + async def test_create_service_with_connection_string_cosmos_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + conn_string = 'DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};TableEndpoint=https://{0}.table.cosmos.azure.com:443/;'.format( + storage_account.name, storage_account_key) + + for service_type in SERVICES: + # Act + service = service_type.from_connection_string(conn_string, table_name='foo') + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertTrue(service.url.startswith('https://' + storage_account.name + '.table.cosmos.azure.com')) + self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.credential.account_key, storage_account_key) + self.assertTrue(service._primary_endpoint.startswith('https://' + storage_account.name + '.table.cosmos.azure.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.cosmos.azure.com')) + self.assertEqual(service.scheme, 'https') + + @GlobalStorageAccountPreparer() + async def test_create_service_with_connection_string_endpoint_protocol_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + conn_string = 'AccountName={};AccountKey={};DefaultEndpointsProtocol=http;EndpointSuffix=core.chinacloudapi.cn;'.format( + storage_account.name, storage_account_key) + + for service_type in SERVICES.items(): + # Act + service = service_type[0].from_connection_string(conn_string, table_name="foo") + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.credential.account_key, storage_account_key) + self.assertTrue( + service._primary_endpoint.startswith( + 'http://{}.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) + # self.assertTrue( + # service.secondary_endpoint.startswith( + # 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, "table"))) + self.assertEqual(service.scheme, 'http') + + @GlobalStorageAccountPreparer() + async def test_create_service_with_connection_string_emulated_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + for service_type in SERVICES.items(): + conn_string = 'UseDevelopmentStorage=true;'.format(storage_account.name, storage_account_key) + + # Act + with self.assertRaises(ValueError): + service = service_type[0].from_connection_string(conn_string, table_name="foo") + + @GlobalStorageAccountPreparer() + async def test_create_service_with_connection_string_custom_domain_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + for service_type in SERVICES.items(): + conn_string = 'AccountName={};AccountKey={};TableEndpoint=www.mydomain.com;'.format( + storage_account.name, storage_account_key) + + # Act + service = service_type[0].from_connection_string(conn_string, table_name="foo") + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.credential.account_key, storage_account_key) + self.assertTrue(service._primary_endpoint.startswith('https://www.mydomain.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.core.windows.net')) + + @GlobalStorageAccountPreparer() + async def test_create_service_with_conn_str_custom_domain_trailing_slash_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + for service_type in SERVICES.items(): + conn_string = 'AccountName={};AccountKey={};TableEndpoint=www.mydomain.com/;'.format( + storage_account.name, storage_account_key) + + # Act + service = service_type[0].from_connection_string(conn_string, table_name="foo") + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.credential.account_key, storage_account_key) + self.assertTrue(service._primary_endpoint.startswith('https://www.mydomain.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.table.core.windows.net')) + + @GlobalStorageAccountPreparer() + async def test_create_service_with_conn_str_custom_domain_sec_override_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + for service_type in SERVICES.items(): + conn_string = 'AccountName={};AccountKey={};TableEndpoint=www.mydomain.com/;'.format( + storage_account.name, storage_account_key) + + # Act + service = service_type[0].from_connection_string( + conn_string, secondary_hostname="www-sec.mydomain.com", table_name="foo") + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.credential.account_key, storage_account_key) + self.assertTrue(service._primary_endpoint.startswith('https://www.mydomain.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com')) + + @GlobalStorageAccountPreparer() + async def test_create_service_with_conn_str_fails_if_sec_without_primary_async(self, resource_group, location, storage_account, storage_account_key): + for service_type in SERVICES.items(): + # Arrange + conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;'.format( + storage_account.name, storage_account_key, + _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) + + # Act + + # Fails if primary excluded + with self.assertRaises(ValueError): + service = service_type[0].from_connection_string(conn_string, table_name="foo") + + @GlobalStorageAccountPreparer() + async def test_create_service_with_conn_str_succeeds_if_sec_with_primary_async(self, resource_group, location, storage_account, storage_account_key): + for service_type in SERVICES.items(): + # Arrange + conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;{}=www-sec.mydomain.com;'.format( + storage_account.name, + storage_account_key, + _CONNECTION_ENDPOINTS.get(service_type[1]), + _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) + + # Act + service = service_type[0].from_connection_string(conn_string, table_name="foo") + + # Assert + self.assertIsNotNone(service) + self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.credential.account_key, storage_account_key) + self.assertTrue(service._primary_endpoint.startswith('https://www.mydomain.com')) + # self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com')) + + @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + async def test_create_service_with_custom_account_endpoint_path_async(self, resource_group, location, storage_account, storage_account_key): + custom_account_url = "http://local-machine:11002/custom/account/path/" + self.sas_token + for service_type in SERVICES.items(): + conn_string = 'DefaultEndpointsProtocol=http;AccountName={};AccountKey={};TableEndpoint={};'.format( + storage_account.name, storage_account_key, custom_account_url) + + # Act + service = service_type[0].from_connection_string(conn_string, table_name="foo") + + # Assert + self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.credential.account_key, storage_account_key) + self.assertEqual(service._primary_hostname, 'local-machine:11002/custom/account/path') + + service = TableServiceClient(account_url=custom_account_url) + self.assertEqual(service.account_name, None) + self.assertEqual(service.credential, None) + self.assertEqual(service._primary_hostname, 'local-machine:11002/custom/account/path') + # mine doesnt have a question mark at the end + self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path')) + + service = TableClient(account_url=custom_account_url, table_name="foo") + self.assertEqual(service.account_name, None) + self.assertEqual(service.table_name, "foo") + self.assertEqual(service.credential, None) + self.assertEqual(service._primary_hostname, 'local-machine:11002/custom/account/path') + self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path')) + + service = TableClient.from_table_url("http://local-machine:11002/custom/account/path/foo" + self.sas_token) + self.assertEqual(service.account_name, None) + self.assertEqual(service.table_name, "foo") + self.assertEqual(service.credential, None) + self.assertEqual(service._primary_hostname, 'local-machine:11002/custom/account/path') + self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path')) + + @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + async def test_user_agent_default_async(self, resource_group, location, storage_account, storage_account_key): + service = TableServiceClient(self.account_url(storage_account, "table"), credential=storage_account_key) + + def callback(response): + self.assertTrue('User-Agent' in response.http_request.headers) + self.assertEqual( + response.http_request.headers['User-Agent'], + "azsdk-python-storage-table/{} Python/{} ({})".format( + VERSION, + platform.python_version(), + platform.platform())) + + tables = list(service.list_tables(raw_response_hook=callback)) + self.assertIsInstance(tables, list) + + @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + async def test_user_agent_custom_async(self, resource_group, location, storage_account, storage_account_key): + custom_app = "TestApp/v1.0" + service = TableServiceClient( + self.account_url(storage_account, "table"), credential=storage_account_key, user_agent=custom_app) + + def callback(response): + self.assertTrue('User-Agent' in response.http_request.headers) + self.assertIn( + "TestApp/v1.0 azsdk-python-storage-table/{} Python/{} ({})".format( + VERSION, + platform.python_version(), + platform.platform()), + response.http_request.headers['User-Agent'] + ) + + tables = list(service.list_tables(raw_response_hook=callback)) + self.assertIsInstance(tables, list) + + def callback(response): + self.assertTrue('User-Agent' in response.http_request.headers) + self.assertIn( + "TestApp/v2.0 TestApp/v1.0 azsdk-python-storage-table/{} Python/{} ({})".format( + VERSION, + platform.python_version(), + platform.platform()), + response.http_request.headers['User-Agent'] + ) + + tables = list(service.list_tables(raw_response_hook=callback, user_agent="TestApp/v2.0")) + self.assertIsInstance(tables, list) + + @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + async def test_user_agent_append_async(self, resource_group, location, storage_account, storage_account_key): + # TODO: fix this one + service = TableServiceClient(self.account_url(storage_account, "table"), credential=storage_account_key) + + def callback(response): + self.assertTrue('User-Agent' in response.http_request.headers) + self.assertEqual( + response.http_request.headers['User-Agent'], + "azsdk-python-storage-table/{} Python/{} ({}) customer_user_agent".format( + VERSION, + platform.python_version(), + platform.platform()) + ) + + custom_headers = {'User-Agent': 'customer_user_agent'} + tables = list(service.list_tables(raw_response_hook=callback, headers=custom_headers)) + self.assertIsInstance(tables, list) + + @GlobalStorageAccountPreparer() + async def test_create_table_client_with_complete_table_url_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + table_url = self.account_url(storage_account, "table") + "/foo" + service = TableClient(table_url, table_name='bar', credential=storage_account_key) + + # Assert + self.assertEqual(service.scheme, 'https') + self.assertEqual(service.table_name, 'bar') + + @GlobalStorageAccountPreparer() + async def test_create_table_client_with_complete_url_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + table_url = "https://{}.table.core.windows.net:443/foo".format(storage_account.name) + service = TableClient(account_url=table_url, table_name='bar', credential=storage_account_key) + + # Assert + self.assertEqual(service.scheme, 'https') + self.assertEqual(service.table_name, 'bar') + self.assertEqual(service.account_name, storage_account.name) + + @GlobalStorageAccountPreparer() + async def test_create_table_client_with_invalid_name_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + table_url = "https://{}.table.core.windows.net:443/foo".format(storage_account.name) + invalid_table_name = "my_table" + + # Assert + with pytest.raises(ValueError) as excinfo: + service = TableClient(account_url=table_url, table_name=invalid_table_name, credential=storage_account_key) + + assert "Table names must be alphanumeric, cannot begin with a number, and must be between 3-63 characters long.""" in str(excinfo) + + @GlobalStorageAccountPreparer() + async def test_error_with_malformed_conn_str_async(self): + # Arrange + + for conn_str in ["", "foobar", "foobar=baz=foo", "foo;bar;baz", "foo=;bar=;", "=", ";", "=;=="]: + for service_type in SERVICES.items(): + # Act + with self.assertRaises(ValueError) as e: + service = service_type[0].from_connection_string(conn_str, table_name="test") + + if conn_str in("", "foobar", "foo;bar;baz", ";"): + self.assertEqual( + str(e.exception), "Connection string is either blank or malformed.") + elif conn_str in ("foobar=baz=foo" , "foo=;bar=;", "=", "=;=="): + self.assertEqual( + str(e.exception), "Connection string missing required connection details.") + + @GlobalStorageAccountPreparer() + async def test_closing_pipeline_client_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + for client, url in SERVICES.items(): + # Act + service = client( + self.account_url(storage_account, "table"), credential=storage_account_key, table_name='table') + + # Assert + async with service: + assert hasattr(service, 'close') + await service.close() + + @GlobalStorageAccountPreparer() + async def test_closing_pipeline_client_simple_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + for client, url in SERVICES.items(): + # Act + service = client( + self.account_url(storage_account, "table"), credential=storage_account_key, table_name='table') + await service.close() +# ------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() diff --git a/sdk/tables/azure-data-tables/tests/test_table_entity.py b/sdk/tables/azure-data-tables/tests/test_table_entity.py index c199a57d506f2..db1bd66dead28 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_entity.py +++ b/sdk/tables/azure-data-tables/tests/test_table_entity.py @@ -22,7 +22,8 @@ from azure.core.exceptions import ( HttpResponseError, ResourceNotFoundError, - ResourceExistsError) + ResourceExistsError, + ResourceModifiedError) from azure.data.tables._entity import TableEntity, EntityProperty, EdmType from azure.data.tables._models import TableSasPermissions, AccessPolicy, UpdateMode @@ -115,7 +116,7 @@ def _create_random_entity_dict(self, pk=None, rk=None): 'Birthday': datetime(1973, 10, 4, tzinfo=tzutc()), 'birthday': datetime(1970, 10, 4, tzinfo=tzutc()), 'binary': b'binary', - 'other': EntityProperty(type=EdmType.INT32, value=20), + 'other': EntityProperty(value=20, type=EdmType.INT32), 'clsid': uuid.UUID('c9da6455-213d-42c9-9a79-3e9149a57833') } return TableEntity(**properties) @@ -123,8 +124,8 @@ def _create_random_entity_dict(self, pk=None, rk=None): def _insert_random_entity(self, pk=None, rk=None): entity = self._create_random_entity_dict(pk, rk) # etag = self.table.create_item(entity, response_hook=lambda e, h: h['etag']) - e = self.table.create_entity(entity) - metadata = e.metadata() + metadata = self.table.create_entity(entity) + # metadata = e.metadata() return entity, metadata['etag'] def _create_updated_entity_dict(self, partition, row): @@ -147,7 +148,7 @@ def _assert_default_entity(self, entity, headers=None): ''' Asserts that the entity passed in matches the default entity. ''' - self.assertEqual(entity['age'], 39) + self.assertEqual(entity['age'].value, 39) self.assertEqual(entity['sex'], 'male') self.assertEqual(entity['married'], True) self.assertEqual(entity['deceased'], False) @@ -155,7 +156,7 @@ def _assert_default_entity(self, entity, headers=None): self.assertFalse("aquarius" in entity) self.assertEqual(entity['ratio'], 3.1) self.assertEqual(entity['evenratio'], 3.0) - self.assertEqual(entity['large'], 933311100) + self.assertEqual(entity['large'].value, 933311100) self.assertEqual(entity['Birthday'], datetime(1973, 10, 4, tzinfo=tzutc())) self.assertEqual(entity['birthday'], datetime(1970, 10, 4, tzinfo=tzutc())) self.assertEqual(entity['binary'].value, b'binary') @@ -175,7 +176,7 @@ def _assert_default_entity_json_full_metadata(self, entity, headers=None): ''' Asserts that the entity passed in matches the default entity. ''' - self.assertEqual(entity['age'], 39) + self.assertEqual(entity['age'].value, 39) self.assertEqual(entity['sex'], 'male') self.assertEqual(entity['married'], True) self.assertEqual(entity['deceased'], False) @@ -183,7 +184,7 @@ def _assert_default_entity_json_full_metadata(self, entity, headers=None): self.assertFalse("aquarius" in entity) self.assertEqual(entity['ratio'], 3.1) self.assertEqual(entity['evenratio'], 3.0) - self.assertEqual(entity['large'], 933311100) + self.assertEqual(entity['large'].value, 933311100) self.assertEqual(entity['Birthday'], datetime(1973, 10, 4, tzinfo=tzutc())) self.assertEqual(entity['birthday'], datetime(1970, 10, 4, tzinfo=tzutc())) self.assertEqual(entity['binary'].value, b'binary') @@ -207,7 +208,7 @@ def _assert_default_entity_json_no_metadata(self, entity, headers=None): ''' Asserts that the entity passed in matches the default entity. ''' - self.assertEqual(entity['age'], '39') + self.assertEqual(entity['age'].value, 39) self.assertEqual(entity['sex'], 'male') self.assertEqual(entity['married'], True) self.assertEqual(entity['deceased'], False) @@ -215,7 +216,7 @@ def _assert_default_entity_json_no_metadata(self, entity, headers=None): self.assertFalse("aquarius" in entity) self.assertEqual(entity['ratio'], 3.1) self.assertEqual(entity['evenratio'], 3.0) - self.assertEqual(entity['large'], '933311100') + self.assertEqual(entity['large'].value, 933311100) self.assertTrue(entity['Birthday'].startswith('1973-10-04T00:00:00')) self.assertTrue(entity['birthday'].startswith('1970-10-04T00:00:00')) self.assertTrue(entity['Birthday'].endswith('00Z')) @@ -269,7 +270,7 @@ def _assert_merged_entity(self, entity): self.assertEqual(entity.sign, 'aquarius') self.assertEqual(entity.ratio, 3.1) self.assertEqual(entity.evenratio, 3.0) - self.assertEqual(entity.large, 933311100) + self.assertEqual(entity.large.value, 933311100) self.assertEqual(entity.Birthday, datetime(1973, 10, 4, tzinfo=tzutc())) self.assertEqual(entity.birthday, datetime(1991, 10, 4, tzinfo=tzutc())) self.assertIsInstance(entity.other, EntityProperty) @@ -282,6 +283,14 @@ def _assert_merged_entity(self, entity): # self.assertIsNotNone(entity.Timestamp) # self.assertIsInstance(entity.Timestamp, datetime) + def _assert_valid_metadata(self, metadata): + keys = metadata.keys() + self.assertIn("version", keys) + self.assertIn("date", keys) + self.assertIn("etag", keys) + self.assertEqual(len(keys), 3) + + # --Test cases for entities ------------------------------------------ @GlobalStorageAccountPreparer() def test_insert_etag(self, resource_group, location, storage_account, storage_account_key): @@ -326,8 +335,8 @@ def test_insert_entity_dictionary(self, resource_group, location, storage_accoun # resp = self.table.create_item(entity) resp = self.table.create_entity(entity=entity) - # Assert --- Does this mean insert returns nothing? - self.assertIsNotNone(resp) + # Assert + self._assert_valid_metadata(resp) finally: self._tear_down() @@ -340,12 +349,15 @@ def test_insert_entity_with_hook(self, resource_group, location, storage_account entity = self._create_random_entity_dict() # Act - # , response_hook=lambda e, h: (e, h) resp = self.table.create_entity(entity=entity) + received_entity = self.table.get_entity( + row_key=entity['RowKey'], + partition_key=entity['PartitionKey'] + ) # Assert - self.assertIsNotNone(resp) - self._assert_default_entity(resp) + self._assert_valid_metadata(resp) + self._assert_default_entity(received_entity) finally: self._tear_down() @@ -356,17 +368,22 @@ def test_insert_entity_with_no_metadata(self, resource_group, location, storage_ self._set_up(storage_account, storage_account_key) try: entity = self._create_random_entity_dict() - + headers = {'Accept': 'application/json;odata=nometadata'} # Act # response_hook=lambda e, h: (e, h) resp = self.table.create_entity( entity=entity, - headers={'Accept': 'application/json;odata=nometadata'}, + headers=headers, + ) + received_entity = self.table.get_entity( + row_key=entity['RowKey'], + partition_key=entity['PartitionKey'], + headers=headers ) # Assert - self.assertIsNotNone(resp) - self._assert_default_entity_json_no_metadata(resp) + self._assert_valid_metadata(resp) + self._assert_default_entity_json_no_metadata(received_entity) finally: self._tear_down() @@ -377,17 +394,22 @@ def test_insert_entity_with_full_metadata(self, resource_group, location, storag self._set_up(storage_account, storage_account_key) try: entity = self._create_random_entity_dict() + headers = {'Accept': 'application/json;odata=fullmetadata'} # Act - # response_hook=lambda e, h: (e, h) resp = self.table.create_entity( entity=entity, headers={'Accept': 'application/json;odata=fullmetadata'}, ) + received_entity = self.table.get_entity( + row_key=entity['RowKey'], + partition_key=entity['PartitionKey'], + headers=headers + ) # Assert - self.assertIsNotNone(resp) - self._assert_default_entity_json_full_metadata(resp) + self._assert_valid_metadata(resp) + self._assert_default_entity_json_full_metadata(received_entity) finally: self._tear_down() @@ -401,7 +423,6 @@ def test_insert_entity_conflict(self, resource_group, location, storage_account, # Act with self.assertRaises(ResourceExistsError): - # self.table.create_item(entity) self.table.create_entity(entity=entity) # Assert @@ -417,13 +438,13 @@ def test_insert_entity_with_large_int32_value_throws(self, resource_group, locat try: # Act dict32 = self._create_random_base_entity_dict() - dict32['large'] = EntityProperty(EdmType.INT32, 2 ** 31) + dict32['large'] = EntityProperty(2 ** 31, EdmType.INT32) # Assert with self.assertRaises(TypeError): self.table.create_entity(entity=dict32) - dict32['large'] = EntityProperty(EdmType.INT32, -(2 ** 31 + 1)) + dict32['large'] = EntityProperty(-(2 ** 31 + 1), EdmType.INT32) with self.assertRaises(TypeError): self.table.create_entity(entity=dict32) finally: @@ -438,13 +459,13 @@ def test_insert_entity_with_large_int64_value_throws(self, resource_group, locat try: # Act dict64 = self._create_random_base_entity_dict() - dict64['large'] = EntityProperty(EdmType.INT64, 2 ** 63) + dict64['large'] = EntityProperty(2 ** 63, EdmType.INT64) # Assert with self.assertRaises(TypeError): self.table.create_entity(entity=dict64) - dict64['large'] = EntityProperty(EdmType.INT64, -(2 ** 63 + 1)) + dict64['large'] = EntityProperty(-(2 ** 63 + 1), EdmType.INT64) with self.assertRaises(TypeError): self.table.create_entity(entity=dict64) finally: @@ -480,9 +501,8 @@ def test_insert_entity_empty_string_pk(self, resource_group, location, storage_a self.table.create_entity(entity=entity) else: resp = self.table.create_entity(entity=entity) + self._assert_valid_metadata(resp) - # Assert - # self.assertIsNone(resp) finally: self._tear_down() @@ -498,7 +518,6 @@ def test_insert_entity_missing_rk(self, resource_group, location, storage_accoun with self.assertRaises(ValueError): resp = self.table.create_entity(entity=entity) - # Assert finally: self._tear_down() @@ -516,9 +535,8 @@ def test_insert_entity_empty_string_rk(self, resource_group, location, storage_a self.table.create_entity(entity=entity) else: resp = self.table.create_entity(entity=entity) + self._assert_valid_metadata(resp) - # Assert - # self.assertIsNone(resp) finally: self._tear_down() @@ -624,6 +642,164 @@ def test_get_entity_if_match(self, resource_group, location, storage_account, st match_condition=MatchConditions.IfNotModified ) + with self.assertRaises(ResourceNotFoundError): + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + + # Assert + finally: + self._tear_down() + + # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + def test_get_entity_if_match_wrong_etag(self, resource_group, location, storage_account, storage_account_key): + # Arrange + self._set_up(storage_account, storage_account_key) + try: + table = self.ts.create_table("testtable") + entity = { + "PartitionKey": "PartitionKey", + "RowKey": "RowKey", + "Value": 1 + } + + response = table.create_entity(entity=entity) + old_etag = response["etag"] + + entity["Value"] = 2 + response = table.update_entity(entity=entity) + + with self.assertRaises(HttpResponseError): + table.delete_entity( + partition_key=entity['PartitionKey'], + row_key=entity['RowKey'], + etag=old_etag, + match_condition=MatchConditions.IfNotModified + ) + + finally: + self._tear_down() + + # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + def test_get_entity_if_match_modified(self, resource_group, location, storage_account, storage_account_key): + # Arrange + self._set_up(storage_account, storage_account_key) + try: + entity, etag = self._insert_random_entity() + self._create_query_table(1) + + # Act + # Do a get and confirm the etag is parsed correctly by using it + # as a condition to delete. + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + + # This is ignoring the match_condition param and will delete the entity + self.table.delete_entity( + partition_key=resp['PartitionKey'], + row_key=resp['RowKey'], + etag=etag, + match_condition=MatchConditions.IfModified + ) + + with self.assertRaises(ResourceNotFoundError): + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + + # Assert + finally: + self._tear_down() + + # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + def test_get_entity_if_match_unconditionally(self, resource_group, location, storage_account, storage_account_key): + # Arrange + self._set_up(storage_account, storage_account_key) + try: + entity, etag = self._insert_random_entity() + self._create_query_table(1) + + # Act + # Do a get and confirm the etag is parsed correctly by using it + # as a condition to delete. + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + + # This is ignoring the match_condition param and will delete the entity + self.table.delete_entity( + partition_key=resp['PartitionKey'], + row_key=resp['RowKey'], + etag='abcdef', + match_condition=MatchConditions.Unconditionally + ) + + with self.assertRaises(ResourceNotFoundError): + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + + # Assert + finally: + self._tear_down() + + # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + def test_get_entity_if_match_present(self, resource_group, location, storage_account, storage_account_key): + # Arrange + self._set_up(storage_account, storage_account_key) + try: + entity, etag = self._insert_random_entity() + self._create_query_table(1) + + # Act + # Do a get and confirm the etag is parsed correctly by using it + # as a condition to delete. + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + + # This is ignoring the match_condition param and will delete the entity + self.table.delete_entity( + partition_key=resp['PartitionKey'], + row_key=resp['RowKey'], + etag='abcdef', + match_condition=MatchConditions.IfPresent + ) + + with self.assertRaises(ResourceNotFoundError): + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + + # Assert + finally: + self._tear_down() + + # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + def test_get_entity_if_match_missing(self, resource_group, location, storage_account, storage_account_key): + # Arrange + self._set_up(storage_account, storage_account_key) + try: + entity, etag = self._insert_random_entity() + self._create_query_table(1) + + # Act + # Do a get and confirm the etag is parsed correctly by using it + # as a condition to delete. + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + + # This is ignoring the match_condition param and will delete the entity + self.table.delete_entity( + partition_key=resp['PartitionKey'], + row_key=resp['RowKey'], + etag='abcdef', + match_condition=MatchConditions.IfMissing + ) + + with self.assertRaises(ResourceNotFoundError): + resp = self.table.get_entity(partition_key=entity['PartitionKey'], + row_key=entity['RowKey']) + # Assert finally: self._tear_down() @@ -702,13 +878,13 @@ def test_get_entity_with_special_doubles(self, resource_group, location, storage self.table.create_entity(entity=entity) # Act - resp = self.table.get_entity(partition_key=entity['PartitionKey'], + received_entity = self.table.get_entity(partition_key=entity['PartitionKey'], row_key=entity['RowKey']) # Assert - self.assertEqual(resp.inf, float('inf')) - self.assertEqual(resp.negativeinf, float('-inf')) - self.assertTrue(isnan(resp.nan)) + self.assertEqual(received_entity.inf, float('inf')) + self.assertEqual(received_entity.negativeinf, float('-inf')) + self.assertTrue(isnan(received_entity.nan)) finally: self._tear_down() @@ -731,6 +907,7 @@ def test_update_entity(self, resource_group, location, storage_account, storage_ received_entity = self.table.get_entity(partition_key=entity.PartitionKey, row_key=entity.RowKey) + self._assert_valid_metadata(resp) self._assert_updated_entity(received_entity) finally: self._tear_down() @@ -762,13 +939,13 @@ def test_update_entity_with_if_matches(self, resource_group, location, storage_a # Act sent_entity = self._create_updated_entity_dict(entity.PartitionKey, entity.RowKey) - # , response_hook=lambda e, h: h) - self.table.update_entity( + + resp = self.table.update_entity( mode=UpdateMode.REPLACE, entity=sent_entity, etag=etag, match_condition=MatchConditions.IfNotModified) # Assert - # self.assertTrue(resp) + self._assert_valid_metadata(resp) received_entity = self.table.get_entity(entity.PartitionKey, entity.RowKey) self._assert_updated_entity(received_entity) finally: @@ -809,7 +986,7 @@ def test_insert_or_merge_entity_with_existing_entity(self, resource_group, locat resp = self.table.upsert_entity(mode=UpdateMode.MERGE, entity=sent_entity) # Assert - self.assertIsNone(resp) + self._assert_valid_metadata(resp) received_entity = self.table.get_entity(entity.PartitionKey, entity.RowKey) self._assert_merged_entity(received_entity) finally: @@ -829,7 +1006,7 @@ def test_insert_or_merge_entity_with_non_existing_entity(self, resource_group, l resp = self.table.upsert_entity(mode=UpdateMode.MERGE, entity=sent_entity) # Assert - self.assertIsNone(resp) + self._assert_valid_metadata(resp) received_entity = self.table.get_entity(entity['PartitionKey'], entity['RowKey']) self._assert_updated_entity(received_entity) @@ -850,7 +1027,7 @@ def test_insert_or_replace_entity_with_existing_entity(self, resource_group, loc resp = self.table.upsert_entity(mode=UpdateMode.REPLACE, entity=sent_entity) # Assert - # self.assertIsNone(resp) + self._assert_valid_metadata(resp) received_entity = self.table.get_entity(entity.PartitionKey, entity.RowKey) self._assert_updated_entity(received_entity) finally: @@ -870,7 +1047,7 @@ def test_insert_or_replace_entity_with_non_existing_entity(self, resource_group, resp = self.table.upsert_entity(mode=UpdateMode.REPLACE, entity=sent_entity) # Assert - self.assertIsNone(resp) + self._assert_valid_metadata(resp) received_entity = self.table.get_entity(entity['PartitionKey'], entity['RowKey']) self._assert_updated_entity(received_entity) @@ -890,7 +1067,7 @@ def test_merge_entity(self, resource_group, location, storage_account, storage_a resp = self.table.update_entity(mode=UpdateMode.MERGE, entity=sent_entity) # Assert - self.assertIsNone(resp) + self._assert_valid_metadata(resp) received_entity = self.table.get_entity(entity.PartitionKey, entity.RowKey) self._assert_merged_entity(received_entity) finally: @@ -930,7 +1107,7 @@ def test_merge_entity_with_if_matches(self, resource_group, location, storage_ac match_condition=MatchConditions.IfNotModified) # Assert - self.assertIsNone(resp) + self._assert_valid_metadata(resp) received_entity = self.table.get_entity(entity.PartitionKey, entity.RowKey) self._assert_merged_entity(received_entity) finally: @@ -1096,7 +1273,7 @@ def test_operations_on_entity_with_partition_key_having_single_quote(self, resou resp = self.table.upsert_entity(mode=UpdateMode.MERGE, entity=sent_entity) # Assert - self.assertIsNone(resp) + self._assert_valid_metadata(resp) # row key here only has 2 quotes received_entity = self.table.get_entity(entity.PartitionKey, entity.RowKey) self._assert_updated_entity(received_entity) @@ -1106,7 +1283,7 @@ def test_operations_on_entity_with_partition_key_having_single_quote(self, resou resp = self.table.update_entity(mode=UpdateMode.MERGE, entity=sent_entity) # Assert - self.assertIsNone(resp) + self._assert_valid_metadata(resp) received_entity = self.table.get_entity(entity.PartitionKey, entity.RowKey) self._assert_updated_entity(received_entity) self.assertEqual(received_entity['newField'], 'newFieldValue') @@ -1167,7 +1344,7 @@ def test_none_property_value(self, resource_group, location, storage_account, st entity = self._create_random_base_entity_dict() entity.update({'NoneValue': None}) - # Act + # Act self.table.create_entity(entity=entity) resp = self.table.get_entity(entity['PartitionKey'], entity['RowKey']) @@ -1187,7 +1364,7 @@ def test_binary_property_value(self, resource_group, location, storage_account, entity = self._create_random_base_entity_dict() entity.update({'binary': b'\x01\x02\x03\x04\x05\x06\x07\x08\t\n'}) - # Act + # Act self.table.create_entity(entity=entity) resp = self.table.get_entity(entity['PartitionKey'], entity['RowKey']) @@ -1304,10 +1481,10 @@ def test_query_entities_large(self, resource_group, location, storage_account, s entity = Entity() entity.PartitionKey = 'large' entity.RowKey = 'batch{0}-item{1}'.format(j, i) - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'hello world;' * 100 entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime(2016, 12, 31, 11, 59, 59, 0) batch.create_entity(entity) self.ts.commit_batch(table_name, batch) @@ -1355,7 +1532,7 @@ def test_query_entities_with_select(self, resource_group, location, storage_acco # Assert self.assertEqual(len(entities), 2) - self.assertEqual(entities[0].age, 39) + self.assertEqual(entities[0].age.value, 39) self.assertEqual(entities[0].sex, 'male') self.assertFalse(hasattr(entities[0], "birthday")) self.assertFalse(hasattr(entities[0], "married")) @@ -1585,10 +1762,11 @@ def test_sas_update(self, resource_group, location, storage_account, storage_acc ) table = service.get_table_client(self.table_name) updated_entity = self._create_updated_entity_dict(entity.PartitionKey, entity.RowKey) - table.update_entity(mode=UpdateMode.REPLACE, entity=updated_entity) + resp = table.update_entity(mode=UpdateMode.REPLACE, entity=updated_entity) # Assert received_entity = self.table.get_entity(entity.PartitionKey, entity.RowKey) + self.assertIsNotNone(resp) self._assert_updated_entity(received_entity) finally: self._tear_down() diff --git a/sdk/tables/azure-data-tables/tests/test_table_entity_async.py b/sdk/tables/azure-data-tables/tests/test_table_entity_async.py index e6b6272e72503..91c483b93a5e6 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_entity_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_entity_async.py @@ -117,7 +117,7 @@ def _create_random_entity_dict(self, pk=None, rk=None): 'Birthday': datetime(1973, 10, 4, tzinfo=tzutc()), 'birthday': datetime(1970, 10, 4, tzinfo=tzutc()), 'binary': b'binary', - 'other': EntityProperty(type=EdmType.INT32, value=20), + 'other': EntityProperty(value=20, type=EdmType.INT32), 'clsid': uuid.UUID('c9da6455-213d-42c9-9a79-3e9149a57833') } return TableEntity(**properties) @@ -125,9 +125,7 @@ def _create_random_entity_dict(self, pk=None, rk=None): async def _insert_random_entity(self, pk=None, rk=None): entity = self._create_random_entity_dict(pk, rk) # , response_hook=lambda e, h: h['etag'] - e = await self.table.create_entity(entity=entity) - metadata = e.metadata() - # etag = e['etag'] + metadata = await self.table.create_entity(entity=entity) return entity, metadata['etag'] def _create_updated_entity_dict(self, partition, row): @@ -150,7 +148,7 @@ def _assert_default_entity(self, entity, headers=None): ''' Asserts that the entity passed in matches the default entity. ''' - self.assertEqual(entity['age'], 39) + self.assertEqual(entity['age'].value, 39) self.assertEqual(entity['sex'], 'male') self.assertEqual(entity['married'], True) self.assertEqual(entity['deceased'], False) @@ -158,7 +156,7 @@ def _assert_default_entity(self, entity, headers=None): self.assertFalse("aquarius" in entity) self.assertEqual(entity['ratio'], 3.1) self.assertEqual(entity['evenratio'], 3.0) - self.assertEqual(entity['large'], 933311100) + self.assertEqual(entity['large'].value, 933311100) self.assertEqual(entity['Birthday'], datetime(1973, 10, 4, tzinfo=tzutc())) self.assertEqual(entity['birthday'], datetime(1970, 10, 4, tzinfo=tzutc())) self.assertEqual(entity['binary'].value, b'binary') # TODO: added the ".value" portion, verify this is correct @@ -167,7 +165,7 @@ def _assert_default_entity(self, entity, headers=None): self.assertEqual(entity['other'].value, 20) self.assertEqual(entity['clsid'], uuid.UUID('c9da6455-213d-42c9-9a79-3e9149a57833')) # self.assertTrue('metadata' in entity.odata) - + # TODO: these are commented out / nonexistent in sync code, should we have them? # self.assertIsNotNone(entity.Timestamp) # self.assertIsInstance(entity.Timestamp, datetime) @@ -179,7 +177,7 @@ def _assert_default_entity_json_full_metadata(self, entity, headers=None): ''' Asserts that the entity passed in matches the default entity. ''' - self.assertEqual(entity['age'], 39) + self.assertEqual(entity['age'].value, 39) self.assertEqual(entity['sex'], 'male') self.assertEqual(entity['married'], True) self.assertEqual(entity['deceased'], False) @@ -187,7 +185,7 @@ def _assert_default_entity_json_full_metadata(self, entity, headers=None): self.assertFalse("aquarius" in entity) self.assertEqual(entity['ratio'], 3.1) self.assertEqual(entity['evenratio'], 3.0) - self.assertEqual(entity['large'], 933311100) + self.assertEqual(entity['large'].value, 933311100) self.assertEqual(entity['Birthday'], datetime(1973, 10, 4, tzinfo=tzutc())) self.assertEqual(entity['birthday'], datetime(1970, 10, 4, tzinfo=tzutc())) self.assertEqual(entity['binary'].value, b'binary') @@ -212,7 +210,7 @@ def _assert_default_entity_json_no_metadata(self, entity, headers=None): ''' Asserts that the entity passed in matches the default entity. ''' - self.assertEqual(entity['age'], '39') + self.assertEqual(entity['age'].value, 39) self.assertEqual(entity['sex'], 'male') self.assertEqual(entity['married'], True) self.assertEqual(entity['deceased'], False) @@ -220,7 +218,7 @@ def _assert_default_entity_json_no_metadata(self, entity, headers=None): self.assertFalse("aquarius" in entity) self.assertEqual(entity['ratio'], 3.1) self.assertEqual(entity['evenratio'], 3.0) - self.assertEqual(entity['large'], '933311100') + self.assertEqual(entity['large'].value, 933311100) self.assertTrue(entity['Birthday'].startswith('1973-10-04T00:00:00')) self.assertTrue(entity['birthday'].startswith('1970-10-04T00:00:00')) self.assertTrue(entity['Birthday'].endswith('00Z')) @@ -273,7 +271,7 @@ def _assert_merged_entity(self, entity): self.assertEqual(entity.sign, 'aquarius') self.assertEqual(entity.ratio, 3.1) self.assertEqual(entity.evenratio, 3.0) - self.assertEqual(entity.large, 933311100) + self.assertEqual(entity.large.value, 933311100) self.assertEqual(entity.Birthday, datetime(1973, 10, 4, tzinfo=tzutc())) self.assertEqual(entity.birthday, datetime(1991, 10, 4, tzinfo=tzutc())) self.assertIsInstance(entity.other, EntityProperty) @@ -287,8 +285,14 @@ def _assert_merged_entity(self, entity): # self.assertIsNotNone(entity.Timestamp) # self.assertIsInstance(entity.Timestamp, datetime) + def _assert_valid_metadata(self, metadata): + keys = metadata.keys() + self.assertIn("version", keys) + self.assertIn("date", keys) + self.assertIn("etag", keys) + self.assertEqual(len(keys), 3) + # --Test cases for entities ------------------------------------------ - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() async def test_insert_entity_dictionary(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -297,15 +301,13 @@ async def test_insert_entity_dictionary(self, resource_group, location, storage_ entity = self._create_random_entity_dict() # Act - # resp = self.table.create_item(entity) resp = await self.table.create_entity(entity=entity) - # Assert --- Does this mean insert returns nothing? - self.assertIsNotNone(resp) + # Assert + self._assert_valid_metadata(resp) finally: await self._tear_down() - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() async def test_insert_entity_with_hook(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -314,37 +316,42 @@ async def test_insert_entity_with_hook(self, resource_group, location, storage_a entity = self._create_random_entity_dict() # Act - # , response_hook = lambda e, h: (e, h) resp = await self.table.create_entity(entity=entity) - + received_entity = await self.table.get_entity( + partition_key=entity["PartitionKey"], + row_key=entity["RowKey"] + ) # Assert - self.assertIsNotNone(resp) - self._assert_default_entity(resp) + self._assert_valid_metadata(resp) + self._assert_default_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() async def test_insert_entity_with_no_metadata(self, resource_group, location, storage_account, storage_account_key): # Arrange await self._set_up(storage_account, storage_account_key) try: entity = self._create_random_entity_dict() - + headers = {'Accept': 'application/json;odata=nometadata'} # Act # response_hook = lambda e, h: (e, h) resp = await self.table.create_entity( entity=entity, headers={'Accept': 'application/json;odata=nometadata'}, - ) + ) + received_entity = await self.table.get_entity( + partition_key=entity["PartitionKey"], + row_key=entity["RowKey"], + headers=headers + ) # Assert - self.assertIsNotNone(resp) - self._assert_default_entity_json_no_metadata(resp) + self._assert_valid_metadata(resp) + self._assert_default_entity_json_no_metadata(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() async def test_insert_entity_with_full_metadata(self, resource_group, location, storage_account, storage_account_key): @@ -352,20 +359,26 @@ async def test_insert_entity_with_full_metadata(self, resource_group, location, await self._set_up(storage_account, storage_account_key) try: entity = self._create_random_entity_dict() + headers = {'Accept': 'application/json;odata=fullmetadata'} # Act # response_hook=lambda e, h: (e, h) resp = await self.table.create_entity( entity=entity, - headers={'Accept': 'application/json;odata=fullmetadata'},) + headers=headers + ) + received_entity = await self.table.get_entity( + partition_key=entity["PartitionKey"], + row_key=entity["RowKey"], + headers=headers + ) # Assert - self.assertIsNotNone(resp) - self._assert_default_entity_json_full_metadata(resp) + self._assert_valid_metadata(resp) + self._assert_default_entity_json_full_metadata(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() async def test_insert_entity_conflict(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -382,7 +395,6 @@ async def test_insert_entity_conflict(self, resource_group, location, storage_ac finally: await self._tear_down() - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() async def test_insert_entity_with_large_int32_value_throws(self, resource_group, location, storage_account, storage_account_key): @@ -391,19 +403,19 @@ async def test_insert_entity_with_large_int32_value_throws(self, resource_group, try: # Act dict32 = self._create_random_base_entity_dict() - dict32['large'] = EntityProperty(EdmType.INT32, 2 ** 31) + dict32['large'] = EntityProperty(2 ** 31, EdmType.INT32) # TODO: this is outside the range of int32 # Assert with self.assertRaises(TypeError): await self.table.create_entity(entity=dict32) - dict32['large'] = EntityProperty(EdmType.INT32, -(2 ** 31 + 1)) + dict32['large'] = EntityProperty(-(2 ** 31 + 1), EdmType.INT32) # TODO: this is outside the range of int32 with self.assertRaises(TypeError): await self.table.create_entity(entity=dict32) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_entity_with_large_int64_value_throws(self, resource_group, location, storage_account, storage_account_key): @@ -412,19 +424,19 @@ async def test_insert_entity_with_large_int64_value_throws(self, resource_group, try: # Act dict64 = self._create_random_base_entity_dict() - dict64['large'] = EntityProperty(EdmType.INT64, 2 ** 63) + dict64['large'] = EntityProperty(2 ** 63, EdmType.INT64) # Assert with self.assertRaises(TypeError): await self.table.create_entity(entity=dict64) - dict64['large'] = EntityProperty(EdmType.INT64, -(2 ** 63 + 1)) + dict64['large'] = EntityProperty(-(2 ** 63 + 1), EdmType.INT64) with self.assertRaises(TypeError): await self.table.create_entity(entity=dict64) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_entity_missing_pk(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -434,13 +446,11 @@ async def test_insert_entity_missing_pk(self, resource_group, location, storage_ # Act with self.assertRaises(ValueError): - # resp = self.table.create_item(entity) resp = await self.table.create_entity(entity=entity) - # Assert finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_entity_empty_string_pk(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -454,13 +464,11 @@ async def test_insert_entity_empty_string_pk(self, resource_group, location, sto await self.table.create_entity(entity=entity) else: resp = await self.table.create_entity(entity=entity) - - # Assert - # self.assertIsNone(resp) + self._assert_valid_metadata(resp) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_entity_missing_rk(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -476,7 +484,7 @@ async def test_insert_entity_missing_rk(self, resource_group, location, storage_ finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_entity_empty_string_rk(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -490,13 +498,14 @@ async def test_insert_entity_empty_string_rk(self, resource_group, location, sto await self.table.create_entity(entity=entity) else: resp = await self.table.create_entity(entity=entity) + self._assert_valid_metadata(resp) # Assert # self.assertIsNone(resp) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_entity_too_many_properties(self, resource_group, location, storage_account, storage_account_key): @@ -512,12 +521,11 @@ async def test_insert_entity_too_many_properties(self, resource_group, location, # Act with self.assertRaises(HttpResponseError): resp = await self.table.create_entity(entity=entity) - # Assert finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_entity_property_name_too_long(self, resource_group, location, storage_account, storage_account_key): @@ -537,7 +545,7 @@ async def test_insert_entity_property_name_too_long(self, resource_group, locati finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_get_entity(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -556,7 +564,7 @@ async def test_get_entity(self, resource_group, location, storage_account, stora finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_get_entity_with_hook(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -579,7 +587,7 @@ async def test_get_entity_with_hook(self, resource_group, location, storage_acco finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_get_entity_if_match(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -604,7 +612,7 @@ async def test_get_entity_if_match(self, resource_group, location, storage_accou finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_get_entity_full_metadata(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -625,7 +633,7 @@ async def test_get_entity_full_metadata(self, resource_group, location, storage_ finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_get_entity_no_metadata(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -646,7 +654,7 @@ async def test_get_entity_no_metadata(self, resource_group, location, storage_ac finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_get_entity_not_existing(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -663,7 +671,7 @@ async def test_get_entity_not_existing(self, resource_group, location, storage_a finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_get_entity_with_special_doubles(self, resource_group, location, storage_account, storage_account_key): @@ -689,7 +697,7 @@ async def test_get_entity_with_special_doubles(self, resource_group, location, s finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_update_entity(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -709,11 +717,12 @@ async def test_update_entity(self, resource_group, location, storage_account, st partition_key=entity.PartitionKey, row_key=entity.RowKey) + self._assert_valid_metadata(resp) self._assert_updated_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_update_entity_not_existing(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -730,7 +739,7 @@ async def test_update_entity_not_existing(self, resource_group, location, storag finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_update_entity_with_if_matches(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -739,22 +748,21 @@ async def test_update_entity_with_if_matches(self, resource_group, location, sto entity, etag = await self._insert_random_entity() # Act - #, response_hook=lambda e, h: h) sent_entity = self._create_updated_entity_dict(entity.PartitionKey, entity.RowKey) - await self.table.update_entity( + resp = await self.table.update_entity( mode=UpdateMode.REPLACE, entity=sent_entity, etag=etag, match_condition=MatchConditions.IfNotModified) # Assert - # self.assertTrue(resp) received_entity = await self.table.get_entity(entity.PartitionKey, entity.RowKey) + self._assert_valid_metadata(resp) self._assert_updated_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_update_entity_with_if_doesnt_match(self, resource_group, location, storage_account, storage_account_key): @@ -776,7 +784,7 @@ async def test_update_entity_with_if_doesnt_match(self, resource_group, location finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_or_merge_entity_with_existing_entity(self, resource_group, location, storage_account, storage_account_key): @@ -790,14 +798,14 @@ async def test_insert_or_merge_entity_with_existing_entity(self, resource_group, resp = await self.table.upsert_entity(mode=UpdateMode.MERGE, entity=sent_entity) # Assert - self.assertIsNone(resp) received_entity = await self.table.get_entity(entity.PartitionKey, entity.RowKey) + self._assert_valid_metadata(resp) self._assert_merged_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_or_merge_entity_with_non_existing_entity(self, resource_group, location, storage_account, storage_account_key): @@ -811,14 +819,14 @@ async def test_insert_or_merge_entity_with_non_existing_entity(self, resource_gr resp = await self.table.upsert_entity(mode=UpdateMode.MERGE, entity=sent_entity) # Assert - self.assertIsNone(resp) received_entity = await self.table.get_entity(entity['PartitionKey'], entity['RowKey']) + self._assert_valid_metadata(resp) self._assert_updated_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_or_replace_entity_with_existing_entity(self, resource_group, location, storage_account, storage_account_key): @@ -832,14 +840,14 @@ async def test_insert_or_replace_entity_with_existing_entity(self, resource_grou resp = await self.table.upsert_entity(mode=UpdateMode.REPLACE, entity=sent_entity) # Assert - # self.assertIsNone(resp) received_entity = await self.table.get_entity(entity.PartitionKey, entity.RowKey) + self._assert_valid_metadata(resp) self._assert_updated_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_insert_or_replace_entity_with_non_existing_entity(self, resource_group, location, storage_account, storage_account_key): @@ -853,14 +861,14 @@ async def test_insert_or_replace_entity_with_non_existing_entity(self, resource_ resp = await self.table.upsert_entity(mode=UpdateMode.REPLACE, entity=sent_entity) # Assert - self.assertIsNone(resp) received_entity = await self.table.get_entity(entity['PartitionKey'], entity['RowKey']) + self.assertIsNotNone(resp) self._assert_updated_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_merge_entity(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -873,14 +881,14 @@ async def test_merge_entity(self, resource_group, location, storage_account, sto resp = await self.table.update_entity(mode=UpdateMode.MERGE, entity=sent_entity) # Assert - self.assertIsNone(resp) received_entity = await self.table.get_entity(entity.PartitionKey, entity.RowKey) + self._assert_valid_metadata(resp) self._assert_merged_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_merge_entity_not_existing(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -897,7 +905,7 @@ async def test_merge_entity_not_existing(self, resource_group, location, storage finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_merge_entity_with_if_matches(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -912,14 +920,14 @@ async def test_merge_entity_with_if_matches(self, resource_group, location, stor match_condition=MatchConditions.IfNotModified) # Assert - self.assertIsNone(resp) received_entity = await self.table.get_entity(entity.PartitionKey, entity.RowKey) + self._assert_valid_metadata(resp) self._assert_merged_entity(received_entity) finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_merge_entity_with_if_doesnt_match(self, resource_group, location, storage_account, storage_account_key): @@ -940,7 +948,7 @@ async def test_merge_entity_with_if_doesnt_match(self, resource_group, location, finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_delete_entity(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -958,7 +966,7 @@ async def test_delete_entity(self, resource_group, location, storage_account, st finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_delete_entity_not_existing(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -974,7 +982,7 @@ async def test_delete_entity_not_existing(self, resource_group, location, storag finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_delete_entity_with_if_matches(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -993,7 +1001,7 @@ async def test_delete_entity_with_if_matches(self, resource_group, location, sto finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_delete_entity_with_if_doesnt_match(self, resource_group, location, storage_account, storage_account_key): @@ -1013,7 +1021,7 @@ async def test_delete_entity_with_if_doesnt_match(self, resource_group, location finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_unicode_property_value(self, resource_group, location, storage_account, storage_account_key): ''' regression test for github issue #57''' @@ -1041,7 +1049,7 @@ async def test_unicode_property_value(self, resource_group, location, storage_ac finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_unicode_property_name(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1086,7 +1094,7 @@ async def test_operations_on_entity_with_partition_key_having_single_quote(self, resp = await self.table.upsert_entity(mode=UpdateMode.REPLACE, entity=sent_entity) # Assert - self.assertIsNone(resp) + self._assert_valid_metadata(resp) # row key here only has 2 quotes received_entity = await self.table.get_entity( entity.PartitionKey, entity.RowKey) @@ -1095,11 +1103,11 @@ async def test_operations_on_entity_with_partition_key_having_single_quote(self, # Act sent_entity['newField'] = 'newFieldValue' resp = await self.table.update_entity(mode=UpdateMode.REPLACE, entity=sent_entity) - - # Assert - self.assertIsNone(resp) received_entity = await self.table.get_entity( entity.PartitionKey, entity.RowKey) + + # Assert + self._assert_valid_metadata(resp) self._assert_updated_entity(received_entity) self.assertEqual(received_entity['newField'], 'newFieldValue') @@ -1111,7 +1119,7 @@ async def test_operations_on_entity_with_partition_key_having_single_quote(self, finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_empty_and_spaces_property_value(self, resource_group, location, storage_account, storage_account_key): @@ -1151,7 +1159,7 @@ async def test_empty_and_spaces_property_value(self, resource_group, location, s finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_none_property_value(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1170,7 +1178,7 @@ async def test_none_property_value(self, resource_group, location, storage_accou finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_binary_property_value(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1190,7 +1198,7 @@ async def test_binary_property_value(self, resource_group, location, storage_acc finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_timezone(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1213,7 +1221,7 @@ async def test_timezone(self, resource_group, location, storage_account, storage finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_query_entities(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1233,7 +1241,7 @@ async def test_query_entities(self, resource_group, location, storage_account, s finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_query_zero_entities(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1251,7 +1259,7 @@ async def test_query_zero_entities(self, resource_group, location, storage_accou finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_query_entities_full_metadata(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1271,7 +1279,7 @@ async def test_query_entities_full_metadata(self, resource_group, location, stor finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_query_entities_no_metadata(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1305,10 +1313,10 @@ def test_query_entities_large(self, resource_group, location, storage_account, s entity = TableEntity() entity.PartitionKey = 'large' entity.RowKey = 'batch{0}-item{1}'.format(j, i) - entity.test = EntityProperty(EdmType.BOOLEAN, 'true') + entity.test = EntityProperty(True) entity.test2 = 'hello world;' * 100 entity.test3 = 3 - entity.test4 = EntityProperty(EdmType.INT64, '1234567890') + entity.test4 = EntityProperty(1234567890) entity.test5 = datetime(2016, 12, 31, 11, 59, 59, 0) batch.create_entity(entity) self.ts.commit_batch(table_name, batch) @@ -1324,7 +1332,7 @@ def test_query_entities_large(self, resource_group, location, storage_account, s # if it runs slowly, it will return fewer results and make the test fail self.assertEqual(len(entities), total_entities_count) - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_query_entities_with_filter(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1345,7 +1353,7 @@ async def test_query_entities_with_filter(self, resource_group, location, storag finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_query_entities_with_select(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1360,7 +1368,7 @@ async def test_query_entities_with_select(self, resource_group, location, storag # Assert self.assertEqual(len(entities), 2) - self.assertEqual(entities[0].age, 39) + self.assertEqual(entities[0].age.value, 39) self.assertEqual(entities[0].sex, 'male') self.assertFalse(hasattr(entities[0], "birthday")) self.assertFalse(hasattr(entities[0], "married")) @@ -1368,7 +1376,7 @@ async def test_query_entities_with_select(self, resource_group, location, storag finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_query_entities_with_top(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -1386,7 +1394,7 @@ async def test_query_entities_with_top(self, resource_group, location, storage_a finally: await self._tear_down() - # @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() async def test_query_entities_with_top_and_next(self, resource_group, location, storage_account, storage_account_key): @@ -1423,7 +1431,7 @@ async def test_query_entities_with_top_and_next(self, resource_group, location, finally: await self._tear_down() - # @pytest.mark.skip("pending") + @pytest.mark.live_test_only @GlobalStorageAccountPreparer() async def test_sas_query(self, resource_group, location, storage_account, storage_account_key): @@ -1462,7 +1470,7 @@ async def test_sas_query(self, resource_group, location, storage_account, storag finally: await self._tear_down() - # @pytest.mark.skip("pending") + @pytest.mark.live_test_only @GlobalStorageAccountPreparer() async def test_sas_add(self, resource_group, location, storage_account, storage_account_key): @@ -1499,7 +1507,7 @@ async def test_sas_add(self, resource_group, location, storage_account, storage_ finally: await self._tear_down() - # @pytest.mark.skip("pending") + @pytest.mark.live_test_only @GlobalStorageAccountPreparer() async def test_sas_add_inside_range(self, resource_group, location, storage_account, storage_account_key): @@ -1535,7 +1543,7 @@ async def test_sas_add_inside_range(self, resource_group, location, storage_acco finally: await self._tear_down() - # @pytest.mark.skip("pending") + @pytest.mark.live_test_only @GlobalStorageAccountPreparer() async def test_sas_add_outside_range(self, resource_group, location, storage_account, storage_account_key): @@ -1570,7 +1578,7 @@ async def test_sas_add_outside_range(self, resource_group, location, storage_acc finally: await self._tear_down() - # @pytest.mark.skip("pending") + @pytest.mark.live_test_only @GlobalStorageAccountPreparer() async def test_sas_update(self, resource_group, location, storage_account, storage_account_key): @@ -1597,16 +1605,18 @@ async def test_sas_update(self, resource_group, location, storage_account, stora ) table = service.get_table_client(self.table_name) updated_entity = self._create_updated_entity_dict(entity.PartitionKey, entity.RowKey) - await table.update_entity(mode=UpdateMode.REPLACE, entity=updated_entity) - - # Assert + resp = await table.update_entity(mode=UpdateMode.REPLACE, entity=updated_entity) received_entity = await self.table.get_entity(entity.PartitionKey, entity.RowKey) + + # Assert self._assert_updated_entity(received_entity) + self.assertIsNotNone(resp) + finally: await self._tear_down() - # @pytest.mark.skip("pending") + @pytest.mark.live_test_only @GlobalStorageAccountPreparer() async def test_sas_delete(self, resource_group, location, storage_account, storage_account_key): @@ -1640,7 +1650,7 @@ async def test_sas_delete(self, resource_group, location, storage_account, stora finally: await self._tear_down() - # @pytest.mark.skip("pending") + @pytest.mark.live_test_only @GlobalStorageAccountPreparer() async def test_sas_upper_case_table_name(self, resource_group, location, storage_account, storage_account_key): @@ -1680,7 +1690,7 @@ async def test_sas_upper_case_table_name(self, resource_group, location, storage finally: await self._tear_down() - # @pytest.mark.skip("pending") + @pytest.mark.live_test_only @GlobalStorageAccountPreparer() async def test_sas_signed_identifier(self, resource_group, location, storage_account, storage_account_key): @@ -1713,7 +1723,7 @@ async def test_sas_signed_identifier(self, resource_group, location, storage_acc self.account_url(storage_account, "table"), credential=token, ) - table = service.get_table_client(table=self.table_name) + table = service.get_table_client(table_name=self.table_name) entities = [] async for t in table.query_entities( filter="PartitionKey eq '{}'".format(entity.PartitionKey)): diff --git a/sdk/tables/azure-data-tables/tests/test_table_service_properties.py b/sdk/tables/azure-data-tables/tests/test_table_service_properties.py index a65cbfd6d21e1..f3b7ecfad1ba2 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_service_properties.py +++ b/sdk/tables/azure-data-tables/tests/test_table_service_properties.py @@ -107,7 +107,6 @@ def _assert_retention_equal(self, ret1, ret2): self.assertEqual(ret1.days, ret2.days) # --Test cases per service --------------------------------------- - #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_table_service_properties(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -130,7 +129,6 @@ def test_table_service_properties(self, resource_group, location, storage_accoun # --Test cases per feature --------------------------------------- - #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_set_logging(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -149,7 +147,6 @@ def test_set_logging(self, resource_group, location, storage_account, storage_ac received_props = tsc.get_service_properties() self._assert_logging_equal(received_props['analytics_logging'], logging) - #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_set_hour_metrics(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -168,7 +165,6 @@ def test_set_hour_metrics(self, resource_group, location, storage_account, stora received_props = tsc.get_service_properties() self._assert_metrics_equal(received_props['hour_metrics'], hour_metrics) - #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_set_minute_metrics(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -188,7 +184,6 @@ def test_set_minute_metrics(self, resource_group, location, storage_account, sto received_props = tsc.get_service_properties() self._assert_metrics_equal(received_props['minute_metrics'], minute_metrics) - #@pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_set_cors(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -222,7 +217,6 @@ def test_set_cors(self, resource_group, location, storage_account, storage_accou self._assert_cors_equal(received_props['cors'], cors) # --Test cases for errors --------------------------------------- - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_retention_no_days(self, resource_group, location, storage_account, storage_account_key): # Assert @@ -230,7 +224,6 @@ def test_retention_no_days(self, resource_group, location, storage_account, stor RetentionPolicy, True, None) - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_too_many_cors_rules(self, resource_group, location, storage_account, storage_account_key): # Arrange @@ -243,7 +236,6 @@ def test_too_many_cors_rules(self, resource_group, location, storage_account, st self.assertRaises(HttpResponseError, tsc.set_service_properties, None, None, None, cors) - # @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() def test_retention_too_long(self, resource_group, location, storage_account, storage_account_key): # Arrange diff --git a/sdk/tables/azure-data-tables/tests/test_table_service_properties_async.py b/sdk/tables/azure-data-tables/tests/test_table_service_properties_async.py new file mode 100644 index 0000000000000..a2bd56a9f7335 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/test_table_service_properties_async.py @@ -0,0 +1,248 @@ +# 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 time +import pytest + +from msrest.exceptions import ValidationError # TODO This should be an azure-core error. +from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer +from azure.core.exceptions import HttpResponseError + +from azure.data.tables._models import TableAnalyticsLogging, Metrics, RetentionPolicy, CorsRule +from azure.data.tables.aio import TableServiceClient + +from _shared.testcase import GlobalStorageAccountPreparer, TableTestCase + +# ------------------------------------------------------------------------------ + + +class TableServicePropertiesTest(TableTestCase): + # --Helpers----------------------------------------------------------------- + def _assert_properties_default(self, prop): + self.assertIsNotNone(prop) + + self._assert_logging_equal(prop['analytics_logging'], TableAnalyticsLogging()) + self._assert_metrics_equal(prop['hour_metrics'], Metrics()) + self._assert_metrics_equal(prop['minute_metrics'], Metrics()) + self._assert_cors_equal(prop['cors'], list()) + + def _assert_logging_equal(self, log1, log2): + if log1 is None or log2 is None: + self.assertEqual(log1, log2) + return + + self.assertEqual(log1.version, log2.version) + self.assertEqual(log1.read, log2.read) + self.assertEqual(log1.write, log2.write) + self.assertEqual(log1.delete, log2.delete) + self._assert_retention_equal(log1.retention_policy, log2.retention_policy) + + def _assert_delete_retention_policy_equal(self, policy1, policy2): + if policy1 is None or policy2 is None: + self.assertEqual(policy1, policy2) + return + + self.assertEqual(policy1.enabled, policy2.enabled) + self.assertEqual(policy1.days, policy2.days) + + def _assert_static_website_equal(self, prop1, prop2): + if prop1 is None or prop2 is None: + self.assertEqual(prop1, prop2) + return + + self.assertEqual(prop1.enabled, prop2.enabled) + self.assertEqual(prop1.index_document, prop2.index_document) + self.assertEqual(prop1.error_document404_path, prop2.error_document404_path) + + def _assert_delete_retention_policy_not_equal(self, policy1, policy2): + if policy1 is None or policy2 is None: + self.assertNotEqual(policy1, policy2) + return + + self.assertFalse(policy1.enabled == policy2.enabled + and policy1.days == policy2.days) + + def _assert_metrics_equal(self, metrics1, metrics2): + if metrics1 is None or metrics2 is None: + self.assertEqual(metrics1, metrics2) + return + + self.assertEqual(metrics1.version, metrics2.version) + self.assertEqual(metrics1.enabled, metrics2.enabled) + self.assertEqual(metrics1.include_apis, metrics2.include_apis) + self._assert_retention_equal(metrics1.retention_policy, metrics2.retention_policy) + + def _assert_cors_equal(self, cors1, cors2): + if cors1 is None or cors2 is None: + self.assertEqual(cors1, cors2) + return + + self.assertEqual(len(cors1), len(cors2)) + + for i in range(0, len(cors1)): + rule1 = cors1[i] + rule2 = cors2[i] + self.assertEqual(len(rule1.allowed_origins), len(rule2.allowed_origins)) + self.assertEqual(len(rule1.allowed_methods), len(rule2.allowed_methods)) + self.assertEqual(rule1.max_age_in_seconds, rule2.max_age_in_seconds) + self.assertEqual(len(rule1.exposed_headers), len(rule2.exposed_headers)) + self.assertEqual(len(rule1.allowed_headers), len(rule2.allowed_headers)) + + def _assert_retention_equal(self, ret1, ret2): + self.assertEqual(ret1.enabled, ret2.enabled) + self.assertEqual(ret1.days, ret2.days) + + # --Test cases per service --------------------------------------- + @GlobalStorageAccountPreparer() + async def test_table_service_properties_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + url = self.account_url(storage_account, "table") + if 'cosmos' in url: + pytest.skip("Cosmos Tables does not yet support service properties") + tsc = TableServiceClient(url, storage_account_key, logging_enable=True) + # Act + resp = await tsc.set_service_properties( + analytics_logging=TableAnalyticsLogging(), + hour_metrics=Metrics(), + minute_metrics=Metrics(), + cors=list()) + + # Assert + self.assertIsNone(resp) + if self.is_live: + time.sleep(30) + self._assert_properties_default(await tsc.get_service_properties()) + + + # --Test cases per feature --------------------------------------- + @GlobalStorageAccountPreparer() + async def test_set_logging_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + url = self.account_url(storage_account, "table") + if 'cosmos' in url: + pytest.skip("Cosmos Tables does not yet support service properties") + tsc = TableServiceClient(url, storage_account_key) + logging = TableAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + + # Act + await tsc.set_service_properties(analytics_logging=logging) + + # Assert + if self.is_live: + time.sleep(30) + received_props = await tsc.get_service_properties() + self._assert_logging_equal(received_props['analytics_logging'], logging) + + @GlobalStorageAccountPreparer() + async def test_set_hour_metrics_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + url = self.account_url(storage_account, "table") + if 'cosmos' in url: + pytest.skip("Cosmos Tables does not yet support service properties") + tsc = TableServiceClient(url, storage_account_key) + hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + + # Act + await tsc.set_service_properties(hour_metrics=hour_metrics) + + # Assert + if self.is_live: + time.sleep(30) + received_props = await tsc.get_service_properties() + self._assert_metrics_equal(received_props['hour_metrics'], hour_metrics) + + @GlobalStorageAccountPreparer() + async def test_set_minute_metrics_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + url = self.account_url(storage_account, "table") + if 'cosmos' in url: + pytest.skip("Cosmos Tables does not yet support service properties") + tsc = TableServiceClient(url, storage_account_key) + minute_metrics = Metrics(enabled=True, include_apis=True, + retention_policy=RetentionPolicy(enabled=True, days=5)) + + # Act + await tsc.set_service_properties(minute_metrics=minute_metrics) + + # Assert + if self.is_live: + time.sleep(30) + received_props = await tsc.get_service_properties() + self._assert_metrics_equal(received_props['minute_metrics'], minute_metrics) + + @GlobalStorageAccountPreparer() + async def test_set_cors_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + url = self.account_url(storage_account, "table") + if 'cosmos' in url: + pytest.skip("Cosmos Tables does not yet support service properties") + tsc = TableServiceClient(url, storage_account_key) + cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) + + allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] + allowed_methods = ['GET', 'PUT'] + max_age_in_seconds = 500 + exposed_headers = ["x-ms-meta-data*", "x-ms-meta-source*", "x-ms-meta-abc", "x-ms-meta-bcd"] + allowed_headers = ["x-ms-meta-data*", "x-ms-meta-target*", "x-ms-meta-xyz", "x-ms-meta-foo"] + cors_rule2 = CorsRule( + allowed_origins, + allowed_methods, + max_age_in_seconds=max_age_in_seconds, + exposed_headers=exposed_headers, + allowed_headers=allowed_headers) + + cors = [cors_rule1, cors_rule2] + + # Act + await tsc.set_service_properties(cors=cors) + + # Assert + if self.is_live: + time.sleep(30) + received_props = await tsc.get_service_properties() + self._assert_cors_equal(received_props['cors'], cors) + + # --Test cases for errors --------------------------------------- + @GlobalStorageAccountPreparer() + async def test_retention_no_days_async(self, resource_group, location, storage_account, storage_account_key): + # Assert + self.assertRaises(ValueError, + RetentionPolicy, + True, None) + + @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + async def test_too_many_cors_rules_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + tsc = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + cors = [] + for i in range(0, 6): + cors.append(CorsRule(['www.xyz.com'], ['GET'])) + + # Assert + self.assertRaises(HttpResponseError, + tsc.set_service_properties, None, None, None, cors) + + @pytest.mark.skip("pending") + @GlobalStorageAccountPreparer() + async def test_retention_too_long_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + tsc = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + minute_metrics = Metrics(enabled=True, include_apis=True, + retention_policy=RetentionPolicy(enabled=True, days=366)) + + await tsc.set_service_properties(None, None, minute_metrics) + # Assert + self.assertRaises(HttpResponseError, + tsc.set_service_properties, + None, None, minute_metrics) + + +# ------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() diff --git a/sdk/tables/azure-data-tables/tests/test_table_service_stats_async.py b/sdk/tables/azure-data-tables/tests/test_table_service_stats_async.py new file mode 100644 index 0000000000000..6d279b13478ee --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/test_table_service_stats_async.py @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------- +# 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 pytest + +# from azure.data.tabless import TableServiceClient +from azure.data.tables.aio import TableServiceClient +from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer +from _shared.testcase import GlobalResourceGroupPreparer, TableTestCase, GlobalStorageAccountPreparer + +SERVICE_UNAVAILABLE_RESP_BODY = 'unavailable ' + +SERVICE_LIVE_RESP_BODY = 'liveWed, 19 Jan 2021 22:28:43 GMT ' + + +# --Test Class ----------------------------------------------------------------- +class TableServiceStatsTest(TableTestCase): + # --Helpers----------------------------------------------------------------- + def _assert_stats_default(self, stats): + self.assertIsNotNone(stats) + self.assertIsNotNone(stats['geo_replication']) + + self.assertEqual(stats['geo_replication']['status'], 'live') + self.assertIsNotNone(stats['geo_replication']['last_sync_time']) + + def _assert_stats_unavailable(self, stats): + self.assertIsNotNone(stats) + self.assertIsNotNone(stats['geo_replication']) + + self.assertEqual(stats['geo_replication']['status'], 'unavailable') + self.assertIsNone(stats['geo_replication']['last_sync_time']) + + @staticmethod + def override_response_body_with_unavailable_status(response): + response.http_response.text = lambda _: SERVICE_UNAVAILABLE_RESP_BODY + + @staticmethod + def override_response_body_with_live_status(response): + response.http_response.text = lambda _: SERVICE_LIVE_RESP_BODY + # response.http_response.text = lambda _: SERVICE_LIVE_RESP_BODY + + # --Test cases per service --------------------------------------- + + @GlobalResourceGroupPreparer() + @StorageAccountPreparer(name_prefix='pyacrstorage', sku='Standard_RAGRS', random_name_enabled=True) + async def test_table_service_stats_f_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + tsc = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + + # Act + stats = await tsc.get_service_stats(raw_response_hook=self.override_response_body_with_live_status) + # Assert + self._assert_stats_default(stats) + + @GlobalResourceGroupPreparer() + @StorageAccountPreparer(name_prefix='pyacrstorage', sku='Standard_RAGRS', random_name_enabled=True) + async def test_table_service_stats_when_unavailable_async(self, resource_group, location, storage_account, storage_account_key): + # Arrange + tsc = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + + # Act + stats = await tsc.get_service_stats( + raw_response_hook=self.override_response_body_with_unavailable_status) + + # Assert + self._assert_stats_unavailable(stats) + + +# ------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() diff --git a/sdk/tables/ci.yml b/sdk/tables/ci.yml index c774c989e2f0a..08864275e05f5 100644 --- a/sdk/tables/ci.yml +++ b/sdk/tables/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: diff --git a/sdk/tables/tests.yml b/sdk/tables/tests.yml index f94c7a72f029f..4f5aaf6fec1ae 100644 --- a/sdk/tables/tests.yml +++ b/sdk/tables/tests.yml @@ -1,38 +1,16 @@ trigger: none -resources: - repositories: - - repository: azure-sdk-tools - type: github - name: Azure/azure-sdk-tools - endpoint: azure - jobs: - template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests.yml parameters: + BuildTargetingString: azure-data-tables + ServiceDirectory: tables + AllocateResourceGroup: 'false' EnvVars: - STORAGE_ACCOUNT_NAME: $(python-storage-storage-account-name) - STORAGE_ACCOUNT_KEY: $(python-storage-storage-account-key) - STORAGE_DATA_LAKE_ACCOUNT_NAME: $(python-storage-data-lake-account-name) - STORAGE_DATA_LAKE_ACCOUNT_KEY: $(python-storage-data-lake-account-key) - BLOB_STORAGE_ACCOUNT_NAME: $(python-storage-blob-storage-account-name) - BLOB_STORAGE_ACCOUNT_KEY: $(python-storage-blob-storage-account-key) - REMOTE_STORAGE_ACCOUNT_NAME: $(python-storage-remote-storage-account-name) - REMOTE_STORAGE_ACCOUNT_KEY: $(python-storage-remote-storage-account-key) - PREMIUM_STORAGE_ACCOUNT_NAME: $(python-storage-premium-storage-account-name) - PREMIUM_STORAGE_ACCOUNT_KEY: $(python-storage-premium-storage-account-key) - OAUTH_STORAGE_ACCOUNT_NAME: $(python-storage-oauth-storage-account-name) - OAUTH_STORAGE_ACCOUNT_KEY: $(python-storage-oauth-storage-account-key) - ACTIVE_DIRECTORY_APPLICATION_ID: $(aad-azure-sdk-test-client-id) - ACTIVE_DIRECTORY_APPLICATION_SECRET: $(aad-azure-sdk-test-client-secret) - ACTIVE_DIRECTORY_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - CONNECTION_STRING: $(python-storage-blob-connection-string) - BLOB_CONNECTION_STRING: $(python-storage-blob-connection-string) - PREMIUM_CONNECTION_STRING: $(python-storage-premium-connection-string) - TEST_MODE: 'RunLiveNoRecord' - AZURE_SKIP_LIVE_RECORDING: 'True' - AZURE_TEST_RUN_LIVE: 'true' AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) AZURE_SUBSCRIPTION_ID: $(azure-subscription-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + TEST_MODE: 'RunLiveNoRecord' + AZURE_SKIP_LIVE_RECORDING: 'True' + AZURE_TEST_RUN_LIVE: 'true' diff --git a/sdk/template/azure-template/CHANGELOG.md b/sdk/template/azure-template/CHANGELOG.md index c85f69aeddd99..d20ffa8ebae55 100644 --- a/sdk/template/azure-template/CHANGELOG.md +++ b/sdk/template/azure-template/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 0.0.13b1 (2020-08-27) +- Testing out some alpha and beta versioning + ## 0.0.12 (Unreleased) - Test a successful Release diff --git a/sdk/template/azure-template/azure/template/_version.py b/sdk/template/azure-template/azure/template/_version.py index 8fb7d48af3e30..4a01be0b8d95d 100644 --- a/sdk/template/azure-template/azure/template/_version.py +++ b/sdk/template/azure-template/azure/template/_version.py @@ -1,2 +1,2 @@ # matches SEMVER -VERSION = "0.0.12" \ No newline at end of file +VERSION = "0.0.13b1" \ No newline at end of file diff --git a/sdk/template/azure-template/setup.py b/sdk/template/azure-template/setup.py index e58960966f93a..b711c61523992 100644 --- a/sdk/template/azure-template/setup.py +++ b/sdk/template/azure-template/setup.py @@ -42,7 +42,7 @@ license='MIT License', # ensure that the development status reflects the status of your package classifiers=[ - 'Development Status :: 3 - Alpha', + "Development Status :: 4 - Beta", 'Programming Language :: Python', 'Programming Language :: Python :: 2', diff --git a/sdk/template/ci.yml b/sdk/template/ci.yml index 0aa161a0d44c0..f02b08379e2d7 100644 --- a/sdk/template/ci.yml +++ b/sdk/template/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -11,6 +10,7 @@ trigger: paths: include: - sdk/template/ + - eng/common/ pr: branches: @@ -30,4 +30,4 @@ extends: ServiceDirectory: template Artifacts: - name: azure_template - safeName: azuretemplate \ No newline at end of file + safeName: azuretemplate diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index 3a6a10c372b01..b2ceff0d87068 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -1,16 +1,19 @@ # Release History -## 5.0.1 (Unreleased) +## 5.1.0b1 (Unreleased) **New features** - We are now targeting the service's v3.1-preview.1 API as the default. If you would like to still use version v3.0 of the service, pass in `v3.0` to the kwarg `api_version` when creating your TextAnalyticsClient - We have added an API `recognize_pii_entities` which returns entities containing personal information for a batch of documents. Only available for API version v3.1-preview.1 and up. -- Added `offset` and `length` properties for `CategorizedEntity`, `SentenceSentiment`, and `LinkedEntityMatch`. + - In API version v3.1-preview.2 and up, the redacted text of the document is returned on the top-level result object `RecognizePiiEntitiesResult` through property `redacted_text`. +- Added `offset` and `length` properties for `CategorizedEntity`, `SentenceSentiment`, and `LinkedEntityMatch`. These properties are only available for API versions v3.1-preview.1 and up. - `length` is the number of characters in the text of these models - `offset` is the offset of the text from the start of the document - We now have added support for opinion mining. To use this feature, you need to make sure you are using the service's v3.1-preview.1 API. To get this support pass `show_opinion_mining` as True when calling the `analyze_sentiment` endpoint +- Add property `bing_entity_search_api_id` to the `LinkedEntity` class. This property is only available for v3.1-preview.2 and up, and it is to be +used in conjunction with the Bing Entity Search API to fetch additional relevant information about the returned entity. ## 5.0.0 (2020-07-27) diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index f814599004669..b0288ee39f009 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -65,10 +65,15 @@ For example, `https://.cognitiveservices.azure.com/`. Install the Azure Text Analytics client library for Python with [pip][pip]: ```bash -pip install azure-ai-textanalytics +pip install azure-ai-textanalytics --pre ``` +> This table shows the relationship between SDK versions and supported API versions of the service +>| SDK version | Supported API version of service | +>| ----------- | ----------- | +>| Latest GA release (can be installed by removing the `--pre` flag) | 3.0 | +>| Latest release (beta) | 3.0, 3.1-preview | + -> Note: This version of the client library supports the v3.0 version of the Text Analytics service ### Authenticate the client #### Get the endpoint @@ -221,7 +226,7 @@ for doc in result: The returned response is a heterogeneous list of result and error objects: list[[AnalyzeSentimentResult][analyze_sentiment_result], [DocumentError][document_error]] -Please refer to the service documentation for a conceptual discussion of [sentiment analysis][sentiment_analysis]. +Please refer to the service documentation for a conceptual discussion of [sentiment analysis][sentiment_analysis]. To see how to conduct more granular analysis into the opinions related to individual aspects (such as attributes of a product or service) in a text, see [here][opinion_mining_sample]. ### Recognize entities [recognize_entities][recognize_entities] recognizes and categories entities in its input text as people, places, organizations, date/time, quantities, percentages, currencies, and more. @@ -449,7 +454,7 @@ with Text Analytics and require Python 3.5 or later. Authenticate the client with a Cognitive Services/Text Analytics API key or a token credential from [azure-identity][azure_identity]: * [sample_authentication.py][sample_authentication] ([async version][sample_authentication_async]) -In a batch of documents: +Common scenarios * Analyze sentiment: [sample_analyze_sentiment.py][analyze_sentiment_sample] ([async version][analyze_sentiment_sample_async]) * Recognize entities: [sample_recognize_entities.py][recognize_entities_sample] ([async version][recognize_entities_sample_async]) * Recognize personally identifiable information: [sample_recognize_pii_entities.py][recognize_pii_entities_sample]([async version][recognize_pii_entities_sample_async]) @@ -457,6 +462,9 @@ In a batch of documents: * Extract key phrases: [sample_extract_key_phrases.py][extract_key_phrases_sample] ([async version][extract_key_phrases_sample_async]) * Detect language: [sample_detect_language.py][detect_language_sample] ([async version][detect_language_sample_async]) +Advanced scenarios +* Opinion Mining: [sample_analyze_sentiment_with_opinion_mining.py][opinion_mining_sample] ([async_version][opinion_mining_sample_async]) + ### Additional documentation For more extensive documentation on Azure Cognitive Services Text Analytics, see the [Text Analytics documentation][TA_product_documentation] on docs.microsoft.com. @@ -543,6 +551,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [recognize_pii_entities_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py [recognize_pii_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py +[opinion_mining_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py +[opinion_mining_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py + [cla]: https://cla.microsoft.com [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py index 476f9842a0665..ef3d19429fd8d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py @@ -31,6 +31,7 @@ OpinionSentiment, RecognizePiiEntitiesResult, PiiEntity, + PiiEntityDomainType, ) __all__ = [ @@ -59,6 +60,7 @@ 'OpinionSentiment', 'RecognizePiiEntitiesResult', 'PiiEntity', + 'PiiEntityDomainType', ] __version__ = VERSION diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py index c269772d87ffd..8d60ff8dbf9db 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py @@ -15,6 +15,10 @@ class TextAnalyticsApiVersion(str, Enum): #: this is the default version V3_1_PREVIEW_1 = "v3.1-preview.1" + + # 3.1-preview.2 is not yet the default version since we don't have a + # reliable endpoint + V3_1_PREVIEW_2 = "v3.1-preview.2" V3_0 = "v3.0" def _authentication_policy(credential): diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_configuration.py index 9d8c2be5eb49d..0e31b21493f7d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_configuration.py @@ -43,8 +43,7 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = ['https://cognitiveservices.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'azure-ai-textanalytics/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py index b54f150a56d9b..7eced5ce74c89 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union class TextAnalyticsClientOperationsMixin(object): @@ -54,6 +54,8 @@ def entities_linking( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from .v3_1_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from .v3_1_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -95,6 +97,8 @@ def entities_recognition_general( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from .v3_1_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from .v3_1_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -110,6 +114,7 @@ def entities_recognition_pii( model_version=None, # type: Optional[str] show_stats=None, # type: Optional[bool] domain=None, # type: Optional[str] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] **kwargs # type: Any ): """Entities containing personal information. @@ -121,23 +126,29 @@ def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :param domain: (Optional) if set to 'PHI', response will contain only PHI entities. :type domain: str + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response - :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult + :return: PiiEntitiesResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.PiiEntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_pii') if api_version == 'v3.1-preview.1': from .v3_1_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from .v3_1_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -145,7 +156,7 @@ def entities_recognition_pii( mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.entities_recognition_pii(documents, model_version, show_stats, domain, **kwargs) + return mixin_instance.entities_recognition_pii(documents, model_version, show_stats, domain, string_index_type, **kwargs) def key_phrases( self, @@ -178,6 +189,8 @@ def key_phrases( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from .v3_1_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from .v3_1_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -219,6 +232,8 @@ def languages( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from .v3_1_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from .v3_1_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -260,6 +275,8 @@ def sentiment( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from .v3_1_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from .v3_1_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py index 3f15dad24caf9..21f45b0de3d3a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py @@ -42,7 +42,6 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi missing in profile. :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ DEFAULT_API_VERSION = 'v3.0' @@ -66,6 +65,8 @@ def __init__( base_url = '{Endpoint}/text/analytics/v3.0' elif api_version == 'v3.1-preview.1': base_url = '{Endpoint}/text/analytics/v3.1-preview.1' + elif api_version == 'v3.1-preview.2': + base_url = '{Endpoint}/text/analytics/v3.1-preview.2' else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) @@ -85,6 +86,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * v3.0: :mod:`v3_0.models` * v3.1-preview.1: :mod:`v3_1_preview_1.models` + * v3.1-preview.2: :mod:`v3_1_preview_2.models` """ if api_version == 'v3.0': from .v3_0 import models @@ -92,6 +94,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == 'v3.1-preview.1': from .v3_1_preview_1 import models return models + elif api_version == 'v3.1-preview.2': + from .v3_1_preview_2 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) def close(self): diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_configuration_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_configuration_async.py index bb11db12b46f6..6e86abed2caf1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_configuration_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_configuration_async.py @@ -42,8 +42,7 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = ['https://cognitiveservices.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'azure-ai-textanalytics/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin_async.py index f0c0104f1145c..541d9b11f705f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin_async.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- from msrest import Serializer, Deserializer -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -50,6 +50,8 @@ async def entities_linking( from ..v3_0.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from ..v3_1_preview_1.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from ..v3_1_preview_2.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -91,6 +93,8 @@ async def entities_recognition_general( from ..v3_0.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from ..v3_1_preview_1.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from ..v3_1_preview_2.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -106,8 +110,9 @@ async def entities_recognition_pii( model_version: Optional[str] = None, show_stats: Optional[bool] = None, domain: Optional[str] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", **kwargs - ) -> "models.EntitiesResult": + ) -> "models.PiiEntitiesResult": """Entities containing personal information. The API returns a list of entities with personal information (\"SSN\", \"Bank Account\" etc) in @@ -117,23 +122,29 @@ async def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :param domain: (Optional) if set to 'PHI', response will contain only PHI entities. :type domain: str + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response - :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult + :return: PiiEntitiesResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.PiiEntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_pii') if api_version == 'v3.1-preview.1': from ..v3_1_preview_1.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from ..v3_1_preview_2.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -141,7 +152,7 @@ async def entities_recognition_pii( mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.entities_recognition_pii(documents, model_version, show_stats, domain, **kwargs) + return await mixin_instance.entities_recognition_pii(documents, model_version, show_stats, domain, string_index_type, **kwargs) async def key_phrases( self, @@ -174,6 +185,8 @@ async def key_phrases( from ..v3_0.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from ..v3_1_preview_1.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from ..v3_1_preview_2.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -215,6 +228,8 @@ async def languages( from ..v3_0.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from ..v3_1_preview_1.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from ..v3_1_preview_2.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -256,6 +271,8 @@ async def sentiment( from ..v3_0.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1-preview.1': from ..v3_1_preview_1.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.1-preview.2': + from ..v3_1_preview_2.aio.operations_async import TextAnalyticsClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client_async.py index 6637fb76e1510..7e0a9761b8609 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client_async.py @@ -42,7 +42,6 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi missing in profile. :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ DEFAULT_API_VERSION = 'v3.0' @@ -66,6 +65,8 @@ def __init__( base_url = '{Endpoint}/text/analytics/v3.0' elif api_version == 'v3.1-preview.1': base_url = '{Endpoint}/text/analytics/v3.1-preview.1' + elif api_version == 'v3.1-preview.2': + base_url = '{Endpoint}/text/analytics/v3.1-preview.2' else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) @@ -85,6 +86,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * v3.0: :mod:`v3_0.models` * v3.1-preview.1: :mod:`v3_1_preview_1.models` + * v3.1-preview.2: :mod:`v3_1_preview_2.models` """ if api_version == 'v3.0': from ..v3_0 import models @@ -92,6 +94,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == 'v3.1-preview.1': from ..v3_1_preview_1 import models return models + elif api_version == 'v3.1-preview.2': + from ..v3_1_preview_2 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) async def close(self): diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_configuration.py index c3db95165c0cd..e216512dcf2e7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_configuration.py @@ -46,8 +46,7 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = ['https://cognitiveservices.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_metadata.json b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_metadata.json index c3506558ce448..0cecd36ac90be 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_metadata.json +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_metadata.json @@ -7,7 +7,8 @@ "description": "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", "base_url": null, "custom_base_url": "\u0027{Endpoint}/text/analytics/v3.0\u0027", - "azure_arm": false + "azure_arm": false, + "has_lro_operations": false }, "global_parameters": { "sync_method": { @@ -46,7 +47,8 @@ "credential": true, "credential_scopes": ["https://cognitiveservices.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null }, "operation_groups": { }, diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py index 27228b8acce10..c7754a163d67a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py @@ -29,7 +29,6 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): :type credential: ~azure.core.credentials.TokenCredential :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.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/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_configuration_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_configuration_async.py index 499a2898a1b1e..033d80c380058 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_configuration_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_configuration_async.py @@ -43,8 +43,7 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = ['https://cognitiveservices.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client_async.py index 0a58502575f30..5a55c01e842e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client_async.py @@ -27,7 +27,6 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.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/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations_async/_text_analytics_client_operations_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations_async/_text_analytics_client_operations_async.py index 763d9d4ae61e8..f7bdb178b87bf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations_async/_text_analytics_client_operations_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations_async/_text_analytics_client_operations_async.py @@ -52,6 +52,7 @@ async def entities_recognition_general( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_recognition_general.metadata['url'] # type: ignore @@ -70,19 +71,18 @@ async def entities_recognition_general( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -125,6 +125,7 @@ async def entities_linking( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_linking.metadata['url'] # type: ignore @@ -143,19 +144,18 @@ async def entities_linking( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -198,6 +198,7 @@ async def key_phrases( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.key_phrases.metadata['url'] # type: ignore @@ -216,19 +217,18 @@ async def key_phrases( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -272,6 +272,7 @@ async def languages( _input = models.LanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.languages.metadata['url'] # type: ignore @@ -290,19 +291,18 @@ async def languages( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'LanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -346,6 +346,7 @@ async def sentiment( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.sentiment.metadata['url'] # type: ignore @@ -364,19 +365,18 @@ async def sentiment( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/__init__.py index 474336e92e7a0..06c560ab42eb2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/__init__.py @@ -18,6 +18,7 @@ from ._models_py3 import EntitiesResult from ._models_py3 import Entity from ._models_py3 import EntityLinkingResult + from ._models_py3 import ErrorResponse from ._models_py3 import InnerError from ._models_py3 import KeyPhraseResult from ._models_py3 import LanguageBatchInput @@ -45,6 +46,7 @@ from ._models import EntitiesResult # type: ignore from ._models import Entity # type: ignore from ._models import EntityLinkingResult # type: ignore + from ._models import ErrorResponse # type: ignore from ._models import InnerError # type: ignore from ._models import KeyPhraseResult # type: ignore from ._models import LanguageBatchInput # type: ignore @@ -81,6 +83,7 @@ 'EntitiesResult', 'Entity', 'EntityLinkingResult', + 'ErrorResponse', 'InnerError', 'KeyPhraseResult', 'LanguageBatchInput', diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models.py index 8ff54b7760c30..2e268990688d1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models.py @@ -449,6 +449,31 @@ def __init__( self.model_version = kwargs['model_version'] +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Document Error. + :type error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs['error'] + + class InnerError(msrest.serialization.Model): """InnerError. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py index 80c27057d5b6c..8d8179e667d26 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py @@ -507,6 +507,33 @@ def __init__( self.model_version = model_version +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Document Error. + :type error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + *, + error: "TextAnalyticsError", + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + class InnerError(msrest.serialization.Model): """InnerError. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py index 5f95113d881f6..0fc2c25d14efb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py @@ -57,6 +57,7 @@ def entities_recognition_general( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_recognition_general.metadata['url'] # type: ignore @@ -75,19 +76,18 @@ def entities_recognition_general( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -131,6 +131,7 @@ def entities_linking( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_linking.metadata['url'] # type: ignore @@ -149,19 +150,18 @@ def entities_linking( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -205,6 +205,7 @@ def key_phrases( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.key_phrases.metadata['url'] # type: ignore @@ -223,19 +224,18 @@ def key_phrases( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -280,6 +280,7 @@ def languages( _input = models.LanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.languages.metadata['url'] # type: ignore @@ -298,19 +299,18 @@ def languages( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'LanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -355,6 +355,7 @@ def sentiment( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.sentiment.metadata['url'] # type: ignore @@ -373,19 +374,18 @@ def sentiment( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_configuration.py index c3db95165c0cd..e216512dcf2e7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_configuration.py @@ -46,8 +46,7 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = ['https://cognitiveservices.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_metadata.json b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_metadata.json index f4ef29b8cd432..5f68576f923e6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_metadata.json +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_metadata.json @@ -7,7 +7,8 @@ "description": "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", "base_url": null, "custom_base_url": "\u0027{Endpoint}/text/analytics/v3.1-preview.1\u0027", - "azure_arm": false + "azure_arm": false, + "has_lro_operations": false }, "global_parameters": { "sync_method": { @@ -46,84 +47,85 @@ "credential": true, "credential_scopes": ["https://cognitiveservices.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null }, "operation_groups": { }, "operation_mixins": { "entities_recognition_general" : { "sync": { - "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n string_index_type=\"TextElements_v8\", # type: Optional[Union[str, \"models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def entities_recognition_general(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n **kwargs\n) -\u003e \"models.EntitiesResult\":\n", - "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def entities_recognition_general(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"models.StringIndexType\"]] = \"TextElements_v8\",\n **kwargs\n) -\u003e \"models.EntitiesResult\":\n", + "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "call": "documents, model_version, show_stats" + "call": "documents, model_version, show_stats, string_index_type" }, "entities_recognition_pii" : { "sync": { - "signature": "def entities_recognition_pii(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n domain=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:param domain: (Optional) if set to \u0027PHI\u0027, response will contain only PHI entities.\n:type domain: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def entities_recognition_pii(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n domain=None, # type: Optional[str]\n string_index_type=\"TextElements_v8\", # type: Optional[Union[str, \"models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param domain: (Optional) if set to \u0027PHI\u0027, response will contain only PHI entities.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def entities_recognition_pii(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n domain: Optional[str] = None,\n **kwargs\n) -\u003e \"models.EntitiesResult\":\n", - "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:param domain: (Optional) if set to \u0027PHI\u0027, response will contain only PHI entities.\n:type domain: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def entities_recognition_pii(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n domain: Optional[str] = None,\n string_index_type: Optional[Union[str, \"models.StringIndexType\"]] = \"TextElements_v8\",\n **kwargs\n) -\u003e \"models.EntitiesResult\":\n", + "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param domain: (Optional) if set to \u0027PHI\u0027, response will contain only PHI entities.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "call": "documents, model_version, show_stats, domain" + "call": "documents, model_version, show_stats, domain, string_index_type" }, "entities_linking" : { "sync": { - "signature": "def entities_linking(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Linked entities from a well-known knowledge base.\n\nThe API returns a list of recognized entities with links to a well-known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def entities_linking(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n string_index_type=\"TextElements_v8\", # type: Optional[Union[str, \"models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Linked entities from a well-known knowledge base.\n\nThe API returns a list of recognized entities with links to a well-known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def entities_linking(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n **kwargs\n) -\u003e \"models.EntityLinkingResult\":\n", - "doc": "\"\"\"Linked entities from a well-known knowledge base.\n\nThe API returns a list of recognized entities with links to a well-known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def entities_linking(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"models.StringIndexType\"]] = \"TextElements_v8\",\n **kwargs\n) -\u003e \"models.EntityLinkingResult\":\n", + "doc": "\"\"\"Linked entities from a well-known knowledge base.\n\nThe API returns a list of recognized entities with links to a well-known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "call": "documents, model_version, show_stats" + "call": "documents, model_version, show_stats, string_index_type" }, "key_phrases" : { "sync": { "signature": "def key_phrases(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def key_phrases(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n **kwargs\n) -\u003e \"models.KeyPhraseResult\":\n", - "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats" }, "languages" : { "sync": { "signature": "def languages(\n self,\n documents, # type: List[\"models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def languages(\n self,\n documents: List[\"models.LanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n **kwargs\n) -\u003e \"models.LanguageResult\":\n", - "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats" }, "sentiment" : { "sync": { - "signature": "def sentiment(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n opinion_mining=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(aspects) and opinions.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:param opinion_mining: (Optional) if set to true, response will contain input and document\n level statistics including aspect-based sentiment analysis results.\n:type opinion_mining: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def sentiment(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n opinion_mining=None, # type: Optional[bool]\n string_index_type=\"TextElements_v8\", # type: Optional[Union[str, \"models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(aspects) and opinions.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param opinion_mining: (Optional) if set to true, response will contain input and document\n level statistics including aspect-based sentiment analysis results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def sentiment(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n opinion_mining: Optional[bool] = None,\n **kwargs\n) -\u003e \"models.SentimentResponse\":\n", - "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(aspects) and opinions.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:param opinion_mining: (Optional) if set to true, response will contain input and document\n level statistics including aspect-based sentiment analysis results.\n:type opinion_mining: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def sentiment(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n opinion_mining: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"models.StringIndexType\"]] = \"TextElements_v8\",\n **kwargs\n) -\u003e \"models.SentimentResponse\":\n", + "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(aspects) and opinions.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param opinion_mining: (Optional) if set to true, response will contain input and document\n level statistics including aspect-based sentiment analysis results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "call": "documents, model_version, show_stats, opinion_mining" + "call": "documents, model_version, show_stats, opinion_mining, string_index_type" } }, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}" + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}" } \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_text_analytics_client.py index 20b9bbad197a8..965fad9c811b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/_text_analytics_client.py @@ -29,7 +29,6 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): :type credential: ~azure.core.credentials.TokenCredential :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.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/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/_configuration_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/_configuration_async.py index 499a2898a1b1e..033d80c380058 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/_configuration_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/_configuration_async.py @@ -43,8 +43,7 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = ['https://cognitiveservices.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/_text_analytics_client_async.py index 0f3ff076484b0..3d61ef8310e97 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/_text_analytics_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/_text_analytics_client_async.py @@ -27,7 +27,6 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.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/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/operations_async/_text_analytics_client_operations_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/operations_async/_text_analytics_client_operations_async.py index 97d727910b262..e617843153cf9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/operations_async/_text_analytics_client_operations_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/aio/operations_async/_text_analytics_client_operations_async.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -24,6 +24,7 @@ async def entities_recognition_general( documents: List["models.MultiLanguageInput"], model_version: Optional[str] = None, show_stats: Optional[bool] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", **kwargs ) -> "models.EntitiesResult": """Named Entity Recognition. @@ -38,9 +39,13 @@ async def entities_recognition_general( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult @@ -52,6 +57,7 @@ async def entities_recognition_general( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_recognition_general.metadata['url'] # type: ignore @@ -66,23 +72,24 @@ async def entities_recognition_general( query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') if show_stats is not None: query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -99,6 +106,7 @@ async def entities_recognition_pii( model_version: Optional[str] = None, show_stats: Optional[bool] = None, domain: Optional[str] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", **kwargs ) -> "models.EntitiesResult": """Entities containing personal information. @@ -114,11 +122,15 @@ async def entities_recognition_pii( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :param domain: (Optional) if set to 'PHI', response will contain only PHI entities. :type domain: str + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult @@ -130,6 +142,7 @@ async def entities_recognition_pii( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_recognition_pii.metadata['url'] # type: ignore @@ -146,23 +159,24 @@ async def entities_recognition_pii( query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') if domain is not None: query_parameters['domain'] = self._serialize.query("domain", domain, 'str') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -178,6 +192,7 @@ async def entities_linking( documents: List["models.MultiLanguageInput"], model_version: Optional[str] = None, show_stats: Optional[bool] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", **kwargs ) -> "models.EntityLinkingResult": """Linked entities from a well-known knowledge base. @@ -191,9 +206,13 @@ async def entities_linking( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntityLinkingResult @@ -205,6 +224,7 @@ async def entities_linking( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_linking.metadata['url'] # type: ignore @@ -219,23 +239,24 @@ async def entities_linking( query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') if show_stats is not None: query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -264,7 +285,7 @@ async def key_phrases( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response @@ -278,6 +299,7 @@ async def key_phrases( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.key_phrases.metadata['url'] # type: ignore @@ -296,19 +318,18 @@ async def key_phrases( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -338,7 +359,7 @@ async def languages( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response @@ -352,6 +373,7 @@ async def languages( _input = models.LanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.languages.metadata['url'] # type: ignore @@ -370,19 +392,18 @@ async def languages( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'LanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -399,6 +420,7 @@ async def sentiment( model_version: Optional[str] = None, show_stats: Optional[bool] = None, opinion_mining: Optional[bool] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", **kwargs ) -> "models.SentimentResponse": """Sentiment. @@ -412,12 +434,16 @@ async def sentiment( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :param opinion_mining: (Optional) if set to true, response will contain input and document level statistics including aspect-based sentiment analysis results. :type opinion_mining: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.SentimentResponse @@ -429,6 +455,7 @@ async def sentiment( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.sentiment.metadata['url'] # type: ignore @@ -445,23 +472,24 @@ async def sentiment( query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') if opinion_mining is not None: query_parameters['opinionMining'] = self._serialize.query("opinion_mining", opinion_mining, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/__init__.py index 922049608b99b..5009714787ecb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/__init__.py @@ -20,6 +20,7 @@ from ._models_py3 import EntitiesResult from ._models_py3 import Entity from ._models_py3 import EntityLinkingResult + from ._models_py3 import ErrorResponse from ._models_py3 import InnerError from ._models_py3 import KeyPhraseResult from ._models_py3 import LanguageBatchInput @@ -51,6 +52,7 @@ from ._models import EntitiesResult # type: ignore from ._models import Entity # type: ignore from ._models import EntityLinkingResult # type: ignore + from ._models import ErrorResponse # type: ignore from ._models import InnerError # type: ignore from ._models import KeyPhraseResult # type: ignore from ._models import LanguageBatchInput # type: ignore @@ -74,9 +76,9 @@ DocumentSentimentValue, ErrorCodeValue, InnerErrorCodeValue, - SentenceAspectSentiment, - SentenceOpinionSentiment, SentenceSentimentValue, + StringIndexType, + TokenSentimentValue, WarningCodeValue, ) @@ -94,6 +96,7 @@ 'EntitiesResult', 'Entity', 'EntityLinkingResult', + 'ErrorResponse', 'InnerError', 'KeyPhraseResult', 'LanguageBatchInput', @@ -115,8 +118,8 @@ 'DocumentSentimentValue', 'ErrorCodeValue', 'InnerErrorCodeValue', - 'SentenceAspectSentiment', - 'SentenceOpinionSentiment', 'SentenceSentimentValue', + 'StringIndexType', + 'TokenSentimentValue', 'WarningCodeValue', ] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_models.py index b410706fa9987..840441c257d70 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_models.py @@ -511,15 +511,40 @@ def __init__( self.model_version = kwargs['model_version'] +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Document Error. + :type error: ~azure.ai.textanalytics.v3_1_preview_1.models.TextAnalyticsError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs['error'] + + class InnerError(msrest.serialization.Model): """InnerError. All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "invalidParameterValue", - "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument", - "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", - "invalidCountryHint". + :param code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". :type code: str or ~azure.ai.textanalytics.v3_1_preview_1.models.InnerErrorCodeValue :param message: Required. Error message. :type message: str @@ -896,7 +921,7 @@ class SentenceAspect(msrest.serialization.Model): :param sentiment: Required. Aspect level sentiment for the aspect in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_1.models.SentenceAspectSentiment + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_1.models.TokenSentimentValue :param confidence_scores: Required. Aspect level sentiment confidence scores for the aspect in the sentence. :type confidence_scores: @@ -950,7 +975,7 @@ class SentenceOpinion(msrest.serialization.Model): :param sentiment: Required. Opinion level sentiment for the aspect in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_1.models.SentenceOpinionSentiment + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_1.models.TokenSentimentValue :param confidence_scores: Required. Opinion level sentiment confidence scores for the aspect in the sentence. :type confidence_scores: @@ -1132,8 +1157,8 @@ class TextAnalyticsError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "invalidRequest", - "invalidArgument", "internalServerError", "serviceUnavailable". + :param code: Required. Error code. Possible values include: "InvalidRequest", + "InvalidArgument", "InternalServerError", "ServiceUnavailable". :type code: str or ~azure.ai.textanalytics.v3_1_preview_1.models.ErrorCodeValue :param message: Required. Error message. :type message: str diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_models_py3.py index 34603e0aa18ed..88585d7ebe3ce 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_models_py3.py @@ -575,15 +575,42 @@ def __init__( self.model_version = model_version +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Document Error. + :type error: ~azure.ai.textanalytics.v3_1_preview_1.models.TextAnalyticsError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + *, + error: "TextAnalyticsError", + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + class InnerError(msrest.serialization.Model): """InnerError. All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "invalidParameterValue", - "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument", - "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", - "invalidCountryHint". + :param code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". :type code: str or ~azure.ai.textanalytics.v3_1_preview_1.models.InnerErrorCodeValue :param message: Required. Error message. :type message: str @@ -1005,7 +1032,7 @@ class SentenceAspect(msrest.serialization.Model): :param sentiment: Required. Aspect level sentiment for the aspect in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_1.models.SentenceAspectSentiment + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_1.models.TokenSentimentValue :param confidence_scores: Required. Aspect level sentiment confidence scores for the aspect in the sentence. :type confidence_scores: @@ -1042,7 +1069,7 @@ class SentenceAspect(msrest.serialization.Model): def __init__( self, *, - sentiment: Union[str, "SentenceAspectSentiment"], + sentiment: Union[str, "TokenSentimentValue"], confidence_scores: "AspectConfidenceScoreLabel", offset: int, length: int, @@ -1066,7 +1093,7 @@ class SentenceOpinion(msrest.serialization.Model): :param sentiment: Required. Opinion level sentiment for the aspect in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_1.models.SentenceOpinionSentiment + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_1.models.TokenSentimentValue :param confidence_scores: Required. Opinion level sentiment confidence scores for the aspect in the sentence. :type confidence_scores: @@ -1102,7 +1129,7 @@ class SentenceOpinion(msrest.serialization.Model): def __init__( self, *, - sentiment: Union[str, "SentenceOpinionSentiment"], + sentiment: Union[str, "TokenSentimentValue"], confidence_scores: "AspectConfidenceScoreLabel", offset: int, length: int, @@ -1272,8 +1299,8 @@ class TextAnalyticsError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "invalidRequest", - "invalidArgument", "internalServerError", "serviceUnavailable". + :param code: Required. Error code. Possible values include: "InvalidRequest", + "InvalidArgument", "InternalServerError", "ServiceUnavailable". :type code: str or ~azure.ai.textanalytics.v3_1_preview_1.models.ErrorCodeValue :param message: Required. Error message. :type message: str diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_text_analytics_client_enums.py index 62533920a5741..840d2dbc7f596 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_text_analytics_client_enums.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/models/_text_analytics_client_enums.py @@ -46,47 +46,45 @@ class ErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ - INVALID_REQUEST = "invalidRequest" - INVALID_ARGUMENT = "invalidArgument" - INTERNAL_SERVER_ERROR = "internalServerError" - SERVICE_UNAVAILABLE = "serviceUnavailable" + INVALID_REQUEST = "InvalidRequest" + INVALID_ARGUMENT = "InvalidArgument" + INTERNAL_SERVER_ERROR = "InternalServerError" + SERVICE_UNAVAILABLE = "ServiceUnavailable" class InnerErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ - INVALID_PARAMETER_VALUE = "invalidParameterValue" - INVALID_REQUEST_BODY_FORMAT = "invalidRequestBodyFormat" - EMPTY_REQUEST = "emptyRequest" - MISSING_INPUT_RECORDS = "missingInputRecords" - INVALID_DOCUMENT = "invalidDocument" - MODEL_VERSION_INCORRECT = "modelVersionIncorrect" - INVALID_DOCUMENT_BATCH = "invalidDocumentBatch" - UNSUPPORTED_LANGUAGE_CODE = "unsupportedLanguageCode" - INVALID_COUNTRY_HINT = "invalidCountryHint" - -class SentenceAspectSentiment(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Aspect level sentiment for the aspect in the sentence. + INVALID_PARAMETER_VALUE = "InvalidParameterValue" + INVALID_REQUEST_BODY_FORMAT = "InvalidRequestBodyFormat" + EMPTY_REQUEST = "EmptyRequest" + MISSING_INPUT_RECORDS = "MissingInputRecords" + INVALID_DOCUMENT = "InvalidDocument" + MODEL_VERSION_INCORRECT = "ModelVersionIncorrect" + INVALID_DOCUMENT_BATCH = "InvalidDocumentBatch" + UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" + INVALID_COUNTRY_HINT = "InvalidCountryHint" + +class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The predicted Sentiment for the sentence. """ POSITIVE = "positive" - MIXED = "mixed" + NEUTRAL = "neutral" NEGATIVE = "negative" -class SentenceOpinionSentiment(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Opinion level sentiment for the aspect in the sentence. - """ +class StringIndexType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - POSITIVE = "positive" - MIXED = "mixed" - NEGATIVE = "negative" + TEXT_ELEMENTS_V8 = "TextElements_v8" #: Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. + UNICODE_CODE_POINT = "UnicodeCodePoint" #: Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. + UTF16_CODE_UNIT = "Utf16CodeUnit" #: Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. -class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The predicted Sentiment for the sentence. +class TokenSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Aspect level sentiment for the aspect in the sentence. """ POSITIVE = "positive" - NEUTRAL = "neutral" + MIXED = "mixed" NEGATIVE = "negative" class WarningCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/operations/_text_analytics_client_operations.py index 138a47329b0e6..59d9790a6e63c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_1/operations/_text_analytics_client_operations.py @@ -16,7 +16,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -28,6 +28,7 @@ def entities_recognition_general( documents, # type: List["models.MultiLanguageInput"] model_version=None, # type: Optional[str] show_stats=None, # type: Optional[bool] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] **kwargs # type: Any ): # type: (...) -> "models.EntitiesResult" @@ -43,9 +44,13 @@ def entities_recognition_general( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult @@ -57,6 +62,7 @@ def entities_recognition_general( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_recognition_general.metadata['url'] # type: ignore @@ -71,23 +77,24 @@ def entities_recognition_general( query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') if show_stats is not None: query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -104,6 +111,7 @@ def entities_recognition_pii( model_version=None, # type: Optional[str] show_stats=None, # type: Optional[bool] domain=None, # type: Optional[str] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] **kwargs # type: Any ): # type: (...) -> "models.EntitiesResult" @@ -120,11 +128,15 @@ def entities_recognition_pii( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :param domain: (Optional) if set to 'PHI', response will contain only PHI entities. :type domain: str + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntitiesResult @@ -136,6 +148,7 @@ def entities_recognition_pii( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_recognition_pii.metadata['url'] # type: ignore @@ -152,23 +165,24 @@ def entities_recognition_pii( query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') if domain is not None: query_parameters['domain'] = self._serialize.query("domain", domain, 'str') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -184,6 +198,7 @@ def entities_linking( documents, # type: List["models.MultiLanguageInput"] model_version=None, # type: Optional[str] show_stats=None, # type: Optional[bool] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] **kwargs # type: Any ): # type: (...) -> "models.EntityLinkingResult" @@ -198,9 +213,13 @@ def entities_linking( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.EntityLinkingResult @@ -212,6 +231,7 @@ def entities_linking( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.entities_linking.metadata['url'] # type: ignore @@ -226,23 +246,24 @@ def entities_linking( query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') if show_stats is not None: query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -272,7 +293,7 @@ def key_phrases( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response @@ -286,6 +307,7 @@ def key_phrases( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.key_phrases.metadata['url'] # type: ignore @@ -304,19 +326,18 @@ def key_phrases( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -347,7 +368,7 @@ def languages( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response @@ -361,6 +382,7 @@ def languages( _input = models.LanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.languages.metadata['url'] # type: ignore @@ -379,19 +401,18 @@ def languages( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'LanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -408,6 +429,7 @@ def sentiment( model_version=None, # type: Optional[str] show_stats=None, # type: Optional[bool] opinion_mining=None, # type: Optional[bool] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] **kwargs # type: Any ): # type: (...) -> "models.SentimentResponse" @@ -422,12 +444,16 @@ def sentiment( :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str - :param show_stats: (Optional) if set to true, response will contain input and document level + :param show_stats: (Optional) if set to true, response will contain request and document level statistics. :type show_stats: bool :param opinion_mining: (Optional) if set to true, response will contain input and document level statistics including aspect-based sentiment analysis results. :type opinion_mining: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_1.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) :rtype: ~azure.ai.textanalytics.v3_1_preview_1.models.SentimentResponse @@ -439,6 +465,7 @@ def sentiment( _input = models.MultiLanguageBatchInput(documents=documents) content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" # Construct URL url = self.sentiment.metadata['url'] # type: ignore @@ -455,23 +482,24 @@ def sentiment( query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') if opinion_mining is not None: query_parameters['opinionMining'] = self._serialize.query("opinion_mining", opinion_mining, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.TextAnalyticsError, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/__init__.py new file mode 100644 index 0000000000000..ca973ce689000 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/__init__.py @@ -0,0 +1,16 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._text_analytics_client import TextAnalyticsClient +__all__ = ['TextAnalyticsClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_configuration.py new file mode 100644 index 0000000000000..e216512dcf2e7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_configuration.py @@ -0,0 +1,68 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class TextAnalyticsClientConfiguration(Configuration): + """Configuration for TextAnalyticsClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + endpoint, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.endpoint = endpoint + self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_metadata.json b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_metadata.json new file mode 100644 index 0000000000000..1fe442b56d2f3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_metadata.json @@ -0,0 +1,131 @@ +{ + "chosen_version": "v3.1-preview.2", + "total_api_version_list": ["v3.1-preview.2"], + "client": { + "name": "TextAnalyticsClient", + "filename": "_text_analytics_client", + "description": "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", + "base_url": null, + "custom_base_url": "\u0027{Endpoint}/text/analytics/v3.1-preview.2\u0027", + "azure_arm": false, + "has_lro_operations": false + }, + "global_parameters": { + "sync_method": { + "credential": { + "method_signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "endpoint": { + "method_signature": "endpoint, # type: str", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", + "docstring_type": "str", + "required": true + } + }, + "async_method": { + "credential": { + "method_signature": "credential, # type: \"AsyncTokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "endpoint": { + "method_signature": "endpoint, # type: str", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, endpoint" + }, + "config": { + "credential": true, + "credential_scopes": ["https://cognitiveservices.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null + }, + "operation_groups": { + }, + "operation_mixins": { + "entities_recognition_general" : { + "sync": { + "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n string_index_type=\"TextElements_v8\", # type: Optional[Union[str, \"models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def entities_recognition_general(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"models.StringIndexType\"]] = \"TextElements_v8\",\n **kwargs\n) -\u003e \"models.EntitiesResult\":\n", + "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "documents, model_version, show_stats, string_index_type" + }, + "entities_recognition_pii" : { + "sync": { + "signature": "def entities_recognition_pii(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n domain=None, # type: Optional[str]\n string_index_type=\"TextElements_v8\", # type: Optional[Union[str, \"models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param domain: (Optional) if set to \u0027PHI\u0027, response will contain only PHI entities.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiEntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.PiiEntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def entities_recognition_pii(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n domain: Optional[str] = None,\n string_index_type: Optional[Union[str, \"models.StringIndexType\"]] = \"TextElements_v8\",\n **kwargs\n) -\u003e \"models.PiiEntitiesResult\":\n", + "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param domain: (Optional) if set to \u0027PHI\u0027, response will contain only PHI entities.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiEntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.PiiEntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "documents, model_version, show_stats, domain, string_index_type" + }, + "entities_linking" : { + "sync": { + "signature": "def entities_linking(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n string_index_type=\"TextElements_v8\", # type: Optional[Union[str, \"models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Linked entities from a well-known knowledge base.\n\nThe API returns a list of recognized entities with links to a well-known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def entities_linking(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"models.StringIndexType\"]] = \"TextElements_v8\",\n **kwargs\n) -\u003e \"models.EntityLinkingResult\":\n", + "doc": "\"\"\"Linked entities from a well-known knowledge base.\n\nThe API returns a list of recognized entities with links to a well-known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "documents, model_version, show_stats, string_index_type" + }, + "key_phrases" : { + "sync": { + "signature": "def key_phrases(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def key_phrases(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n **kwargs\n) -\u003e \"models.KeyPhraseResult\":\n", + "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "documents, model_version, show_stats" + }, + "languages" : { + "sync": { + "signature": "def languages(\n self,\n documents, # type: List[\"models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def languages(\n self,\n documents: List[\"models.LanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n **kwargs\n) -\u003e \"models.LanguageResult\":\n", + "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "documents, model_version, show_stats" + }, + "sentiment" : { + "sync": { + "signature": "def sentiment(\n self,\n documents, # type: List[\"models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n opinion_mining=None, # type: Optional[bool]\n string_index_type=\"TextElements_v8\", # type: Optional[Union[str, \"models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(aspects) and opinions.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param opinion_mining: (Optional) if set to true, response will contain input and document\n level statistics including aspect-based sentiment analysis results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def sentiment(\n self,\n documents: List[\"models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n opinion_mining: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"models.StringIndexType\"]] = \"TextElements_v8\",\n **kwargs\n) -\u003e \"models.SentimentResponse\":\n", + "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(aspects) and opinions.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param opinion_mining: (Optional) if set to true, response will contain input and document\n level statistics including aspect-based sentiment analysis results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "documents, model_version, show_stats, opinion_mining, string_index_type" + } + }, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}" +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_text_analytics_client.py new file mode 100644 index 0000000000000..816d79abf80cb --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/_text_analytics_client.py @@ -0,0 +1,61 @@ +# 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. +# -------------------------------------------------------------------------- + +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 azure.core.credentials import TokenCredential + +from ._configuration import TextAnalyticsClientConfiguration +from .operations import TextAnalyticsClientOperationsMixin +from . import models + + +class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): + """The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + endpoint, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + base_url = '{Endpoint}/text/analytics/v3.1-preview.2' + self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> TextAnalyticsClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/__init__.py new file mode 100644 index 0000000000000..ffe1820f1f275 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/__init__.py @@ -0,0 +1,10 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._text_analytics_client_async import TextAnalyticsClient +__all__ = ['TextAnalyticsClient'] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/_configuration_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/_configuration_async.py new file mode 100644 index 0000000000000..033d80c380058 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/_configuration_async.py @@ -0,0 +1,64 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class TextAnalyticsClientConfiguration(Configuration): + """Configuration for TextAnalyticsClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + endpoint: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.endpoint = endpoint + self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/_text_analytics_client_async.py new file mode 100644 index 0000000000000..17d7e258b5099 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/_text_analytics_client_async.py @@ -0,0 +1,55 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core import AsyncPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration_async import TextAnalyticsClientConfiguration +from .operations_async import TextAnalyticsClientOperationsMixin +from .. import models + + +class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): + """The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + endpoint: str, + **kwargs: Any + ) -> None: + base_url = '{Endpoint}/text/analytics/v3.1-preview.2' + self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "TextAnalyticsClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/operations_async/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/operations_async/__init__.py new file mode 100644 index 0000000000000..e6429ee824b7e --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/operations_async/__init__.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._text_analytics_client_operations_async import TextAnalyticsClientOperationsMixin + +__all__ = [ + 'TextAnalyticsClientOperationsMixin', +] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/operations_async/_text_analytics_client_operations_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/operations_async/_text_analytics_client_operations_async.py new file mode 100644 index 0000000000000..e9c991e24f824 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/aio/operations_async/_text_analytics_client_operations_async.py @@ -0,0 +1,501 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class TextAnalyticsClientOperationsMixin: + + async def entities_recognition_general( + self, + documents: List["models.MultiLanguageInput"], + model_version: Optional[str] = None, + show_stats: Optional[bool] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", + **kwargs + ) -> "models.EntitiesResult": + """Named Entity Recognition. + + The API returns a list of general named entities in a given document. For the list of supported + entity types, check :code:`Supported Entity Types in Text + Analytics API`. See the :code:`Supported languages in Text + Analytics API` for the list of enabled languages. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EntitiesResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.EntitiesResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.EntitiesResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.entities_recognition_general.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('EntitiesResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + entities_recognition_general.metadata = {'url': '/entities/recognition/general'} # type: ignore + + async def entities_recognition_pii( + self, + documents: List["models.MultiLanguageInput"], + model_version: Optional[str] = None, + show_stats: Optional[bool] = None, + domain: Optional[str] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", + **kwargs + ) -> "models.PiiEntitiesResult": + """Entities containing personal information. + + The API returns a list of entities with personal information (\"SSN\", \"Bank Account\" etc) in + the document. For the list of supported entity types, check :code:`Supported Entity Types in Text Analytics API`. See the + :code:`Supported languages in Text Analytics API` for the + list of enabled languages. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :param domain: (Optional) if set to 'PHI', response will contain only PHI entities. + :type domain: str + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PiiEntitiesResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.PiiEntitiesResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.PiiEntitiesResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.entities_recognition_pii.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if domain is not None: + query_parameters['domain'] = self._serialize.query("domain", domain, 'str') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('PiiEntitiesResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + entities_recognition_pii.metadata = {'url': '/entities/recognition/pii'} # type: ignore + + async def entities_linking( + self, + documents: List["models.MultiLanguageInput"], + model_version: Optional[str] = None, + show_stats: Optional[bool] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", + **kwargs + ) -> "models.EntityLinkingResult": + """Linked entities from a well-known knowledge base. + + The API returns a list of recognized entities with links to a well-known knowledge base. See + the :code:`Supported languages in Text Analytics API` for + the list of enabled languages. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EntityLinkingResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.EntityLinkingResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.EntityLinkingResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.entities_linking.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('EntityLinkingResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + entities_linking.metadata = {'url': '/entities/linking'} # type: ignore + + async def key_phrases( + self, + documents: List["models.MultiLanguageInput"], + model_version: Optional[str] = None, + show_stats: Optional[bool] = None, + **kwargs + ) -> "models.KeyPhraseResult": + """Key Phrases. + + The API returns a list of strings denoting the key phrases in the input text. See the :code:`Supported languages in Text Analytics API` for the list of + enabled languages. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyPhraseResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.KeyPhraseResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.KeyPhraseResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.key_phrases.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('KeyPhraseResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + key_phrases.metadata = {'url': '/keyPhrases'} # type: ignore + + async def languages( + self, + documents: List["models.LanguageInput"], + model_version: Optional[str] = None, + show_stats: Optional[bool] = None, + **kwargs + ) -> "models.LanguageResult": + """Detect Language. + + The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. See the :code:`Supported languages in Text Analytics API` for the list of + enabled languages. + + :param documents: + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.LanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LanguageResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.LanguageResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.LanguageResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.LanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.languages.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'LanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('LanguageResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + languages.metadata = {'url': '/languages'} # type: ignore + + async def sentiment( + self, + documents: List["models.MultiLanguageInput"], + model_version: Optional[str] = None, + show_stats: Optional[bool] = None, + opinion_mining: Optional[bool] = None, + string_index_type: Optional[Union[str, "models.StringIndexType"]] = "TextElements_v8", + **kwargs + ) -> "models.SentimentResponse": + """Sentiment. + + The API returns a detailed sentiment analysis for the input text. The analysis is done in + multiple levels of granularity, start from the a document level, down to sentence and key terms + (aspects) and opinions. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :param opinion_mining: (Optional) if set to true, response will contain input and document + level statistics including aspect-based sentiment analysis results. + :type opinion_mining: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SentimentResponse, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.SentimentResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SentimentResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.sentiment.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if opinion_mining is not None: + query_parameters['opinionMining'] = self._serialize.query("opinion_mining", opinion_mining, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('SentimentResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + sentiment.metadata = {'url': '/sentiment'} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/__init__.py new file mode 100644 index 0000000000000..4129958a9fb90 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/__init__.py @@ -0,0 +1,131 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AspectConfidenceScoreLabel + from ._models_py3 import AspectRelation + from ._models_py3 import DetectedLanguage + from ._models_py3 import DocumentEntities + from ._models_py3 import DocumentError + from ._models_py3 import DocumentKeyPhrases + from ._models_py3 import DocumentLanguage + from ._models_py3 import DocumentLinkedEntities + from ._models_py3 import DocumentSentiment + from ._models_py3 import DocumentStatistics + from ._models_py3 import EntitiesResult + from ._models_py3 import Entity + from ._models_py3 import EntityLinkingResult + from ._models_py3 import ErrorResponse + from ._models_py3 import InnerError + from ._models_py3 import KeyPhraseResult + from ._models_py3 import LanguageBatchInput + from ._models_py3 import LanguageInput + from ._models_py3 import LanguageResult + from ._models_py3 import LinkedEntity + from ._models_py3 import Match + from ._models_py3 import MultiLanguageBatchInput + from ._models_py3 import MultiLanguageInput + from ._models_py3 import PiiDocumentEntities + from ._models_py3 import PiiEntitiesResult + from ._models_py3 import RequestStatistics + from ._models_py3 import SentenceAspect + from ._models_py3 import SentenceOpinion + from ._models_py3 import SentenceSentiment + from ._models_py3 import SentimentConfidenceScorePerLabel + from ._models_py3 import SentimentResponse + from ._models_py3 import TextAnalyticsError + from ._models_py3 import TextAnalyticsWarning +except (SyntaxError, ImportError): + from ._models import AspectConfidenceScoreLabel # type: ignore + from ._models import AspectRelation # type: ignore + from ._models import DetectedLanguage # type: ignore + from ._models import DocumentEntities # type: ignore + from ._models import DocumentError # type: ignore + from ._models import DocumentKeyPhrases # type: ignore + from ._models import DocumentLanguage # type: ignore + from ._models import DocumentLinkedEntities # type: ignore + from ._models import DocumentSentiment # type: ignore + from ._models import DocumentStatistics # type: ignore + from ._models import EntitiesResult # type: ignore + from ._models import Entity # type: ignore + from ._models import EntityLinkingResult # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import InnerError # type: ignore + from ._models import KeyPhraseResult # type: ignore + from ._models import LanguageBatchInput # type: ignore + from ._models import LanguageInput # type: ignore + from ._models import LanguageResult # type: ignore + from ._models import LinkedEntity # type: ignore + from ._models import Match # type: ignore + from ._models import MultiLanguageBatchInput # type: ignore + from ._models import MultiLanguageInput # type: ignore + from ._models import PiiDocumentEntities # type: ignore + from ._models import PiiEntitiesResult # type: ignore + from ._models import RequestStatistics # type: ignore + from ._models import SentenceAspect # type: ignore + from ._models import SentenceOpinion # type: ignore + from ._models import SentenceSentiment # type: ignore + from ._models import SentimentConfidenceScorePerLabel # type: ignore + from ._models import SentimentResponse # type: ignore + from ._models import TextAnalyticsError # type: ignore + from ._models import TextAnalyticsWarning # type: ignore + +from ._text_analytics_client_enums import ( + AspectRelationType, + DocumentSentimentValue, + ErrorCodeValue, + InnerErrorCodeValue, + SentenceSentimentValue, + StringIndexType, + TokenSentimentValue, + WarningCodeValue, +) + +__all__ = [ + 'AspectConfidenceScoreLabel', + 'AspectRelation', + 'DetectedLanguage', + 'DocumentEntities', + 'DocumentError', + 'DocumentKeyPhrases', + 'DocumentLanguage', + 'DocumentLinkedEntities', + 'DocumentSentiment', + 'DocumentStatistics', + 'EntitiesResult', + 'Entity', + 'EntityLinkingResult', + 'ErrorResponse', + 'InnerError', + 'KeyPhraseResult', + 'LanguageBatchInput', + 'LanguageInput', + 'LanguageResult', + 'LinkedEntity', + 'Match', + 'MultiLanguageBatchInput', + 'MultiLanguageInput', + 'PiiDocumentEntities', + 'PiiEntitiesResult', + 'RequestStatistics', + 'SentenceAspect', + 'SentenceOpinion', + 'SentenceSentiment', + 'SentimentConfidenceScorePerLabel', + 'SentimentResponse', + 'TextAnalyticsError', + 'TextAnalyticsWarning', + 'AspectRelationType', + 'DocumentSentimentValue', + 'ErrorCodeValue', + 'InnerErrorCodeValue', + 'SentenceSentimentValue', + 'StringIndexType', + 'TokenSentimentValue', + 'WarningCodeValue', +] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_models.py new file mode 100644 index 0000000000000..285699e441d1f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_models.py @@ -0,0 +1,1319 @@ +# 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. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AspectConfidenceScoreLabel(msrest.serialization.Model): + """Represents the confidence scores across all sentiment classes: positive, neutral, negative. + + All required parameters must be populated in order to send to Azure. + + :param positive: Required. + :type positive: float + :param negative: Required. + :type negative: float + """ + + _validation = { + 'positive': {'required': True}, + 'negative': {'required': True}, + } + + _attribute_map = { + 'positive': {'key': 'positive', 'type': 'float'}, + 'negative': {'key': 'negative', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(AspectConfidenceScoreLabel, self).__init__(**kwargs) + self.positive = kwargs['positive'] + self.negative = kwargs['negative'] + + +class AspectRelation(msrest.serialization.Model): + """AspectRelation. + + All required parameters must be populated in order to send to Azure. + + :param relation_type: Required. The type related to the aspect. Possible values include: + "opinion", "aspect". + :type relation_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.AspectRelationType + :param ref: Required. The JSON pointer indicating the linked object. + :type ref: str + """ + + _validation = { + 'relation_type': {'required': True}, + 'ref': {'required': True}, + } + + _attribute_map = { + 'relation_type': {'key': 'relationType', 'type': 'str'}, + 'ref': {'key': 'ref', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AspectRelation, self).__init__(**kwargs) + self.relation_type = kwargs['relation_type'] + self.ref = kwargs['ref'] + + +class DetectedLanguage(msrest.serialization.Model): + """DetectedLanguage. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Long name of a detected language (e.g. English, French). + :type name: str + :param iso6391_name: Required. A two letter representation of the detected language according + to the ISO 639-1 standard (e.g. en, fr). + :type iso6391_name: str + :param confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :type confidence_score: float + """ + + _validation = { + 'name': {'required': True}, + 'iso6391_name': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'iso6391_name': {'key': 'iso6391Name', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DetectedLanguage, self).__init__(**kwargs) + self.name = kwargs['name'] + self.iso6391_name = kwargs['iso6391_name'] + self.confidence_score = kwargs['confidence_score'] + + +class DocumentEntities(msrest.serialization.Model): + """DocumentEntities. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param entities: Required. Recognized entities in the document. + :type entities: list[~azure.ai.textanalytics.v3_1_preview_2.models.Entity] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[Entity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + super(DocumentEntities, self).__init__(**kwargs) + self.id = kwargs['id'] + self.entities = kwargs['entities'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentError(msrest.serialization.Model): + """DocumentError. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Document Id. + :type id: str + :param error: Required. Document Error. + :type error: ~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsError + """ + + _validation = { + 'id': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + **kwargs + ): + super(DocumentError, self).__init__(**kwargs) + self.id = kwargs['id'] + self.error = kwargs['error'] + + +class DocumentKeyPhrases(msrest.serialization.Model): + """DocumentKeyPhrases. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :type key_phrases: list[str] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'key_phrases': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'key_phrases': {'key': 'keyPhrases', 'type': '[str]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + super(DocumentKeyPhrases, self).__init__(**kwargs) + self.id = kwargs['id'] + self.key_phrases = kwargs['key_phrases'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentLanguage(msrest.serialization.Model): + """DocumentLanguage. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param detected_language: Required. Detected Language. + :type detected_language: ~azure.ai.textanalytics.v3_1_preview_2.models.DetectedLanguage + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'detected_language': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'detected_language': {'key': 'detectedLanguage', 'type': 'DetectedLanguage'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + super(DocumentLanguage, self).__init__(**kwargs) + self.id = kwargs['id'] + self.detected_language = kwargs['detected_language'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentLinkedEntities(msrest.serialization.Model): + """DocumentLinkedEntities. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param entities: Required. Recognized well-known entities in the document. + :type entities: list[~azure.ai.textanalytics.v3_1_preview_2.models.LinkedEntity] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[LinkedEntity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + super(DocumentLinkedEntities, self).__init__(**kwargs) + self.id = kwargs['id'] + self.entities = kwargs['entities'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentSentiment(msrest.serialization.Model): + """DocumentSentiment. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentSentimentValue + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 + for each sentiment class. + :type confidence_scores: + ~azure.ai.textanalytics.v3_1_preview_2.models.SentimentConfidenceScorePerLabel + :param sentences: Required. Sentence level sentiment analysis. + :type sentences: list[~azure.ai.textanalytics.v3_1_preview_2.models.SentenceSentiment] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + """ + + _validation = { + 'id': {'required': True}, + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'sentences': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, + 'sentences': {'key': 'sentences', 'type': '[SentenceSentiment]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + } + + def __init__( + self, + **kwargs + ): + super(DocumentSentiment, self).__init__(**kwargs) + self.id = kwargs['id'] + self.sentiment = kwargs['sentiment'] + self.statistics = kwargs.get('statistics', None) + self.confidence_scores = kwargs['confidence_scores'] + self.sentences = kwargs['sentences'] + self.warnings = kwargs['warnings'] + + +class DocumentStatistics(msrest.serialization.Model): + """if showStats=true was specified in the request this field will contain information about the document payload. + + All required parameters must be populated in order to send to Azure. + + :param characters_count: Required. Number of text elements recognized in the document. + :type characters_count: int + :param transactions_count: Required. Number of transactions for the document. + :type transactions_count: int + """ + + _validation = { + 'characters_count': {'required': True}, + 'transactions_count': {'required': True}, + } + + _attribute_map = { + 'characters_count': {'key': 'charactersCount', 'type': 'int'}, + 'transactions_count': {'key': 'transactionsCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(DocumentStatistics, self).__init__(**kwargs) + self.characters_count = kwargs['characters_count'] + self.transactions_count = kwargs['transactions_count'] + + +class EntitiesResult(msrest.serialization.Model): + """EntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentEntities] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EntitiesResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class Entity(msrest.serialization.Model): + """Entity. + + All required parameters must be populated in order to send to Azure. + + :param text: Required. Entity text as appears in the request. + :type text: str + :param category: Required. Entity type, such as Person/Location/Org/SSN etc. + :type category: str + :param subcategory: Entity sub type, such as Age/Year/TimeRange etc. + :type subcategory: str + :param offset: Required. Start position for the entity text. + :type offset: int + :param length: Required. Length for the entity text. + :type length: int + :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :type confidence_score: float + """ + + _validation = { + 'text': {'required': True}, + 'category': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'subcategory': {'key': 'subcategory', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(Entity, self).__init__(**kwargs) + self.text = kwargs['text'] + self.category = kwargs['category'] + self.subcategory = kwargs.get('subcategory', None) + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.confidence_score = kwargs['confidence_score'] + + +class EntityLinkingResult(msrest.serialization.Model): + """EntityLinkingResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentLinkedEntities] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentLinkedEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EntityLinkingResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Document Error. + :type error: ~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs['error'] + + +class InnerError(msrest.serialization.Model): + """InnerError. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". + :type code: str or ~azure.ai.textanalytics.v3_1_preview_2.models.InnerErrorCodeValue + :param message: Required. Error message. + :type message: str + :param details: Error details. + :type details: dict[str, str] + :param target: Error target. + :type target: str + :param innererror: Inner error contains more specific information. + :type innererror: ~azure.ai.textanalytics.v3_1_preview_2.models.InnerError + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '{str}'}, + 'target': {'key': 'target', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + } + + def __init__( + self, + **kwargs + ): + super(InnerError, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.details = kwargs.get('details', None) + self.target = kwargs.get('target', None) + self.innererror = kwargs.get('innererror', None) + + +class KeyPhraseResult(msrest.serialization.Model): + """KeyPhraseResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentKeyPhrases] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentKeyPhrases]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyPhraseResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class LanguageBatchInput(msrest.serialization.Model): + """LanguageBatchInput. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.LanguageInput] + """ + + _validation = { + 'documents': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[LanguageInput]'}, + } + + def __init__( + self, + **kwargs + ): + super(LanguageBatchInput, self).__init__(**kwargs) + self.documents = kwargs['documents'] + + +class LanguageInput(msrest.serialization.Model): + """LanguageInput. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param text: Required. + :type text: str + :param country_hint: + :type country_hint: str + """ + + _validation = { + 'id': {'required': True}, + 'text': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'country_hint': {'key': 'countryHint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LanguageInput, self).__init__(**kwargs) + self.id = kwargs['id'] + self.text = kwargs['text'] + self.country_hint = kwargs.get('country_hint', None) + + +class LanguageResult(msrest.serialization.Model): + """LanguageResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentLanguage] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentLanguage]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LanguageResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class LinkedEntity(msrest.serialization.Model): + """LinkedEntity. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Entity Linking formal name. + :type name: str + :param matches: Required. List of instances this entity appears in the text. + :type matches: list[~azure.ai.textanalytics.v3_1_preview_2.models.Match] + :param language: Required. Language used in the data source. + :type language: str + :param id: Unique identifier of the recognized entity from the data source. + :type id: str + :param url: Required. URL for the entity's page from the data source. + :type url: str + :param data_source: Required. Data source used to extract entity linking, such as Wiki/Bing + etc. + :type data_source: str + :param bing_id: Bing unique identifier of the recognized entity. Use in conjunction with the + Bing Entity Search API to fetch additional relevant information. + :type bing_id: str + """ + + _validation = { + 'name': {'required': True}, + 'matches': {'required': True}, + 'language': {'required': True}, + 'url': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'matches': {'key': 'matches', 'type': '[Match]'}, + 'language': {'key': 'language', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'bing_id': {'key': 'bingId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LinkedEntity, self).__init__(**kwargs) + self.name = kwargs['name'] + self.matches = kwargs['matches'] + self.language = kwargs['language'] + self.id = kwargs.get('id', None) + self.url = kwargs['url'] + self.data_source = kwargs['data_source'] + self.bing_id = kwargs.get('bing_id', None) + + +class Match(msrest.serialization.Model): + """Match. + + All required parameters must be populated in order to send to Azure. + + :param confidence_score: Required. If a well-known item is recognized, a decimal number + denoting the confidence level between 0 and 1 will be returned. + :type confidence_score: float + :param text: Required. Entity text as appears in the request. + :type text: str + :param offset: Required. Start position for the entity match text. + :type offset: int + :param length: Required. Length for the entity match text. + :type length: int + """ + + _validation = { + 'confidence_score': {'required': True}, + 'text': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'text': {'key': 'text', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(Match, self).__init__(**kwargs) + self.confidence_score = kwargs['confidence_score'] + self.text = kwargs['text'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + + +class MultiLanguageBatchInput(msrest.serialization.Model): + """Contains a set of input documents to be analyzed by the service. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + """ + + _validation = { + 'documents': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[MultiLanguageInput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MultiLanguageBatchInput, self).__init__(**kwargs) + self.documents = kwargs['documents'] + + +class MultiLanguageInput(msrest.serialization.Model): + """Contains an input document to be analyzed by the service. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A unique, non-empty document identifier. + :type id: str + :param text: Required. The input text to process. + :type text: str + :param language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :type language: str + """ + + _validation = { + 'id': {'required': True}, + 'text': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MultiLanguageInput, self).__init__(**kwargs) + self.id = kwargs['id'] + self.text = kwargs['text'] + self.language = kwargs.get('language', None) + + +class PiiDocumentEntities(msrest.serialization.Model): + """PiiDocumentEntities. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param entities: Required. Recognized entities in the document. + :type entities: list[~azure.ai.textanalytics.v3_1_preview_2.models.Entity] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + :param redacted_text: Returns redacted text. + :type redacted_text: str + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[Entity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + 'redacted_text': {'key': 'redactedText', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PiiDocumentEntities, self).__init__(**kwargs) + self.id = kwargs['id'] + self.entities = kwargs['entities'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + self.redacted_text = kwargs.get('redacted_text', None) + + +class PiiEntitiesResult(msrest.serialization.Model): + """PiiEntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.PiiDocumentEntities] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[PiiDocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PiiEntitiesResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class RequestStatistics(msrest.serialization.Model): + """if showStats=true was specified in the request this field will contain information about the request payload. + + All required parameters must be populated in order to send to Azure. + + :param documents_count: Required. Number of documents submitted in the request. + :type documents_count: int + :param valid_documents_count: Required. Number of valid documents. This excludes empty, over- + size limit or non-supported languages documents. + :type valid_documents_count: int + :param erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :type erroneous_documents_count: int + :param transactions_count: Required. Number of transactions for the request. + :type transactions_count: long + """ + + _validation = { + 'documents_count': {'required': True}, + 'valid_documents_count': {'required': True}, + 'erroneous_documents_count': {'required': True}, + 'transactions_count': {'required': True}, + } + + _attribute_map = { + 'documents_count': {'key': 'documentsCount', 'type': 'int'}, + 'valid_documents_count': {'key': 'validDocumentsCount', 'type': 'int'}, + 'erroneous_documents_count': {'key': 'erroneousDocumentsCount', 'type': 'int'}, + 'transactions_count': {'key': 'transactionsCount', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(RequestStatistics, self).__init__(**kwargs) + self.documents_count = kwargs['documents_count'] + self.valid_documents_count = kwargs['valid_documents_count'] + self.erroneous_documents_count = kwargs['erroneous_documents_count'] + self.transactions_count = kwargs['transactions_count'] + + +class SentenceAspect(msrest.serialization.Model): + """SentenceAspect. + + All required parameters must be populated in order to send to Azure. + + :param sentiment: Required. Aspect level sentiment for the aspect in the sentence. Possible + values include: "positive", "mixed", "negative". + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_2.models.TokenSentimentValue + :param confidence_scores: Required. Aspect level sentiment confidence scores for the aspect in + the sentence. + :type confidence_scores: + ~azure.ai.textanalytics.v3_1_preview_2.models.AspectConfidenceScoreLabel + :param offset: Required. The aspect offset from the start of the sentence. + :type offset: int + :param length: Required. The length of the aspect. + :type length: int + :param text: Required. The aspect text detected. + :type text: str + :param relations: Required. The array of either opinion or aspect object which is related to + the aspect. + :type relations: list[~azure.ai.textanalytics.v3_1_preview_2.models.AspectRelation] + """ + + _validation = { + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'text': {'required': True}, + 'relations': {'required': True}, + } + + _attribute_map = { + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'AspectConfidenceScoreLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'relations': {'key': 'relations', 'type': '[AspectRelation]'}, + } + + def __init__( + self, + **kwargs + ): + super(SentenceAspect, self).__init__(**kwargs) + self.sentiment = kwargs['sentiment'] + self.confidence_scores = kwargs['confidence_scores'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.text = kwargs['text'] + self.relations = kwargs['relations'] + + +class SentenceOpinion(msrest.serialization.Model): + """SentenceOpinion. + + All required parameters must be populated in order to send to Azure. + + :param sentiment: Required. Opinion level sentiment for the aspect in the sentence. Possible + values include: "positive", "mixed", "negative". + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_2.models.TokenSentimentValue + :param confidence_scores: Required. Opinion level sentiment confidence scores for the aspect in + the sentence. + :type confidence_scores: + ~azure.ai.textanalytics.v3_1_preview_2.models.AspectConfidenceScoreLabel + :param offset: Required. The opinion offset from the start of the sentence. + :type offset: int + :param length: Required. The length of the opinion. + :type length: int + :param text: Required. The aspect text detected. + :type text: str + :param is_negated: Required. The indicator representing if the opinion is negated. + :type is_negated: bool + """ + + _validation = { + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'text': {'required': True}, + 'is_negated': {'required': True}, + } + + _attribute_map = { + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'AspectConfidenceScoreLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'is_negated': {'key': 'isNegated', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(SentenceOpinion, self).__init__(**kwargs) + self.sentiment = kwargs['sentiment'] + self.confidence_scores = kwargs['confidence_scores'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.text = kwargs['text'] + self.is_negated = kwargs['is_negated'] + + +class SentenceSentiment(msrest.serialization.Model): + """SentenceSentiment. + + All required parameters must be populated in order to send to Azure. + + :param text: Required. The sentence text. + :type text: str + :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: + "positive", "neutral", "negative". + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_2.models.SentenceSentimentValue + :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :type confidence_scores: + ~azure.ai.textanalytics.v3_1_preview_2.models.SentimentConfidenceScorePerLabel + :param offset: Required. The sentence offset from the start of the document. + :type offset: int + :param length: Required. The length of the sentence. + :type length: int + :param aspects: The array of aspect object for the sentence. + :type aspects: list[~azure.ai.textanalytics.v3_1_preview_2.models.SentenceAspect] + :param opinions: The array of opinion object for the sentence. + :type opinions: list[~azure.ai.textanalytics.v3_1_preview_2.models.SentenceOpinion] + """ + + _validation = { + 'text': {'required': True}, + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'aspects': {'key': 'aspects', 'type': '[SentenceAspect]'}, + 'opinions': {'key': 'opinions', 'type': '[SentenceOpinion]'}, + } + + def __init__( + self, + **kwargs + ): + super(SentenceSentiment, self).__init__(**kwargs) + self.text = kwargs['text'] + self.sentiment = kwargs['sentiment'] + self.confidence_scores = kwargs['confidence_scores'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.aspects = kwargs.get('aspects', None) + self.opinions = kwargs.get('opinions', None) + + +class SentimentConfidenceScorePerLabel(msrest.serialization.Model): + """Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. + + All required parameters must be populated in order to send to Azure. + + :param positive: Required. + :type positive: float + :param neutral: Required. + :type neutral: float + :param negative: Required. + :type negative: float + """ + + _validation = { + 'positive': {'required': True}, + 'neutral': {'required': True}, + 'negative': {'required': True}, + } + + _attribute_map = { + 'positive': {'key': 'positive', 'type': 'float'}, + 'neutral': {'key': 'neutral', 'type': 'float'}, + 'negative': {'key': 'negative', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) + self.positive = kwargs['positive'] + self.neutral = kwargs['neutral'] + self.negative = kwargs['negative'] + + +class SentimentResponse(msrest.serialization.Model): + """SentimentResponse. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Sentiment analysis per document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentSentiment] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentSentiment]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SentimentResponse, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class TextAnalyticsError(msrest.serialization.Model): + """TextAnalyticsError. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. Possible values include: "InvalidRequest", + "InvalidArgument", "InternalServerError", "ServiceUnavailable". + :type code: str or ~azure.ai.textanalytics.v3_1_preview_2.models.ErrorCodeValue + :param message: Required. Error message. + :type message: str + :param target: Error target. + :type target: str + :param innererror: Inner error contains more specific information. + :type innererror: ~azure.ai.textanalytics.v3_1_preview_2.models.InnerError + :param details: Details about specific errors that led to this reported error. + :type details: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsError] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'details': {'key': 'details', 'type': '[TextAnalyticsError]'}, + } + + def __init__( + self, + **kwargs + ): + super(TextAnalyticsError, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.target = kwargs.get('target', None) + self.innererror = kwargs.get('innererror', None) + self.details = kwargs.get('details', None) + + +class TextAnalyticsWarning(msrest.serialization.Model): + """TextAnalyticsWarning. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :type code: str or ~azure.ai.textanalytics.v3_1_preview_2.models.WarningCodeValue + :param message: Required. Warning message. + :type message: str + :param target_ref: A JSON pointer reference indicating the target object. + :type target_ref: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target_ref': {'key': 'targetRef', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TextAnalyticsWarning, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.target_ref = kwargs.get('target_ref', None) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_models_py3.py new file mode 100644 index 0000000000000..11130a54922aa --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_models_py3.py @@ -0,0 +1,1483 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._text_analytics_client_enums import * + + +class AspectConfidenceScoreLabel(msrest.serialization.Model): + """Represents the confidence scores across all sentiment classes: positive, neutral, negative. + + All required parameters must be populated in order to send to Azure. + + :param positive: Required. + :type positive: float + :param negative: Required. + :type negative: float + """ + + _validation = { + 'positive': {'required': True}, + 'negative': {'required': True}, + } + + _attribute_map = { + 'positive': {'key': 'positive', 'type': 'float'}, + 'negative': {'key': 'negative', 'type': 'float'}, + } + + def __init__( + self, + *, + positive: float, + negative: float, + **kwargs + ): + super(AspectConfidenceScoreLabel, self).__init__(**kwargs) + self.positive = positive + self.negative = negative + + +class AspectRelation(msrest.serialization.Model): + """AspectRelation. + + All required parameters must be populated in order to send to Azure. + + :param relation_type: Required. The type related to the aspect. Possible values include: + "opinion", "aspect". + :type relation_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.AspectRelationType + :param ref: Required. The JSON pointer indicating the linked object. + :type ref: str + """ + + _validation = { + 'relation_type': {'required': True}, + 'ref': {'required': True}, + } + + _attribute_map = { + 'relation_type': {'key': 'relationType', 'type': 'str'}, + 'ref': {'key': 'ref', 'type': 'str'}, + } + + def __init__( + self, + *, + relation_type: Union[str, "AspectRelationType"], + ref: str, + **kwargs + ): + super(AspectRelation, self).__init__(**kwargs) + self.relation_type = relation_type + self.ref = ref + + +class DetectedLanguage(msrest.serialization.Model): + """DetectedLanguage. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Long name of a detected language (e.g. English, French). + :type name: str + :param iso6391_name: Required. A two letter representation of the detected language according + to the ISO 639-1 standard (e.g. en, fr). + :type iso6391_name: str + :param confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :type confidence_score: float + """ + + _validation = { + 'name': {'required': True}, + 'iso6391_name': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'iso6391_name': {'key': 'iso6391Name', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + *, + name: str, + iso6391_name: str, + confidence_score: float, + **kwargs + ): + super(DetectedLanguage, self).__init__(**kwargs) + self.name = name + self.iso6391_name = iso6391_name + self.confidence_score = confidence_score + + +class DocumentEntities(msrest.serialization.Model): + """DocumentEntities. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param entities: Required. Recognized entities in the document. + :type entities: list[~azure.ai.textanalytics.v3_1_preview_2.models.Entity] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[Entity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + entities: List["Entity"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + super(DocumentEntities, self).__init__(**kwargs) + self.id = id + self.entities = entities + self.warnings = warnings + self.statistics = statistics + + +class DocumentError(msrest.serialization.Model): + """DocumentError. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Document Id. + :type id: str + :param error: Required. Document Error. + :type error: ~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsError + """ + + _validation = { + 'id': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + *, + id: str, + error: "TextAnalyticsError", + **kwargs + ): + super(DocumentError, self).__init__(**kwargs) + self.id = id + self.error = error + + +class DocumentKeyPhrases(msrest.serialization.Model): + """DocumentKeyPhrases. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :type key_phrases: list[str] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'key_phrases': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'key_phrases': {'key': 'keyPhrases', 'type': '[str]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + key_phrases: List[str], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + super(DocumentKeyPhrases, self).__init__(**kwargs) + self.id = id + self.key_phrases = key_phrases + self.warnings = warnings + self.statistics = statistics + + +class DocumentLanguage(msrest.serialization.Model): + """DocumentLanguage. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param detected_language: Required. Detected Language. + :type detected_language: ~azure.ai.textanalytics.v3_1_preview_2.models.DetectedLanguage + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'detected_language': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'detected_language': {'key': 'detectedLanguage', 'type': 'DetectedLanguage'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + detected_language: "DetectedLanguage", + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + super(DocumentLanguage, self).__init__(**kwargs) + self.id = id + self.detected_language = detected_language + self.warnings = warnings + self.statistics = statistics + + +class DocumentLinkedEntities(msrest.serialization.Model): + """DocumentLinkedEntities. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param entities: Required. Recognized well-known entities in the document. + :type entities: list[~azure.ai.textanalytics.v3_1_preview_2.models.LinkedEntity] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[LinkedEntity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + entities: List["LinkedEntity"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + super(DocumentLinkedEntities, self).__init__(**kwargs) + self.id = id + self.entities = entities + self.warnings = warnings + self.statistics = statistics + + +class DocumentSentiment(msrest.serialization.Model): + """DocumentSentiment. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentSentimentValue + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 + for each sentiment class. + :type confidence_scores: + ~azure.ai.textanalytics.v3_1_preview_2.models.SentimentConfidenceScorePerLabel + :param sentences: Required. Sentence level sentiment analysis. + :type sentences: list[~azure.ai.textanalytics.v3_1_preview_2.models.SentenceSentiment] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + """ + + _validation = { + 'id': {'required': True}, + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'sentences': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, + 'sentences': {'key': 'sentences', 'type': '[SentenceSentiment]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + } + + def __init__( + self, + *, + id: str, + sentiment: Union[str, "DocumentSentimentValue"], + confidence_scores: "SentimentConfidenceScorePerLabel", + sentences: List["SentenceSentiment"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + super(DocumentSentiment, self).__init__(**kwargs) + self.id = id + self.sentiment = sentiment + self.statistics = statistics + self.confidence_scores = confidence_scores + self.sentences = sentences + self.warnings = warnings + + +class DocumentStatistics(msrest.serialization.Model): + """if showStats=true was specified in the request this field will contain information about the document payload. + + All required parameters must be populated in order to send to Azure. + + :param characters_count: Required. Number of text elements recognized in the document. + :type characters_count: int + :param transactions_count: Required. Number of transactions for the document. + :type transactions_count: int + """ + + _validation = { + 'characters_count': {'required': True}, + 'transactions_count': {'required': True}, + } + + _attribute_map = { + 'characters_count': {'key': 'charactersCount', 'type': 'int'}, + 'transactions_count': {'key': 'transactionsCount', 'type': 'int'}, + } + + def __init__( + self, + *, + characters_count: int, + transactions_count: int, + **kwargs + ): + super(DocumentStatistics, self).__init__(**kwargs) + self.characters_count = characters_count + self.transactions_count = transactions_count + + +class EntitiesResult(msrest.serialization.Model): + """EntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentEntities] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentEntities"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(EntitiesResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class Entity(msrest.serialization.Model): + """Entity. + + All required parameters must be populated in order to send to Azure. + + :param text: Required. Entity text as appears in the request. + :type text: str + :param category: Required. Entity type, such as Person/Location/Org/SSN etc. + :type category: str + :param subcategory: Entity sub type, such as Age/Year/TimeRange etc. + :type subcategory: str + :param offset: Required. Start position for the entity text. + :type offset: int + :param length: Required. Length for the entity text. + :type length: int + :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :type confidence_score: float + """ + + _validation = { + 'text': {'required': True}, + 'category': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'subcategory': {'key': 'subcategory', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + *, + text: str, + category: str, + offset: int, + length: int, + confidence_score: float, + subcategory: Optional[str] = None, + **kwargs + ): + super(Entity, self).__init__(**kwargs) + self.text = text + self.category = category + self.subcategory = subcategory + self.offset = offset + self.length = length + self.confidence_score = confidence_score + + +class EntityLinkingResult(msrest.serialization.Model): + """EntityLinkingResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentLinkedEntities] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentLinkedEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentLinkedEntities"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(EntityLinkingResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Document Error. + :type error: ~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + *, + error: "TextAnalyticsError", + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class InnerError(msrest.serialization.Model): + """InnerError. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". + :type code: str or ~azure.ai.textanalytics.v3_1_preview_2.models.InnerErrorCodeValue + :param message: Required. Error message. + :type message: str + :param details: Error details. + :type details: dict[str, str] + :param target: Error target. + :type target: str + :param innererror: Inner error contains more specific information. + :type innererror: ~azure.ai.textanalytics.v3_1_preview_2.models.InnerError + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '{str}'}, + 'target': {'key': 'target', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + } + + def __init__( + self, + *, + code: Union[str, "InnerErrorCodeValue"], + message: str, + details: Optional[Dict[str, str]] = None, + target: Optional[str] = None, + innererror: Optional["InnerError"] = None, + **kwargs + ): + super(InnerError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.target = target + self.innererror = innererror + + +class KeyPhraseResult(msrest.serialization.Model): + """KeyPhraseResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentKeyPhrases] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentKeyPhrases]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentKeyPhrases"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(KeyPhraseResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class LanguageBatchInput(msrest.serialization.Model): + """LanguageBatchInput. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.LanguageInput] + """ + + _validation = { + 'documents': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[LanguageInput]'}, + } + + def __init__( + self, + *, + documents: List["LanguageInput"], + **kwargs + ): + super(LanguageBatchInput, self).__init__(**kwargs) + self.documents = documents + + +class LanguageInput(msrest.serialization.Model): + """LanguageInput. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param text: Required. + :type text: str + :param country_hint: + :type country_hint: str + """ + + _validation = { + 'id': {'required': True}, + 'text': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'country_hint': {'key': 'countryHint', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + text: str, + country_hint: Optional[str] = None, + **kwargs + ): + super(LanguageInput, self).__init__(**kwargs) + self.id = id + self.text = text + self.country_hint = country_hint + + +class LanguageResult(msrest.serialization.Model): + """LanguageResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentLanguage] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentLanguage]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentLanguage"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(LanguageResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class LinkedEntity(msrest.serialization.Model): + """LinkedEntity. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Entity Linking formal name. + :type name: str + :param matches: Required. List of instances this entity appears in the text. + :type matches: list[~azure.ai.textanalytics.v3_1_preview_2.models.Match] + :param language: Required. Language used in the data source. + :type language: str + :param id: Unique identifier of the recognized entity from the data source. + :type id: str + :param url: Required. URL for the entity's page from the data source. + :type url: str + :param data_source: Required. Data source used to extract entity linking, such as Wiki/Bing + etc. + :type data_source: str + :param bing_id: Bing unique identifier of the recognized entity. Use in conjunction with the + Bing Entity Search API to fetch additional relevant information. + :type bing_id: str + """ + + _validation = { + 'name': {'required': True}, + 'matches': {'required': True}, + 'language': {'required': True}, + 'url': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'matches': {'key': 'matches', 'type': '[Match]'}, + 'language': {'key': 'language', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'bing_id': {'key': 'bingId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + matches: List["Match"], + language: str, + url: str, + data_source: str, + id: Optional[str] = None, + bing_id: Optional[str] = None, + **kwargs + ): + super(LinkedEntity, self).__init__(**kwargs) + self.name = name + self.matches = matches + self.language = language + self.id = id + self.url = url + self.data_source = data_source + self.bing_id = bing_id + + +class Match(msrest.serialization.Model): + """Match. + + All required parameters must be populated in order to send to Azure. + + :param confidence_score: Required. If a well-known item is recognized, a decimal number + denoting the confidence level between 0 and 1 will be returned. + :type confidence_score: float + :param text: Required. Entity text as appears in the request. + :type text: str + :param offset: Required. Start position for the entity match text. + :type offset: int + :param length: Required. Length for the entity match text. + :type length: int + """ + + _validation = { + 'confidence_score': {'required': True}, + 'text': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'text': {'key': 'text', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + } + + def __init__( + self, + *, + confidence_score: float, + text: str, + offset: int, + length: int, + **kwargs + ): + super(Match, self).__init__(**kwargs) + self.confidence_score = confidence_score + self.text = text + self.offset = offset + self.length = length + + +class MultiLanguageBatchInput(msrest.serialization.Model): + """Contains a set of input documents to be analyzed by the service. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + """ + + _validation = { + 'documents': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[MultiLanguageInput]'}, + } + + def __init__( + self, + *, + documents: List["MultiLanguageInput"], + **kwargs + ): + super(MultiLanguageBatchInput, self).__init__(**kwargs) + self.documents = documents + + +class MultiLanguageInput(msrest.serialization.Model): + """Contains an input document to be analyzed by the service. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A unique, non-empty document identifier. + :type id: str + :param text: Required. The input text to process. + :type text: str + :param language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :type language: str + """ + + _validation = { + 'id': {'required': True}, + 'text': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + text: str, + language: Optional[str] = None, + **kwargs + ): + super(MultiLanguageInput, self).__init__(**kwargs) + self.id = id + self.text = text + self.language = language + + +class PiiDocumentEntities(msrest.serialization.Model): + """PiiDocumentEntities. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param entities: Required. Recognized entities in the document. + :type entities: list[~azure.ai.textanalytics.v3_1_preview_2.models.Entity] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.DocumentStatistics + :param redacted_text: Returns redacted text. + :type redacted_text: str + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[Entity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + 'redacted_text': {'key': 'redactedText', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + entities: List["Entity"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + redacted_text: Optional[str] = None, + **kwargs + ): + super(PiiDocumentEntities, self).__init__(**kwargs) + self.id = id + self.entities = entities + self.warnings = warnings + self.statistics = statistics + self.redacted_text = redacted_text + + +class PiiEntitiesResult(msrest.serialization.Model): + """PiiEntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.PiiDocumentEntities] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[PiiDocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["PiiDocumentEntities"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(PiiEntitiesResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class RequestStatistics(msrest.serialization.Model): + """if showStats=true was specified in the request this field will contain information about the request payload. + + All required parameters must be populated in order to send to Azure. + + :param documents_count: Required. Number of documents submitted in the request. + :type documents_count: int + :param valid_documents_count: Required. Number of valid documents. This excludes empty, over- + size limit or non-supported languages documents. + :type valid_documents_count: int + :param erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :type erroneous_documents_count: int + :param transactions_count: Required. Number of transactions for the request. + :type transactions_count: long + """ + + _validation = { + 'documents_count': {'required': True}, + 'valid_documents_count': {'required': True}, + 'erroneous_documents_count': {'required': True}, + 'transactions_count': {'required': True}, + } + + _attribute_map = { + 'documents_count': {'key': 'documentsCount', 'type': 'int'}, + 'valid_documents_count': {'key': 'validDocumentsCount', 'type': 'int'}, + 'erroneous_documents_count': {'key': 'erroneousDocumentsCount', 'type': 'int'}, + 'transactions_count': {'key': 'transactionsCount', 'type': 'long'}, + } + + def __init__( + self, + *, + documents_count: int, + valid_documents_count: int, + erroneous_documents_count: int, + transactions_count: int, + **kwargs + ): + super(RequestStatistics, self).__init__(**kwargs) + self.documents_count = documents_count + self.valid_documents_count = valid_documents_count + self.erroneous_documents_count = erroneous_documents_count + self.transactions_count = transactions_count + + +class SentenceAspect(msrest.serialization.Model): + """SentenceAspect. + + All required parameters must be populated in order to send to Azure. + + :param sentiment: Required. Aspect level sentiment for the aspect in the sentence. Possible + values include: "positive", "mixed", "negative". + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_2.models.TokenSentimentValue + :param confidence_scores: Required. Aspect level sentiment confidence scores for the aspect in + the sentence. + :type confidence_scores: + ~azure.ai.textanalytics.v3_1_preview_2.models.AspectConfidenceScoreLabel + :param offset: Required. The aspect offset from the start of the sentence. + :type offset: int + :param length: Required. The length of the aspect. + :type length: int + :param text: Required. The aspect text detected. + :type text: str + :param relations: Required. The array of either opinion or aspect object which is related to + the aspect. + :type relations: list[~azure.ai.textanalytics.v3_1_preview_2.models.AspectRelation] + """ + + _validation = { + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'text': {'required': True}, + 'relations': {'required': True}, + } + + _attribute_map = { + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'AspectConfidenceScoreLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'relations': {'key': 'relations', 'type': '[AspectRelation]'}, + } + + def __init__( + self, + *, + sentiment: Union[str, "TokenSentimentValue"], + confidence_scores: "AspectConfidenceScoreLabel", + offset: int, + length: int, + text: str, + relations: List["AspectRelation"], + **kwargs + ): + super(SentenceAspect, self).__init__(**kwargs) + self.sentiment = sentiment + self.confidence_scores = confidence_scores + self.offset = offset + self.length = length + self.text = text + self.relations = relations + + +class SentenceOpinion(msrest.serialization.Model): + """SentenceOpinion. + + All required parameters must be populated in order to send to Azure. + + :param sentiment: Required. Opinion level sentiment for the aspect in the sentence. Possible + values include: "positive", "mixed", "negative". + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_2.models.TokenSentimentValue + :param confidence_scores: Required. Opinion level sentiment confidence scores for the aspect in + the sentence. + :type confidence_scores: + ~azure.ai.textanalytics.v3_1_preview_2.models.AspectConfidenceScoreLabel + :param offset: Required. The opinion offset from the start of the sentence. + :type offset: int + :param length: Required. The length of the opinion. + :type length: int + :param text: Required. The aspect text detected. + :type text: str + :param is_negated: Required. The indicator representing if the opinion is negated. + :type is_negated: bool + """ + + _validation = { + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'text': {'required': True}, + 'is_negated': {'required': True}, + } + + _attribute_map = { + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'AspectConfidenceScoreLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'is_negated': {'key': 'isNegated', 'type': 'bool'}, + } + + def __init__( + self, + *, + sentiment: Union[str, "TokenSentimentValue"], + confidence_scores: "AspectConfidenceScoreLabel", + offset: int, + length: int, + text: str, + is_negated: bool, + **kwargs + ): + super(SentenceOpinion, self).__init__(**kwargs) + self.sentiment = sentiment + self.confidence_scores = confidence_scores + self.offset = offset + self.length = length + self.text = text + self.is_negated = is_negated + + +class SentenceSentiment(msrest.serialization.Model): + """SentenceSentiment. + + All required parameters must be populated in order to send to Azure. + + :param text: Required. The sentence text. + :type text: str + :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: + "positive", "neutral", "negative". + :type sentiment: str or ~azure.ai.textanalytics.v3_1_preview_2.models.SentenceSentimentValue + :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :type confidence_scores: + ~azure.ai.textanalytics.v3_1_preview_2.models.SentimentConfidenceScorePerLabel + :param offset: Required. The sentence offset from the start of the document. + :type offset: int + :param length: Required. The length of the sentence. + :type length: int + :param aspects: The array of aspect object for the sentence. + :type aspects: list[~azure.ai.textanalytics.v3_1_preview_2.models.SentenceAspect] + :param opinions: The array of opinion object for the sentence. + :type opinions: list[~azure.ai.textanalytics.v3_1_preview_2.models.SentenceOpinion] + """ + + _validation = { + 'text': {'required': True}, + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'aspects': {'key': 'aspects', 'type': '[SentenceAspect]'}, + 'opinions': {'key': 'opinions', 'type': '[SentenceOpinion]'}, + } + + def __init__( + self, + *, + text: str, + sentiment: Union[str, "SentenceSentimentValue"], + confidence_scores: "SentimentConfidenceScorePerLabel", + offset: int, + length: int, + aspects: Optional[List["SentenceAspect"]] = None, + opinions: Optional[List["SentenceOpinion"]] = None, + **kwargs + ): + super(SentenceSentiment, self).__init__(**kwargs) + self.text = text + self.sentiment = sentiment + self.confidence_scores = confidence_scores + self.offset = offset + self.length = length + self.aspects = aspects + self.opinions = opinions + + +class SentimentConfidenceScorePerLabel(msrest.serialization.Model): + """Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. + + All required parameters must be populated in order to send to Azure. + + :param positive: Required. + :type positive: float + :param neutral: Required. + :type neutral: float + :param negative: Required. + :type negative: float + """ + + _validation = { + 'positive': {'required': True}, + 'neutral': {'required': True}, + 'negative': {'required': True}, + } + + _attribute_map = { + 'positive': {'key': 'positive', 'type': 'float'}, + 'neutral': {'key': 'neutral', 'type': 'float'}, + 'negative': {'key': 'negative', 'type': 'float'}, + } + + def __init__( + self, + *, + positive: float, + neutral: float, + negative: float, + **kwargs + ): + super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) + self.positive = positive + self.neutral = neutral + self.negative = negative + + +class SentimentResponse(msrest.serialization.Model): + """SentimentResponse. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Sentiment analysis per document. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentSentiment] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_1_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_1_preview_2.models.RequestStatistics + :param model_version: Required. This field indicates which model is used for scoring. + :type model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentSentiment]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentSentiment"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(SentimentResponse, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class TextAnalyticsError(msrest.serialization.Model): + """TextAnalyticsError. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. Possible values include: "InvalidRequest", + "InvalidArgument", "InternalServerError", "ServiceUnavailable". + :type code: str or ~azure.ai.textanalytics.v3_1_preview_2.models.ErrorCodeValue + :param message: Required. Error message. + :type message: str + :param target: Error target. + :type target: str + :param innererror: Inner error contains more specific information. + :type innererror: ~azure.ai.textanalytics.v3_1_preview_2.models.InnerError + :param details: Details about specific errors that led to this reported error. + :type details: list[~azure.ai.textanalytics.v3_1_preview_2.models.TextAnalyticsError] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'details': {'key': 'details', 'type': '[TextAnalyticsError]'}, + } + + def __init__( + self, + *, + code: Union[str, "ErrorCodeValue"], + message: str, + target: Optional[str] = None, + innererror: Optional["InnerError"] = None, + details: Optional[List["TextAnalyticsError"]] = None, + **kwargs + ): + super(TextAnalyticsError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.innererror = innererror + self.details = details + + +class TextAnalyticsWarning(msrest.serialization.Model): + """TextAnalyticsWarning. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :type code: str or ~azure.ai.textanalytics.v3_1_preview_2.models.WarningCodeValue + :param message: Required. Warning message. + :type message: str + :param target_ref: A JSON pointer reference indicating the target object. + :type target_ref: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target_ref': {'key': 'targetRef', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Union[str, "WarningCodeValue"], + message: str, + target_ref: Optional[str] = None, + **kwargs + ): + super(TextAnalyticsWarning, self).__init__(**kwargs) + self.code = code + self.message = message + self.target_ref = target_ref diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_text_analytics_client_enums.py new file mode 100644 index 0000000000000..840d2dbc7f596 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/models/_text_analytics_client_enums.py @@ -0,0 +1,95 @@ +# 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. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AspectRelationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type related to the aspect. + """ + + OPINION = "opinion" + ASPECT = "aspect" + +class DocumentSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). + """ + + POSITIVE = "positive" + NEUTRAL = "neutral" + NEGATIVE = "negative" + MIXED = "mixed" + +class ErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Error code. + """ + + INVALID_REQUEST = "InvalidRequest" + INVALID_ARGUMENT = "InvalidArgument" + INTERNAL_SERVER_ERROR = "InternalServerError" + SERVICE_UNAVAILABLE = "ServiceUnavailable" + +class InnerErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Error code. + """ + + INVALID_PARAMETER_VALUE = "InvalidParameterValue" + INVALID_REQUEST_BODY_FORMAT = "InvalidRequestBodyFormat" + EMPTY_REQUEST = "EmptyRequest" + MISSING_INPUT_RECORDS = "MissingInputRecords" + INVALID_DOCUMENT = "InvalidDocument" + MODEL_VERSION_INCORRECT = "ModelVersionIncorrect" + INVALID_DOCUMENT_BATCH = "InvalidDocumentBatch" + UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" + INVALID_COUNTRY_HINT = "InvalidCountryHint" + +class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The predicted Sentiment for the sentence. + """ + + POSITIVE = "positive" + NEUTRAL = "neutral" + NEGATIVE = "negative" + +class StringIndexType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + TEXT_ELEMENTS_V8 = "TextElements_v8" #: Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. + UNICODE_CODE_POINT = "UnicodeCodePoint" #: Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. + UTF16_CODE_UNIT = "Utf16CodeUnit" #: Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. + +class TokenSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Aspect level sentiment for the aspect in the sentence. + """ + + POSITIVE = "positive" + MIXED = "mixed" + NEGATIVE = "negative" + +class WarningCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Error code. + """ + + LONG_WORDS_IN_DOCUMENT = "LongWordsInDocument" + DOCUMENT_TRUNCATED = "DocumentTruncated" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/operations/__init__.py new file mode 100644 index 0000000000000..4384511c03467 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/operations/__init__.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +from ._text_analytics_client_operations import TextAnalyticsClientOperationsMixin + +__all__ = [ + 'TextAnalyticsClientOperationsMixin', +] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/operations/_text_analytics_client_operations.py new file mode 100644 index 0000000000000..2a63ac9ecb1a7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/operations/_text_analytics_client_operations.py @@ -0,0 +1,511 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class TextAnalyticsClientOperationsMixin(object): + + def entities_recognition_general( + self, + documents, # type: List["models.MultiLanguageInput"] + model_version=None, # type: Optional[str] + show_stats=None, # type: Optional[bool] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] + **kwargs # type: Any + ): + # type: (...) -> "models.EntitiesResult" + """Named Entity Recognition. + + The API returns a list of general named entities in a given document. For the list of supported + entity types, check :code:`Supported Entity Types in Text + Analytics API`. See the :code:`Supported languages in Text + Analytics API` for the list of enabled languages. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EntitiesResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.EntitiesResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.EntitiesResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.entities_recognition_general.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('EntitiesResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + entities_recognition_general.metadata = {'url': '/entities/recognition/general'} # type: ignore + + def entities_recognition_pii( + self, + documents, # type: List["models.MultiLanguageInput"] + model_version=None, # type: Optional[str] + show_stats=None, # type: Optional[bool] + domain=None, # type: Optional[str] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] + **kwargs # type: Any + ): + # type: (...) -> "models.PiiEntitiesResult" + """Entities containing personal information. + + The API returns a list of entities with personal information (\"SSN\", \"Bank Account\" etc) in + the document. For the list of supported entity types, check :code:`Supported Entity Types in Text Analytics API`. See the + :code:`Supported languages in Text Analytics API` for the + list of enabled languages. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :param domain: (Optional) if set to 'PHI', response will contain only PHI entities. + :type domain: str + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PiiEntitiesResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.PiiEntitiesResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.PiiEntitiesResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.entities_recognition_pii.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if domain is not None: + query_parameters['domain'] = self._serialize.query("domain", domain, 'str') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('PiiEntitiesResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + entities_recognition_pii.metadata = {'url': '/entities/recognition/pii'} # type: ignore + + def entities_linking( + self, + documents, # type: List["models.MultiLanguageInput"] + model_version=None, # type: Optional[str] + show_stats=None, # type: Optional[bool] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] + **kwargs # type: Any + ): + # type: (...) -> "models.EntityLinkingResult" + """Linked entities from a well-known knowledge base. + + The API returns a list of recognized entities with links to a well-known knowledge base. See + the :code:`Supported languages in Text Analytics API` for + the list of enabled languages. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EntityLinkingResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.EntityLinkingResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.EntityLinkingResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.entities_linking.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('EntityLinkingResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + entities_linking.metadata = {'url': '/entities/linking'} # type: ignore + + def key_phrases( + self, + documents, # type: List["models.MultiLanguageInput"] + model_version=None, # type: Optional[str] + show_stats=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> "models.KeyPhraseResult" + """Key Phrases. + + The API returns a list of strings denoting the key phrases in the input text. See the :code:`Supported languages in Text Analytics API` for the list of + enabled languages. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyPhraseResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.KeyPhraseResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.KeyPhraseResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.key_phrases.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('KeyPhraseResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + key_phrases.metadata = {'url': '/keyPhrases'} # type: ignore + + def languages( + self, + documents, # type: List["models.LanguageInput"] + model_version=None, # type: Optional[str] + show_stats=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> "models.LanguageResult" + """Detect Language. + + The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. See the :code:`Supported languages in Text Analytics API` for the list of + enabled languages. + + :param documents: + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.LanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LanguageResult, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.LanguageResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.LanguageResult"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.LanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.languages.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'LanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('LanguageResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + languages.metadata = {'url': '/languages'} # type: ignore + + def sentiment( + self, + documents, # type: List["models.MultiLanguageInput"] + model_version=None, # type: Optional[str] + show_stats=None, # type: Optional[bool] + opinion_mining=None, # type: Optional[bool] + string_index_type="TextElements_v8", # type: Optional[Union[str, "models.StringIndexType"]] + **kwargs # type: Any + ): + # type: (...) -> "models.SentimentResponse" + """Sentiment. + + The API returns a detailed sentiment analysis for the input text. The analysis is done in + multiple levels of granularity, start from the a document level, down to sentence and key terms + (aspects) and opinions. + + :param documents: The set of documents to process as part of this batch. + :type documents: list[~azure.ai.textanalytics.v3_1_preview_2.models.MultiLanguageInput] + :param model_version: (Optional) This value indicates which model will be used for scoring. If + a model-version is not specified, the API should default to the latest, non-preview version. + :type model_version: str + :param show_stats: (Optional) if set to true, response will contain request and document level + statistics. + :type show_stats: bool + :param opinion_mining: (Optional) if set to true, response will contain input and document + level statistics including aspect-based sentiment analysis results. + :type opinion_mining: bool + :param string_index_type: (Optional) Specifies the method used to interpret string offsets. + Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information + see https://aka.ms/text-analytics-offsets. + :type string_index_type: str or ~azure.ai.textanalytics.v3_1_preview_2.models.StringIndexType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SentimentResponse, or the result of cls(response) + :rtype: ~azure.ai.textanalytics.v3_1_preview_2.models.SentimentResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SentimentResponse"] + error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop('error_map', {})) + + _input = models.MultiLanguageBatchInput(documents=documents) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json, text/json" + + # Construct URL + url = self.sentiment.metadata['url'] # type: ignore + path_format_arguments = { + 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') + if opinion_mining is not None: + query_parameters['opinionMining'] = self._serialize.query("opinion_mining", opinion_mining, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('SentimentResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + sentiment.metadata = {'url': '/sentiment'} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/py.typed b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1_preview_2/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index 602a8ecc4b8e5..a7e9b657535cc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -1,14 +1,17 @@ -# coding=utf-8 +# coding=utf-8 pylint: disable=too-many-lines # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import re -from ._generated.v3_0.models._models import ( +from enum import Enum +from ._generated.models import ( LanguageInput, - MultiLanguageInput + MultiLanguageInput, ) +from ._generated.v3_0 import models as _v3_0_models + def _get_indices(relation): return [int(s) for s in re.findall(r"\d+", relation)] @@ -62,6 +65,10 @@ def get(self, key, default=None): return self.__dict__[key] return default +class PiiEntityDomainType(str, Enum): + """The different domains of PII entities that users can filter by""" + PROTECTED_HEALTH_INFORMATION = "PHI" # See https://aka.ms/tanerpii for more information. + class DetectedLanguage(DictMixin): """DetectedLanguage contains the predicted language found in text, @@ -139,6 +146,8 @@ class RecognizePiiEntitiesResult(DictMixin): :ivar entities: Recognized PII entities in the document. :vartype entities: list[~azure.ai.textanalytics.PiiEntity] + :ivar str redacted_text: Returns the text of the input document with all of the PII information + redacted out. Only returned for API versions v3.1-preview.2 and up. :ivar warnings: Warnings encountered while processing document. Results will still be returned if there are warnings, but they may not be fully accurate. :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] @@ -148,18 +157,28 @@ class RecognizePiiEntitiesResult(DictMixin): ~azure.ai.textanalytics.TextDocumentStatistics :ivar bool is_error: Boolean check for error item when iterating over list of results. Always False for an instance of a RecognizePiiEntitiesResult. + .. versionadded:: v3.1-preview.2 + The *redacted_text* parameter. """ def __init__(self, **kwargs): self.id = kwargs.get("id", None) self.entities = kwargs.get("entities", None) + self.redacted_text = kwargs.get("redacted_text", None) self.warnings = kwargs.get("warnings", []) self.statistics = kwargs.get("statistics", None) self.is_error = False def __repr__(self): - return "RecognizePiiEntitiesResult(id={}, entities={}, warnings={}, statistics={}, is_error={})" \ - .format(self.id, repr(self.entities), repr(self.warnings), repr(self.statistics), self.is_error)[:1024] + return "RecognizePiiEntitiesResult(id={}, entities={}, redacted_text={}, warnings={}, " \ + "statistics={}, is_error={})" .format( + self.id, + repr(self.entities), + self.redacted_text, + repr(self.warnings), + repr(self.statistics), + self.is_error + )[:1024] class DetectLanguageResult(DictMixin): @@ -207,10 +226,14 @@ class CategorizedEntity(DictMixin): :ivar subcategory: Entity subcategory, such as Age/Year/TimeRange etc :vartype subcategory: str :ivar int offset: The entity text offset from the start of the document. - :ivar int length: The length of the entity text. + Returned in unicode code points. Only returned for API versions v3.1-preview.1 and up. + :ivar int length: The length of the entity text. Returned + in unicode code points. Only returned for API versions v3.1-preview.1 and up. :ivar confidence_score: Confidence score between 0 and 1 of the extracted entity. :vartype confidence_score: float + .. versionadded:: v3.1-preview.1 + The *offset* and *length* properties. """ def __init__(self, **kwargs): @@ -223,12 +246,19 @@ def __init__(self, **kwargs): @classmethod def _from_generated(cls, entity): + offset = entity.offset + length = entity.length + if isinstance(entity, _v3_0_models.Entity): + # we do not return offset and length for v3.0 since + # the correct encoding was not introduced for v3.0 + offset = None + length = None return cls( text=entity.text, category=entity.category, subcategory=entity.subcategory, - offset=entity.offset, - length=entity.length, + offset=offset, + length=length, confidence_score=entity.confidence_score, ) @@ -253,7 +283,9 @@ class PiiEntity(DictMixin): :ivar str subcategory: Entity subcategory, such as Credit Card/EU Phone number/ABA Routing Numbers, etc. :ivar int offset: The PII entity text offset from the start of the document. - :ivar int length: The length of the PII entity text. + Returned in unicode code points. + :ivar int length: The length of the PII entity text. Returned + in unicode code points. :ivar float confidence_score: Confidence score between 0 and 1 of the extracted entity. """ @@ -598,6 +630,11 @@ class LinkedEntity(DictMixin): :ivar data_source: Data source used to extract entity linking, such as Wiki/Bing etc. :vartype data_source: str + :ivar str bing_entity_search_api_id: Bing Entity Search unique identifier of the recognized entity. + Use in conjunction with the Bing Entity Search SDK to fetch additional relevant information. + Only available for API version v3.1-preview.2 and up. + .. versionadded:: v3.1-preview.2 + The *bing_entity_search_api_id* property. """ def __init__(self, **kwargs): @@ -607,9 +644,11 @@ def __init__(self, **kwargs): self.data_source_entity_id = kwargs.get("data_source_entity_id", None) self.url = kwargs.get("url", None) self.data_source = kwargs.get("data_source", None) + self.bing_entity_search_api_id = kwargs.get("bing_entity_search_api_id", None) @classmethod def _from_generated(cls, entity): + bing_entity_search_api_id = entity.bing_id if hasattr(entity, "bing_id") else None return cls( name=entity.name, matches=[LinkedEntityMatch._from_generated(e) for e in entity.matches], # pylint: disable=protected-access @@ -617,12 +656,20 @@ def _from_generated(cls, entity): data_source_entity_id=entity.id, url=entity.url, data_source=entity.data_source, + bing_entity_search_api_id=bing_entity_search_api_id, ) def __repr__(self): return "LinkedEntity(name={}, matches={}, language={}, data_source_entity_id={}, url={}, " \ - "data_source={})".format(self.name, repr(self.matches), self.language, self.data_source_entity_id, - self.url, self.data_source)[:1024] + "data_source={}, bing_entity_search_api_id={})".format( + self.name, + repr(self.matches), + self.language, + self.data_source_entity_id, + self.url, + self.data_source, + self.bing_entity_search_api_id, + )[:1024] class LinkedEntityMatch(DictMixin): @@ -636,8 +683,12 @@ class LinkedEntityMatch(DictMixin): :vartype confidence_score: float :ivar text: Entity text as appears in the request. :ivar int offset: The linked entity match text offset from the start of the document. - :ivar int length: The length of the linked entity match text. + Returned in unicode code points. Only returned for API versions v3.1-preview.1 and up. + :ivar int length: The length of the linked entity match text. Returned + in unicode code points. Only returned for API versions v3.1-preview.1 and up. :vartype text: str + .. versionadded:: v3.1-preview.1 + The *offset* and *length* properties. """ def __init__(self, **kwargs): @@ -648,11 +699,18 @@ def __init__(self, **kwargs): @classmethod def _from_generated(cls, match): + offset = match.offset + length = match.length + if isinstance(match, _v3_0_models.Match): + # we do not return offset and length for v3.0 since + # the correct encoding was not introduced for v3.0 + offset = None + length = None return cls( confidence_score=match.confidence_score, text=match.text, - offset=match.offset, - length=match.length + offset=offset, + length=length ) def __repr__(self): @@ -738,14 +796,19 @@ class SentenceSentiment(DictMixin): and 1 for the sentence for all labels. :vartype confidence_scores: ~azure.ai.textanalytics.SentimentConfidenceScores - :ivar int offset: The sentence offset from the start of the document. - :ivar int length: The length of the sentence. + :ivar int offset: The sentence offset from the start of the document. Returned + in unicode code points. Only returned for API versions v3.1-preview.1 and up. + :ivar int length: The length of the sentence. Returned + in unicode code points. Only returned for API versions v3.1-preview.1 and up. :ivar mined_opinions: The list of opinions mined from this sentence. For example in "The food is good, but the service is bad", we would mind these two opinions "food is good", "service is bad". Only returned - if `show_opinion_mining` is set to True in the call to `analyze_sentiment`. + if `show_opinion_mining` is set to True in the call to `analyze_sentiment` and + api version is v3.1-preview.1 and up. :vartype mined_opinions: list[~azure.ai.textanalytics.MinedOpinion] + .. versionadded:: v3.1-preview.1 + The *offset*, *length*, and *mined_opinions* properties. """ def __init__(self, **kwargs): @@ -758,6 +821,13 @@ def __init__(self, **kwargs): @classmethod def _from_generated(cls, sentence, results): + offset = sentence.offset + length = sentence.length + if isinstance(sentence, _v3_0_models.SentenceSentiment): + # we do not return offset and length for v3.0 since + # the correct encoding was not introduced for v3.0 + offset = None + length = None if hasattr(sentence, "aspects"): mined_opinions = ( [MinedOpinion._from_generated(aspect, results) for aspect in sentence.aspects] # pylint: disable=protected-access @@ -769,8 +839,8 @@ def _from_generated(cls, sentence, results): text=sentence.text, sentiment=sentence.sentiment, confidence_scores=SentimentConfidenceScores._from_generated(sentence.confidence_scores), # pylint: disable=protected-access - offset=sentence.offset, - length=sentence.length, + offset=offset, + length=length, mined_opinions=mined_opinions ) @@ -847,8 +917,10 @@ class AspectSentiment(DictMixin): for 'neutral' will always be 0 :vartype confidence_scores: ~azure.ai.textanalytics.SentimentConfidenceScores - :ivar int offset: The aspect offset from the start of the document. - :ivar int length: The length of the aspect. + :ivar int offset: The aspect offset from the start of the document. Returned + in unicode code points. + :ivar int length: The length of the aspect. Returned + in unicode code points. """ def __init__(self, **kwargs): @@ -892,8 +964,10 @@ class OpinionSentiment(DictMixin): for 'neutral' will always be 0 :vartype confidence_scores: ~azure.ai.textanalytics.SentimentConfidenceScores - :ivar int offset: The opinion offset from the start of the document. - :ivar int length: The length of the opinion. + :ivar int offset: The opinion offset from the start of the document. Returned + in unicode code points. + :ivar int length: The length of the opinion. Returned + in unicode code points. :ivar bool is_negated: Whether the opinion is negated. For example, in "The food is not good", the opinion "good" is negated. """ diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py index b07421d7847bb..559fbf17cc5f1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py @@ -134,6 +134,7 @@ def pii_entities_result(entity, results): # pylint: disable=unused-argument return RecognizePiiEntitiesResult( id=entity.id, entities=[PiiEntity._from_generated(e) for e in entity.entities], # pylint: disable=protected-access + redacted_text=entity.redacted_text if hasattr(entity, "redacted_text") else None, warnings=[TextAnalyticsWarning._from_generated(w) for w in entity.warnings], # pylint: disable=protected-access statistics=TextDocumentStatistics._from_generated(entity.statistics), # pylint: disable=protected-access ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py index 814a6531be015..7c68034c9de83 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py @@ -93,6 +93,7 @@ def __init__(self, endpoint, credential, **kwargs): ) self._default_language = kwargs.pop("default_language", "en") self._default_country_hint = kwargs.pop("default_country_hint", "US") + self._string_code_unit = None if kwargs.get("api_version") == "v3.0" else "UnicodeCodePoint" @distributed_trace def detect_language( # type: ignore @@ -213,6 +214,8 @@ def recognize_entities( # type: ignore docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) + if self._string_code_unit: + kwargs.update({"string_index_type": self._string_code_unit}) try: return self._client.entities_recognition_general( documents=docs, @@ -257,6 +260,10 @@ def recognize_pii_entities( # type: ignore be used for scoring, e.g. "latest", "2019-10-01". If a model-version is not specified, the API will default to the latest, non-preview version. :keyword bool show_stats: If set to true, response will contain document level statistics. + :keyword domain_filter: Filters the response entities to ones only included in the specified domain. + I.e., if set to 'PHI', will only return entities in the Protected Healthcare Information domain. + See https://aka.ms/tanerpii for more information. + :paramtype domain_filter: str or ~azure.ai.textanalytics.PiiEntityDomainType :return: The combined list of :class:`~azure.ai.textanalytics.RecognizePiiEntitiesResult` and :class:`~azure.ai.textanalytics.DocumentError` in the order the original documents were passed in. @@ -278,16 +285,20 @@ def recognize_pii_entities( # type: ignore docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) + domain_filter = kwargs.pop("domain_filter", None) + if self._string_code_unit: + kwargs.update({"string_index_type": self._string_code_unit}) try: return self._client.entities_recognition_pii( documents=docs, model_version=model_version, show_stats=show_stats, + domain=domain_filter, cls=kwargs.pop("cls", pii_entities_result), **kwargs ) - except AttributeError as error: - if "'TextAnalyticsClient' object has no attribute 'entities_recognition_pii'" in str(error): + except NotImplementedError as error: + if "APIVersion v3.0 is not available" in str(error): raise NotImplementedError( "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" ) @@ -350,6 +361,8 @@ def recognize_linked_entities( # type: ignore docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) + if self._string_code_unit: + kwargs.update({"string_index_type": self._string_code_unit}) try: return self._client.entities_linking( documents=docs, @@ -490,6 +503,8 @@ def analyze_sentiment( # type: ignore model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) show_opinion_mining = kwargs.pop("show_opinion_mining", None) + if self._string_code_unit: + kwargs.update({"string_index_type": self._string_code_unit}) if show_opinion_mining is not None: kwargs.update({"opinion_mining": show_opinion_mining}) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py index 715b122ebe535..40d5e79e323ae 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "5.0.1" +VERSION = "5.1.0b1" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py index 1e1450f669ce7..f7c6290665ba5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py @@ -98,6 +98,7 @@ def __init__( # type: ignore ) self._default_language = kwargs.pop("default_language", "en") self._default_country_hint = kwargs.pop("default_country_hint", "US") + self._string_code_unit = None if kwargs.get("api_version") == "v3.0" else "UnicodeCodePoint" @distributed_trace_async async def detect_language( # type: ignore @@ -216,6 +217,8 @@ async def recognize_entities( # type: ignore docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) + if self._string_code_unit: + kwargs.update({"string_index_type": self._string_code_unit}) try: return await self._client.entities_recognition_general( documents=docs, @@ -259,6 +262,10 @@ async def recognize_pii_entities( # type: ignore be used for scoring, e.g. "latest", "2019-10-01". If a model-version is not specified, the API will default to the latest, non-preview version. :keyword bool show_stats: If set to true, response will contain document level statistics. + :keyword domain_filter: Filters the response entities to ones only included in the specified domain. + I.e., if set to 'PHI', will only return entities in the Protected Healthcare Information domain. + See https://aka.ms/tanerpii for more information. + :paramtype domain_filter: str or ~azure.ai.textanalytics.PiiEntityDomainType :return: The combined list of :class:`~azure.ai.textanalytics.RecognizePiiEntitiesResult` and :class:`~azure.ai.textanalytics.DocumentError` in the order the original documents were passed in. @@ -280,16 +287,21 @@ async def recognize_pii_entities( # type: ignore docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) + domain_filter = kwargs.pop("domain_filter", None) + + if self._string_code_unit: + kwargs.update({"string_index_type": self._string_code_unit}) try: return await self._client.entities_recognition_pii( documents=docs, model_version=model_version, show_stats=show_stats, + domain=domain_filter, cls=kwargs.pop("cls", pii_entities_result), **kwargs ) - except AttributeError as error: - if "'TextAnalyticsClient' object has no attribute 'entities_recognition_pii'" in str(error): + except NotImplementedError as error: + if "APIVersion v3.0 is not available" in str(error): raise NotImplementedError( "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" ) @@ -351,6 +363,8 @@ async def recognize_linked_entities( # type: ignore docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) + if self._string_code_unit: + kwargs.update({"string_index_type": self._string_code_unit}) try: return await self._client.entities_linking( documents=docs, @@ -489,6 +503,8 @@ async def analyze_sentiment( # type: ignore model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) show_opinion_mining = kwargs.pop("show_opinion_mining", None) + if self._string_code_unit: + kwargs.update({"string_index_type": self._string_code_unit}) if show_opinion_mining is not None: kwargs.update({"opinion_mining": show_opinion_mining}) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py index 338432cb9530c..fc0811c6f37b5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py @@ -24,6 +24,57 @@ Set the environment variables with your own values before running the sample: 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key + +OUTPUT: + In this sample we will be combing through the reviews of a potential hotel to stay at: Hotel Foo. + I first found a handful of reviews for Hotel Foo. Let's see if I want to stay here. + + + Let's see how many positive and negative reviews of this hotel I have right now + ...We have 3 positive reviews and 2 negative reviews. + + Looks more positive than negative, but still pretty mixed, so I'm going to drill deeper into the opinions of individual aspects of this hotel + + In order to do that, I'm going to sort them based on whether these opinions are positive, mixed, or negative + + + Let's look at the 7 positive opinions users have expressed for aspects of this hotel + ...Reviewers have the following opinions for the overall positive 'concierge' aspect of the hotel + ......'positive' opinion 'nice' + ...Reviewers have the following opinions for the overall positive 'AC' aspect of the hotel + ......'positive' opinion 'good' + ......'positive' opinion 'quiet' + ...Reviewers have the following opinions for the overall positive 'breakfast' aspect of the hotel + ......'positive' opinion 'good' + ...Reviewers have the following opinions for the overall positive 'hotel' aspect of the hotel + ......'positive' opinion 'good' + ...Reviewers have the following opinions for the overall positive 'breakfast' aspect of the hotel + ......'positive' opinion 'nice' + ...Reviewers have the following opinions for the overall positive 'shuttle service' aspect of the hotel + ......'positive' opinion 'loved' + ...Reviewers have the following opinions for the overall positive 'view' aspect of the hotel + ......'positive' opinion 'great' + ......'positive' opinion 'unobstructed' + + + Now let's look at the 1 mixed opinions users have expressed for aspects of this hotel + ...Reviewers have the following opinions for the overall mixed 'rooms' aspect of the hotel + ......'positive' opinion 'beautiful' + ......'negative' opinion 'dirty' + + + Finally, let's see the 4 negative opinions users have expressed for aspects of this hotel + ...Reviewers have the following opinions for the overall negative 'food' aspect of the hotel + ......'negative' opinion 'unacceptable' + ...Reviewers have the following opinions for the overall negative 'service' aspect of the hotel + ......'negative' opinion 'unacceptable' + ...Reviewers have the following opinions for the overall negative 'elevator' aspect of the hotel + ......'negative' opinion 'broken' + ...Reviewers have the following opinions for the overall negative 'toilet' aspect of the hotel + ......'negative' opinion 'smelly' + + + Looking at the breakdown, even though there were more positive opinions of this hotel, I care the most about the food and the toilets in a hotel, so I will be staying elsewhere """ import os diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_detect_language_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_detect_language_async.py index fc99315c253ca..c47cc01c7c3da 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_detect_language_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_detect_language_async.py @@ -27,9 +27,6 @@ class DetectLanguageSampleAsync(object): - endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] - key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] - async def detect_language_async(self): # [START detect_language_async] from azure.core.credentials import AzureKeyCredential diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py index 1b2924134befa..3cd161b93b8ac 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py @@ -24,6 +24,57 @@ Set the environment variables with your own values before running the sample: 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key + +OUTPUT: + In this sample we will be combing through the reviews of a potential hotel to stay at: Hotel Foo. + I first found a handful of reviews for Hotel Foo. Let's see if I want to stay here. + + + Let's see how many positive and negative reviews of this hotel I have right now + ...We have 3 positive reviews and 2 negative reviews. + + Looks more positive than negative, but still pretty mixed, so I'm going to drill deeper into the opinions of individual aspects of this hotel + + In order to do that, I'm going to sort them based on whether these opinions are positive, mixed, or negative + + + Let's look at the 7 positive opinions users have expressed for aspects of this hotel + ...Reviewers have the following opinions for the overall positive 'concierge' aspect of the hotel + ......'positive' opinion 'nice' + ...Reviewers have the following opinions for the overall positive 'AC' aspect of the hotel + ......'positive' opinion 'good' + ......'positive' opinion 'quiet' + ...Reviewers have the following opinions for the overall positive 'breakfast' aspect of the hotel + ......'positive' opinion 'good' + ...Reviewers have the following opinions for the overall positive 'hotel' aspect of the hotel + ......'positive' opinion 'good' + ...Reviewers have the following opinions for the overall positive 'breakfast' aspect of the hotel + ......'positive' opinion 'nice' + ...Reviewers have the following opinions for the overall positive 'shuttle service' aspect of the hotel + ......'positive' opinion 'loved' + ...Reviewers have the following opinions for the overall positive 'view' aspect of the hotel + ......'positive' opinion 'great' + ......'positive' opinion 'unobstructed' + + + Now let's look at the 1 mixed opinions users have expressed for aspects of this hotel + ...Reviewers have the following opinions for the overall mixed 'rooms' aspect of the hotel + ......'positive' opinion 'beautiful' + ......'negative' opinion 'dirty' + + + Finally, let's see the 4 negative opinions users have expressed for aspects of this hotel + ...Reviewers have the following opinions for the overall negative 'food' aspect of the hotel + ......'negative' opinion 'unacceptable' + ...Reviewers have the following opinions for the overall negative 'service' aspect of the hotel + ......'negative' opinion 'unacceptable' + ...Reviewers have the following opinions for the overall negative 'elevator' aspect of the hotel + ......'negative' opinion 'broken' + ...Reviewers have the following opinions for the overall negative 'toilet' aspect of the hotel + ......'negative' opinion 'smelly' + + + Looking at the breakdown, even though there were more positive opinions of this hotel, I care the most about the food and the toilets in a hotel, so I will be staying elsewhere """ import os diff --git a/sdk/textanalytics/azure-ai-textanalytics/setup.py b/sdk/textanalytics/azure-ai-textanalytics/setup.py index 8eca54ff849d4..46f83113c5ddd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/setup.py +++ b/sdk/textanalytics/azure-ai-textanalytics/setup.py @@ -59,7 +59,7 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_dict.yaml index 4f57d94b35208..a70a42de12aba 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_dict.yaml @@ -7,7 +7,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":51,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -30,13 +30,13 @@ interactions: recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - ae5d92ce-b260-4d5b-b049-ca5685d10a6b + - 546ef146-2055-49be-945d-8b4d95870565 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '91' + - '84' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_text_document_input.yaml index 91a92e24fee01..9c89c42918035 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_text_document_input.yaml @@ -7,7 +7,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -30,13 +30,13 @@ interactions: recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 5866ad77-79e5-4d72-ac8a-0c238d7ac7bd + - ee67d363-828c-4a5b-92ee-4a943a9aa020 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '107' + - '95' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_credentials.yaml index 221740d916e8a..7ca065da90f9c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_credentials.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:56 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_model_version_error.yaml index 0eb032cb1367d..9331b76b5a8c8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_model_version_error.yaml @@ -4,7 +4,7 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2019-10-01,2020-04-01"}}}' headers: apim-request-id: - - d1b9044a-2cb3-42e1-b76a-d9b2954cacf1 + - 600cfe88-8c7b-4017-a50e-ef0c30a546a4 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit.yaml index 1939e946e79a8..77196ef1175c1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit.yaml @@ -748,7 +748,7 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - 445231d6-240b-40ae-97c6-07a9ff798851 + - e63eddb4-ac2c-4b1d-bfa8-ff78dc65076f content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit_error.yaml index 3210054faa258..d78e04aa30cbd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit_error.yaml @@ -713,7 +713,7 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - d7d79d04-f475-40ff-a5c1-4761cdac974a + - 22ce0f08-e152-4611-bf63-9cc9ae125568 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11' + - '12' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_client_passed_default_language_hint.yaml index 716d3aea0a58c..d46ce44ab9552 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_client_passed_default_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 34ec0818-4419-460d-ab51-f2849b662a9c + - f43fb317-26ff-4149-b5bc-d56d11c8854a content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '112' + - '102' status: code: 200 message: OK @@ -52,7 +52,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -62,9 +62,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -73,13 +73,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - abff6a6e-dbc7-474f-ae86-a102c0dfb090 + - 774b2e78-39be-49f0-8fd9-0aa021a39f2f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -87,7 +87,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '98' + - '93' status: code: 200 message: OK @@ -98,7 +98,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -108,9 +108,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -119,13 +119,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 3358cc30-05f2-41cf-8db1-6439f50e4013 + - 6538bfb7-2e2e-488f-b935-ead59d26f8d8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -133,7 +133,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '105' + - '111' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_no_result_attribute.yaml index 2810435be2103..ca83f30ce45b9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_no_result_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 42b48b6b-82af-4009-9fce-6e4b0aa84164 + - 7f10c39c-4c45-4b6f-a4a9-d842331d000b content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '229' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_nonexistent_attribute.yaml index 478a27992e63d..95e92d12c8f04 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - a9c831ec-f52b-48ae-b6c4-4c2c1009c948 + - 06198e70-ea3e-4cbc-9cd2-ae78adf4d46c content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_errors.yaml index 9f08bfcc9e2ed..6a99680cb40b0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_errors.yaml @@ -6,7 +6,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,27 +16,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 6fb01711-e54c-4d31-ac5c-31090c70d477 + - 084681fc-8373-4fe8-8439-f2e5827b6303 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml index 504443cdef4b1..1cd5ace0dd705 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml @@ -4,7 +4,7 @@ interactions: :''(", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":40,"text":"This won''t actually create a warning :''("}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - a629bb87-c4d0-4834-8137-5022ecd0f326 + - 3d9a766a-43e3-4985-86b9-4bb2dd1930ec content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '341' + - '90' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_duplicate_ids_error.yaml index 030f80bdfe676..d07ed6337f671 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_duplicate_ids_error.yaml @@ -4,7 +4,7 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 7bf2cc9c-f7e4-4b28-87ab-9e18fc41757c + - 1c0ab972-6593-48b1-af4f-4b138ab0c43f content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_empty_credential_class.yaml index 1cabeef256896..36eb9dd6039e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_empty_credential_class.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:52 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_all_errors.yaml index 8c7c87ed70996..092b7a364d740 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_all_errors.yaml @@ -5,7 +5,7 @@ interactions: "english"}, {"id": "3", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,25 +15,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - e97267c2-7f30-4c2c-893c-8256c81626eb + - 838a1ab2-8281-4f97-b7ff-717051401ae8 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:43 GMT + - Thu, 27 Aug 2020 19:31:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_some_errors.yaml index 55ed4a7e82755..189fdded1afae 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_some_errors.yaml @@ -6,7 +6,7 @@ interactions: you try it.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The @@ -27,16 +27,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 8064c457-a71f-4406-bb38-07733225f402 + - ed04dab2-5bf4-450b-93b3-05c049cced7e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '98' + - '79' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_docs.yaml index 2d99da88294eb..b469eaf6f6842 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_docs.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 6034c272-f384-4c3d-8bbb-f3e7157bd252 + - 690eec45-cc48-49a4-a6e8-ee2f7e9d91b0 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_method.yaml index 1e7e6476273db..d050acfdaa1b1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_method.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - ed3802cd-6a0a-4221-bb50-ba8aeb9634e3 + - d3b407d4-9dbf-41c9-8652-6eec212619e0 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_language_kwarg_spanish.yaml index 87255bd8f7857..15ac36bfb2062 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_language_kwarg_spanish.yaml @@ -4,7 +4,7 @@ interactions: "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":35,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.98,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.98,"negative":0.01},"offset":0,"length":35,"text":"Bill Gates is the CEO of Microsoft."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 3280fcc8-7534-44a2-9502-1f795ddb11d7 + - 6947c482-7c9a-4806-86cf-bfec2236e37d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 17:51:18 GMT + - Thu, 27 Aug 2020 19:31:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '198' + - '100' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_no_offset_length_v3_sentence_sentiment.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_no_offset_length_v3_sentence_sentiment.yaml new file mode 100644 index 0000000000000..175a126fa7500 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_no_offset_length_v3_sentence_sentiment.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "I like nature. I do not like being + inside", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/sentiment?showStats=false + response: + body: + string: '{"documents":[{"id":"0","sentiment":"mixed","confidenceScores":{"positive":0.44,"neutral":0.27,"negative":0.29},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.88,"neutral":0.11,"negative":0.01},"offset":0,"length":14,"text":"I + like nature."},{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.43,"negative":0.56},"offset":15,"length":26,"text":"I + do not like being inside"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 94e0a047-a7be-4d12-a4ec-81ef3f496950 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 20:56:20 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '78' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_offset_length.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_offset_length.yaml new file mode 100644 index 0000000000000..8b9f602bd5a43 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_offset_length.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "I like nature. I do not like being + inside", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","sentiment":"mixed","confidenceScores":{"positive":0.44,"neutral":0.27,"negative":0.29},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.88,"neutral":0.11,"negative":0.01},"offset":0,"length":14,"text":"I + like nature."},{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.43,"negative":0.56},"offset":15,"length":26,"text":"I + do not like being inside"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - c1dc9d16-85c8-420d-95a1-76b21edbb06f + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 18:31:18 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '81' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining.yaml index 9daa244e8e3b0..cee800d086ff8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining.yaml @@ -4,7 +4,7 @@ interactions: that makes it beautiful to look at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"offset":0,"length":74,"text":"It has a sleek premium aluminum design that makes it beautiful to look at.","aspects":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":32,"length":6,"text":"design","relations":[{"relationType":"opinion","ref":"#/documents/0/sentences/0/opinions/0"},{"relationType":"opinion","ref":"#/documents/0/sentences/0/opinions/1"}]}],"opinions":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":9,"length":5,"text":"sleek","isNegated":false},{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":15,"length":7,"text":"premium","isNegated":false}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 4c02e1ce-36d5-4e40-ab94-817af736669d + - d731425e-aa5a-4246-a394-a5ecd301b7e9 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 30 Jul 2020 21:31:42 GMT + - Thu, 27 Aug 2020 19:31:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '114' + - '96' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_no_mined_opinions.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_no_mined_opinions.yaml index 699be403bc2ae..38fc4ccbf65e1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_no_mined_opinions.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_no_mined_opinions.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "0", "text": "today is a hot day", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,22 +13,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.1,"neutral":0.88,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.1,"neutral":0.88,"negative":0.02},"offset":0,"length":18,"text":"today is a hot day","aspects":[],"opinions":[]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 8c5e391d-7ced-4b43-a89b-d87abc04c772 + - c892a7af-8e67-4d40-b76d-81e5f9b9590b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 30 Jul 2020 21:38:55 GMT + - Thu, 27 Aug 2020 19:31:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '90' + - '97' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_with_negated_opinion.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_with_negated_opinion.yaml index a907e92069f73..73f3fe35ea819 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_with_negated_opinion.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_with_negated_opinion.yaml @@ -4,7 +4,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":0,"length":32,"text":"The food and service is not good","aspects":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":4,"length":4,"text":"food","relations":[{"relationType":"opinion","ref":"#/documents/0/sentences/0/opinions/0"}]},{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":13,"length":7,"text":"service","relations":[{"relationType":"opinion","ref":"#/documents/0/sentences/0/opinions/0"}]}],"opinions":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":28,"length":4,"text":"good","isNegated":true}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 301fd828-cccc-417e-bd0d-83eeb9dfb542 + - b6c74212-ba51-4fca-9819-260e1c801588 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 30 Jul 2020 21:31:42 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '97' + - '81' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_out_of_order_ids.yaml index 3914b133b6877..1aedbb8ccc34e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_out_of_order_ids.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 202eb5e6-49a5-4e30-a8b9-f04ebb1d3a1d + - 0084c944-11e7-4ecc-80a7-94b17cda63b4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '211' + - '88' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_output_same_order_as_input.yaml index 989e6708549d6..7a4540018f084 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_output_same_order_as_input.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.9,"negative":0.04},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.9,"negative":0.04},"offset":0,"length":3,"text":"one"}],"warnings":[]},{"id":"2","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.97,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.97,"negative":0.02},"offset":0,"length":3,"text":"two"}],"warnings":[]},{"id":"3","sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"offset":0,"length":5,"text":"three"}],"warnings":[]},{"id":"4","sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":4,"text":"four"}],"warnings":[]},{"id":"5","sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"offset":0,"length":4,"text":"five"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - d3686859-3b21-44a7-991e-09bca1e698d5 + - 0c65f394-1360-44f4-aadb-a13ae6ca8754 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '186' + - '100' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_pass_cls.yaml index 932735b66b281..757ad9a3f26d3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_pass_cls.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.32,"neutral":0.65,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.32,"neutral":0.65,"negative":0.03},"offset":0,"length":28,"text":"Test passing cls to endpoint"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - d4509b09-bd20-4739-aeb5-2fb576ebbdd6 + - f600a645-52da-45ec-942f-84eb88a21ec2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '92' + - '81' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_passing_only_string.yaml index aaef6246dd110..867b9caa7a445 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_passing_only_string.yaml @@ -7,7 +7,7 @@ interactions: "en"}, {"id": "3", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -32,13 +32,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - c3cd4fe4-c3da-4e35-8eb2-5788271eeb73 + - 5abe82f0-fc68-44d6-bc36-08e81ca90632 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -46,7 +46,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '103' + - '91' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_per_item_dont_use_language_hint.yaml index 454030da7907e..e55eb0a98b73f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_per_item_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 6bd36846-ff3b-44c2-817f-b998cf8b8483 + - 918186e6-d096-408d-8d48-eca13502169c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '101' + - '86' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_rotate_subscription_key.yaml index cf8a66ee69351..8ad57865e3087 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_rotate_subscription_key.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - e586e4c3-409f-42f0-b982-19576111a359 + - 0b9a5e6b-ad0b-45f3-8da9-79f6440568c8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:43 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '119' + - '85' status: code: 200 message: OK @@ -52,7 +52,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -62,9 +62,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -74,7 +74,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:43 GMT + - Thu, 27 Aug 2020 19:31:58 GMT status: code: 401 message: PermissionDenied @@ -85,7 +85,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -95,9 +95,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -106,13 +106,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 3efa5050-2382-404e-a814-2d66d202287b + - 67df6212-976f-40ad-a488-343f276019fd content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:43 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -120,7 +120,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '93' + - '87' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_show_stats_and_model_version.yaml index 3cb69f9c61926..c782202dcf728 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_show_stats_and_model_version.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 74763fb5-d048-49d1-aa5a-23c32aa1910c + - fe7974c5-daee-401c-a149-5b2c30add313 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '91' + - '89' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..84c206702df2b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,43 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '75' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/sentiment?showStats=false + response: + body: + string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.0,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.0,"negative":0.01},"offset":0,"length":17,"text":"please + don''t fail"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 72cda56d-9970-4c24-b3ed-103bee60e0b9 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 19:31:53 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '84' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_too_many_documents.yaml index 74d646989f867..c45028cd65eef 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_too_many_documents.yaml @@ -9,7 +9,7 @@ interactions: {"id": "10", "text": "Eleven", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -19,20 +19,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - e76e392e-4a35-473a-898a-e49c708ec2e1 + - 48ccef32-6c97-4cf2-a46e-55d414ccfd6c content-type: - application/json; charset=utf-8 date: - - Tue, 04 Aug 2020 21:24:44 GMT + - Thu, 27 Aug 2020 19:31:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_user_agent.yaml index 56e0fb0cb1855..689a972e148b7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_user_agent.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 7e3d865b-156b-46a4-a7ec-18300c77b15e + - af44eea9-42bc-4974-b4a7-9dcbc247d510 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:41 GMT + - Thu, 27 Aug 2020 19:31:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '97' + - '90' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_dont_use_language_hint.yaml index 0e38aa4875fa1..5e487fb386a10 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":33,"text":"This @@ -28,13 +28,13 @@ interactions: restaurant was not as good as I hoped."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - b5d70d4c-2813-44ac-9986-154a8a13130c + - 215cc7ed-0a9e-4d75-abcd-bf4366b7b148 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '94' + - '78' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint.yaml index 302ed7aac41cb..07f67ed7bb925 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.07,"neutral":0.93,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.07,"neutral":0.93,"negative":0.0},"offset":0,"length":33,"text":"This @@ -28,13 +28,13 @@ interactions: restaurant was not as good as I hoped."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 977bc57b-3591-4c0e-a083-5ff3326d32b9 + - 6df2265b-c8f2-4916-b740-48fd296a65ec content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '100' + - '114' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_input.yaml index 97ba615116e51..3e07d6eae4864 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_input.yaml @@ -6,7 +6,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 83e8d870-affd-4f38-ad4f-03f8fe87dbb6 + - 5a0fccb1-2329-4af9-b25d-5fa2495f67f4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '115' + - '101' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 31bcb4d4e075b..b71d9d77c2152 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 00804568-0d8e-4051-87f1-a5399e251e23 + - 42587117-6743-46b4-be8f-3a4711941e6c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:42 GMT + - Thu, 27 Aug 2020 19:31:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '102' + - '93' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_input.yaml index a2141cbcafd23..3b295b46c2797 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,7 +6,7 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"neutral\",\"confidenceScores\"\ @@ -37,13 +37,13 @@ interactions: warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}" headers: apim-request-id: - - 7bd94eb4-7f36-4590-86e0-d345f9924173 + - 52b521fb-02ec-4f7e-aeaf-5c9b53c0c0e7 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:31:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -51,7 +51,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '125' + - '120' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index cb4c8a7ce81ea..b040715d3398d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"neutral\",\"confidenceScores\"\ @@ -37,13 +37,13 @@ interactions: warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}" headers: apim-request-id: - - 80ebc9f3-8257-47a2-a0c3-4652889c833e + - d9a8f99e-8164-499f-9b5d-79214bb18ecb content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:43 GMT + - Thu, 27 Aug 2020 19:31:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_dict.yaml index 9e24c03bc67f8..032fef4d2eacd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_dict.yaml @@ -7,15 +7,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '315' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":51,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -25,16 +25,16 @@ interactions: restaurant had really good food."},{"sentiment":"positive","confidenceScores":{"positive":0.96,"neutral":0.03,"negative":0.01},"offset":37,"length":23,"text":"I recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: a02574f4-91fb-4ac8-8c9b-66ef9b9b9a13 + apim-request-id: c57f2812-d193-4af6-b492-58110b99a140 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:42 GMT + date: Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '193' + x-envoy-upstream-service-time: '87' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_text_document_input.yaml index 67f54aaa36555..b6059755220a2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_text_document_input.yaml @@ -7,15 +7,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '315' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -25,16 +25,16 @@ interactions: restaurant had really good food."},{"sentiment":"positive","confidenceScores":{"positive":0.96,"neutral":0.03,"negative":0.01},"offset":37,"length":23,"text":"I recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 88f5d350-fd2a-4d63-9d33-efb5a3e9feaf + apim-request-id: f665688d-1cce-4513-bd7c-ae81c7400faf content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '109' + x-envoy-upstream-service-time: '83' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_credentials.yaml index 1959e3f0aef0c..ef0cc6b48e111 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_credentials.yaml @@ -4,15 +4,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -20,9 +20,9 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_model_version_error.yaml index 3c23c13e0aaf7..e976f1aaec1c0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_model_version_error.yaml @@ -4,29 +4,29 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '101' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2019-10-01,2020-04-01"}}}' headers: - apim-request-id: 186c3b7c-1e2e-4b39-b326-f42db2230e76 + apim-request-id: 71053d6c-9f69-4d1e-9f3a-dc1588bbc455 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:42 GMT + date: Thu, 27 Aug 2020 19:31:53 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '6' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?model-version=bad&showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit.yaml index c1c3cb12629a9..544c300819758 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit.yaml @@ -748,29 +748,29 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58755' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: b7943f7e-f314-43ca-bb39-620fbf810522 + apim-request-id: ec32a00c-c6a9-40c2-b8a2-dff6ba90bde5 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:42 GMT + date: Thu, 27 Aug 2020 19:31:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '14' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit_error.yaml index 57ca5ed954dda..ef9388697cb07 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit_error.yaml @@ -713,29 +713,29 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '55962' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 273c84ac-b300-4ef8-9aad-815c0ea1b24c + apim-request-id: 14ba945e-f7d9-4067-a3f3-c14f7e6b2f95 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '13' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_client_passed_default_language_hint.yaml index 3f864f1a64a37..628308ddf0885 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_client_passed_default_language_hint.yaml @@ -6,15 +6,15 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,18 +22,18 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: b0146b82-a04a-404d-8689-0871e2277062 + apim-request-id: c891977d-781a-4903-9a68-c324e34704b8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:42 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '113' + x-envoy-upstream-service-time: '119' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -41,15 +41,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -57,18 +57,18 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 3896b0c1-d55a-48f4-95f6-381d90aa4b0a + apim-request-id: f7a559df-b24b-4b61-b872-d93d5c66aa7c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:42 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '90' + x-envoy-upstream-service-time: '83' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -76,15 +76,15 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -92,16 +92,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 2e58bfe8-176b-46b0-b607-25468cd90296 + apim-request-id: 3deb72d0-3f32-4d4b-bdd6-2866d49d07c3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:42 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '108' + x-envoy-upstream-service-time: '135' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_no_result_attribute.yaml index 35b2268bbac3d..2466bb918590f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_no_result_attribute.yaml @@ -3,24 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 445ebb8b-1db3-451c-94f4-910ff2880adc + apim-request-id: f0cb046c-30ff-47c7-9de2-5d514faed802 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_nonexistent_attribute.yaml index b1365b867a6e2..2c382ab15f50a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,30 +3,30 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 93b7d9e6-652b-4d53-a262-f901c55aff44 + apim-request-id: 82470de3-9069-4f0d-a6a7-acba80fcf132 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:42 GMT + date: Thu, 27 Aug 2020 19:31:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '1' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_errors.yaml index ea7d16fd12f9f..8486ace9dd9f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_errors.yaml @@ -6,36 +6,36 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '5308' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 15979b6e-b026-45f0-82af-183780125d6f + apim-request-id: 03a7e979-6937-4d71-888e-31b0c35126e2 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:53 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_warnings.yaml index 6855dc69f736f..07f1eb96fb12f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_warnings.yaml @@ -4,30 +4,30 @@ interactions: :''(", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '98' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":40,"text":"This won''t actually create a warning :''("}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: cb6d5da1-7463-46c0-9e98-47badea2f281 + apim-request-id: 4702ed83-022b-49bc-96a6-9efc4b97de06 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:44 GMT + date: Thu, 27 Aug 2020 19:31:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '91' + x-envoy-upstream-service-time: '78' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_duplicate_ids_error.yaml index 11ef8cc4c47fc..2a5402f36b263 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_duplicate_ids_error.yaml @@ -4,29 +4,29 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '150' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: 5ae6b123-edd5-4cb1-be77-71ffdae07d5d + apim-request-id: f100e950-cb2e-4cad-bc55-6531bbb6d46d content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_empty_credential_class.yaml index 6d04b1f4a524b..3ac0a106e71f8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_empty_credential_class.yaml @@ -4,15 +4,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -20,9 +20,9 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_all_errors.yaml index 44d4bb0d60618..a59acd63728e8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_all_errors.yaml @@ -5,34 +5,34 @@ interactions: "english"}, {"id": "3", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '209' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 6db92618-5888-4b7c-8695-1682f2945e6e + apim-request-id: 9c6d53ff-f5e9-491a-974d-3b9da4095526 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_some_errors.yaml index 81d8ff523a4db..53270302dfbf4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_some_errors.yaml @@ -6,15 +6,15 @@ interactions: you try it.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '269' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The @@ -23,18 +23,18 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: e457581c-0f2f-4bdf-94bd-6df280015bc8 + apim-request-id: b609a82b-91c8-47a3-ada2-52ef79694d84 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '167' + x-envoy-upstream-service-time: '152' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_docs.yaml index ac135ae33a2bc..3482d791ce401 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_docs.yaml @@ -4,24 +4,24 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: e99b4a30-cff2-4ec3-af7f-722f1d90b11d + apim-request-id: f98f6308-de16-480d-bdda-734e95afaac2 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -29,5 +29,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_method.yaml index e747200fdf3f0..761029e053947 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_method.yaml @@ -4,24 +4,24 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: de,en,es,fr,it,ja,ko,nl,no,pt-PT,tr,zh-Hans,zh-Hant"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 8b3988d3-08e5-4f19-840c-831db5d90dfd + apim-request-id: 34d18ae9-f4e9-48eb-a709-31c3e40997e0 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -29,5 +29,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_language_kwarg_spanish.yaml index c8bb7b9b08b8a..db2164ddf78bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_language_kwarg_spanish.yaml @@ -4,30 +4,30 @@ interactions: "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '93' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":35,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.98,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.98,"negative":0.01},"offset":0,"length":35,"text":"Bill Gates is the CEO of Microsoft."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: b22cdb80-908b-4758-a721-638746a66fc7 + apim-request-id: 99ae5aa0-c8a0-4734-8bbd-ad41003bb88a content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '93' + x-envoy-upstream-service-time: '102' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_no_offset_length_v3_sentence_sentiment.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_no_offset_length_v3_sentence_sentiment.yaml new file mode 100644 index 0000000000000..b4a940938941a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_no_offset_length_v3_sentence_sentiment.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "I like nature. I do not like being + inside", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/sentiment?showStats=false + response: + body: + string: '{"documents":[{"id":"0","sentiment":"mixed","confidenceScores":{"positive":0.44,"neutral":0.27,"negative":0.29},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.88,"neutral":0.11,"negative":0.01},"offset":0,"length":14,"text":"I + like nature."},{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.43,"negative":0.56},"offset":15,"length":26,"text":"I + do not like being inside"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 0577ce48-c371-418e-b478-cc085c7ecaf8 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 20:56:21 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '79' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.0/sentiment?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_offset_length.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_offset_length.yaml new file mode 100644 index 0000000000000..2c98023a60c05 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_offset_length.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "I like nature. I do not like being + inside", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","sentiment":"mixed","confidenceScores":{"positive":0.44,"neutral":0.27,"negative":0.29},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.88,"neutral":0.11,"negative":0.01},"offset":0,"length":14,"text":"I + like nature."},{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.43,"negative":0.56},"offset":15,"length":26,"text":"I + do not like being inside"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 22d88cc1-51fb-48e0-a335-d14b72e1d125 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 18:31:18 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '92' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining.yaml index 8bd21eaab0d46..df35086ba06cb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining.yaml @@ -4,30 +4,30 @@ interactions: that makes it beautiful to look at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '132' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"offset":0,"length":74,"text":"It has a sleek premium aluminum design that makes it beautiful to look at.","aspects":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":32,"length":6,"text":"design","relations":[{"relationType":"opinion","ref":"#/documents/0/sentences/0/opinions/0"},{"relationType":"opinion","ref":"#/documents/0/sentences/0/opinions/1"}]}],"opinions":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":9,"length":5,"text":"sleek","isNegated":false},{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":15,"length":7,"text":"premium","isNegated":false}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 6576433c-7362-4637-804c-a25189ff691d + apim-request-id: da9f1b9d-8e1f-4490-8d06-00dff248ed14 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 30 Jul 2020 21:31:43 GMT + date: Thu, 27 Aug 2020 19:31:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '96' + x-envoy-upstream-service-time: '85' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_no_mined_opinions.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_no_mined_opinions.yaml index 882cb8156f351..9c19022560647 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_no_mined_opinions.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_no_mined_opinions.yaml @@ -3,30 +3,30 @@ interactions: body: '{"documents": [{"id": "0", "text": "today is a hot day", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '76' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.1,"neutral":0.88,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.1,"neutral":0.88,"negative":0.02},"offset":0,"length":18,"text":"today is a hot day","aspects":[],"opinions":[]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: feb1be87-502c-4e43-b981-c7fb7e6d2b30 + apim-request-id: 4d87f92c-a592-455a-bd88-633b0d178c79 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 30 Jul 2020 21:38:56 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '128' + x-envoy-upstream-service-time: '94' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_with_negated_opinion.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_with_negated_opinion.yaml index 240f3545c9878..e07b69256df11 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_with_negated_opinion.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_with_negated_opinion.yaml @@ -4,30 +4,30 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '90' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":0,"length":32,"text":"The food and service is not good","aspects":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":4,"length":4,"text":"food","relations":[{"relationType":"opinion","ref":"#/documents/0/sentences/0/opinions/0"}]},{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":13,"length":7,"text":"service","relations":[{"relationType":"opinion","ref":"#/documents/0/sentences/0/opinions/0"}]}],"opinions":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":28,"length":4,"text":"good","isNegated":true}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: c2bf1989-2526-45db-a201-02972303c315 + apim-request-id: 66b7863d-048c-4a31-a972-63d55b8df806 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 30 Jul 2020 21:31:43 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '80' + x-envoy-upstream-service-time: '81' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_out_of_order_ids.yaml index e1488f1d303f4..722b75443dbaf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_out_of_order_ids.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: d806272a-d892-40ae-97c5-5d1a205e23fc + apim-request-id: f583062e-d188-4dcb-94a5-031797cf71a5 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:44 GMT + date: Thu, 27 Aug 2020 19:31:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '107' + x-envoy-upstream-service-time: '92' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_output_same_order_as_input.yaml index 5eb1b109a9c46..d5955db9c3511 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_output_same_order_as_input.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.9,"negative":0.04},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.9,"negative":0.04},"offset":0,"length":3,"text":"one"}],"warnings":[]},{"id":"2","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.97,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.97,"negative":0.02},"offset":0,"length":3,"text":"two"}],"warnings":[]},{"id":"3","sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"offset":0,"length":5,"text":"three"}],"warnings":[]},{"id":"4","sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":4,"text":"four"}],"warnings":[]},{"id":"5","sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"offset":0,"length":4,"text":"five"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 9f933ebf-771d-46ae-9f5e-964ab45d069f + apim-request-id: 07188c04-7822-46a0-bf68-772f63d9ead4 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '98' + x-envoy-upstream-service-time: '87' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_pass_cls.yaml index bc62791c7b2e8..47364f75ab6d4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_pass_cls.yaml @@ -4,30 +4,30 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '86' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.32,"neutral":0.65,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.32,"neutral":0.65,"negative":0.03},"offset":0,"length":28,"text":"Test passing cls to endpoint"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 4d380e96-c279-4c56-9f5c-ec6f7778ef58 + apim-request-id: fdf39b73-226b-42e2-b4d6-b2ecc644f77c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:56 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '106' + x-envoy-upstream-service-time: '86' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_passing_only_string.yaml index 5df1a8509406b..a5cbf109e48a4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_passing_only_string.yaml @@ -7,15 +7,15 @@ interactions: "en"}, {"id": "3", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '358' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -27,16 +27,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: e622c344-99f3-451b-9f3b-8554dfa08e84 + apim-request-id: 13dc8813-028e-4cbd-8d49-e9ae650042e8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '111' + x-envoy-upstream-service-time: '94' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_per_item_dont_use_language_hint.yaml index 1e361d1788ee4..2f708ed9d4603 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_per_item_dont_use_language_hint.yaml @@ -6,15 +6,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '236' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,16 +22,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 76258da2-0deb-4516-8709-9b46596c5c96 + apim-request-id: 0dfe40c4-344b-4422-bf37-945515366584 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:44 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '93' + x-envoy-upstream-service-time: '87' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_rotate_subscription_key.yaml index b9397c786d47c..e0d347128c383 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_rotate_subscription_key.yaml @@ -6,15 +6,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,18 +22,18 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 6afc472c-0804-4bd0-8011-126b18576620 + apim-request-id: 810093bd-5164-43c2-bf1c-5dcb3f5fc7b9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '178' + x-envoy-upstream-service-time: '94' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -41,15 +41,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -57,11 +57,11 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:55 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -69,15 +69,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -85,16 +85,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 3fe95075-ac4e-4710-8ebe-1df34365799e + apim-request-id: 464b2870-b207-435f-bef9-26d96198fa4d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '91' + x-envoy-upstream-service-time: '82' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_show_stats_and_model_version.yaml index a5aa9833b2a87..4f7fe655cc967 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_show_stats_and_model_version.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: b920b85f-800a-4b92-b745-2f3c19a3a0de + apim-request-id: 3da5a9a7-2fda-401e-bcaa-921e066586b2 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '200' + x-envoy-upstream-service-time: '113' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..e79a1ed1887ab --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '75' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/sentiment?showStats=false + response: + body: + string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.0,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.0,"negative":0.01},"offset":0,"length":17,"text":"please + don''t fail"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 9d082595-3d44-4ca6-ada0-bb3527f62aa2 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 19:31:56 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '75' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.0/sentiment?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_too_many_documents.yaml index e1eecaf9f63e1..3ec71a20df402 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_too_many_documents.yaml @@ -9,29 +9,29 @@ interactions: {"id": "10", "text": "Eleven", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '534' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 8d1b3a28-7d72-47f2-934c-4adc2267a060 + apim-request-id: 601807d3-aefb-4dfa-8a41-ba7166643779 content-type: application/json; charset=utf-8 - date: Tue, 04 Aug 2020 21:24:45 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_user_agent.yaml index ac3c414a6fef2..8e2037e3d4719 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_user_agent.yaml @@ -6,15 +6,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,16 +22,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: d8a3ee55-eac4-4485-b2e1-1d5efbed8c3d + apim-request-id: 1f75b6dc-8c72-44ec-abf7-9b965b555f34 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '206' + x-envoy-upstream-service-time: '93' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_dont_use_language_hint.yaml index 2ed04390cc88b..8b01bd1131aee 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_dont_use_language_hint.yaml @@ -6,15 +6,15 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '273' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":33,"text":"This @@ -23,16 +23,16 @@ interactions: was too expensive."}],"warnings":[]},{"id":"2","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.0,"negative":0.99},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.0,"negative":0.99},"offset":0,"length":42,"text":"The restaurant was not as good as I hoped."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 0f770871-909a-48b1-8774-522ada8af602 + apim-request-id: 8ca7b602-185a-4c3d-bda3-7a6df0b50602 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '154' + x-envoy-upstream-service-time: '142' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint.yaml index 1e25d8781f0ea..fb6706f0f7e57 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint.yaml @@ -6,15 +6,15 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '279' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.07,"neutral":0.93,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.07,"neutral":0.93,"negative":0.0},"offset":0,"length":33,"text":"This @@ -23,16 +23,16 @@ interactions: was too expensive."}],"warnings":[]},{"id":"2","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.32,"negative":0.67},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.32,"negative":0.67},"offset":0,"length":42,"text":"The restaurant was not as good as I hoped."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 99e05f2b-dce3-4127-b1ef-a526ca59e311 + apim-request-id: cf587f29-d57b-4179-a0b0-e9ee079f2ef4 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:56 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '89' + x-envoy-upstream-service-time: '85' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_input.yaml index f3fb54dbaed3f..4fa698da4c255 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_input.yaml @@ -6,15 +6,15 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,16 +22,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: c13e5370-bfb7-4ede-b734-d592c3839fa7 + apim-request-id: bfe5deb1-9368-4d81-bf53-6173e171bc48 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:31:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '112' + x-envoy-upstream-service-time: '129' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 968bfb0d68989..415643da22d99 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,15 +6,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,16 +22,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 8f86473f-9f4f-4d65-ae7f-1cb7eb91ce5f + apim-request-id: 75cde431-f4de-4e6c-85fb-578e3966d7c1 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:43 GMT + date: Thu, 27 Aug 2020 19:31:56 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '124' + x-envoy-upstream-service-time: '97' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_input.yaml index 315edcfe68caa..6b8c5e1ac2848 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,15 +6,15 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"neutral\",\"confidenceScores\"\ @@ -32,16 +32,16 @@ interactions: :0.06},\"offset\":0,\"length\":4,\"text\":\"\u732B\u306F\u5E78\u305B\"}],\"\ warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}" headers: - apim-request-id: 7344de7f-c20e-4596-b24c-a2c46c4ea626 + apim-request-id: da1b5a7a-2a72-4f05-a147-e7adf78a204e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '95' + x-envoy-upstream-service-time: '100' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 9d6a5d77de4a8..2928d19fb199b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,15 +6,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"neutral\",\"confidenceScores\"\ @@ -32,16 +32,16 @@ interactions: :0.06},\"offset\":0,\"length\":4,\"text\":\"\u732B\u306F\u5E78\u305B\"}],\"\ warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}" headers: - apim-request-id: d2f7eac7-9960-40c5-9abe-7b3129747861 + apim-request-id: 0bc86a5a-d395-4f5a-80e9-0c9125211838 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:44 GMT + date: Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '104' + x-envoy-upstream-service-time: '105' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_dict.yaml index e40b226ed5e66..413ca2fd74559 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_dict.yaml @@ -7,7 +7,7 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,21 +17,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=true response: body: - string: '{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":41,"transactionsCount":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"statistics":{"charactersCount":39,"transactionsCount":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"statistics":{"charactersCount":4,"transactionsCount":1},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"statistics":{"charactersCount":46,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":41,"transactionsCount":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"statistics":{"charactersCount":39,"transactionsCount":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"statistics":{"charactersCount":4,"transactionsCount":1},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"statistics":{"charactersCount":46,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - f3a405b3-2203-46c8-89e4-c653d1c3871e + - b794f09f-b90b-48a9-8d59-3e14cf28d987 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '15' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_text_document_input.yaml index c01a78d6174bd..616fd7b28c59e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_text_document_input.yaml @@ -7,7 +7,7 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,21 +17,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 7a822279-2ca3-40c2-ab92-b2509700678c + - c1834b44-790b-4968-b531-30fca46ee04b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_credentials.yaml index e819484b395d2..cf3b83688bfa2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_credentials.yaml @@ -4,7 +4,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:43 GMT + - Thu, 27 Aug 2020 19:32:02 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_model_version_error.yaml index 3bad2e0ff64c2..43d9910336af2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_model_version_error.yaml @@ -4,7 +4,7 @@ interactions: at.", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?model-version=bad&showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2019-10-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-07-01"}}}' headers: apim-request-id: - - e865b305-db0a-4054-aeb2-f4c7c169a499 + - 662fe0f3-89e7-425f-8a10-69bc78444264 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:43 GMT + - Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit.yaml index 1bef5ab737f65..8450883e8ba94 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit.yaml @@ -753,7 +753,7 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -763,7 +763,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -772,11 +772,11 @@ interactions: request contains too many records. Max 1000 records are permitted."}}}' headers: apim-request-id: - - 59601596-fa31-44c9-82f4-e4e435eb248e + - 1cd62497-faae-4d8e-bc98-c7c6861ea8d9 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -784,7 +784,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '15' + - '12' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit_error.yaml index 34fda7040f3b8..292fbfe44af1d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit_error.yaml @@ -718,7 +718,7 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -728,7 +728,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -737,11 +737,11 @@ interactions: request contains too many records. Max 1000 records are permitted."}}}' headers: apim-request-id: - - cf658a6e-41c2-4324-bbce-1c98d6d6910f + - c2126ee0-a456-4616-9e0c-4b2b3a4ba68b content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_client_passed_default_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_client_passed_default_country_hint.yaml index 1d2d164fbc08a..7fb8973907d26 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_client_passed_default_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_client_passed_default_country_hint.yaml @@ -6,7 +6,7 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - a263b0ec-bd7f-46fc-b278-898936be3abf + - d702f4dd-744e-4d72-8bb9-658b85e79bec content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '15' + - '9' status: code: 200 message: OK @@ -49,7 +49,7 @@ interactions: "DE"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -59,21 +59,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - e0cd65c2-3d62-485b-85a3-72aa09bfe905 + - f1b3a7af-e71c-4f3d-a09a-f6a0ffffdd47 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -92,7 +92,7 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -102,21 +102,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - a22d55b3-a257-473b-b03e-84f66b7dd1aa + - 17985237-c877-4f08-a8c5-5ae58c777f71 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_kwarg.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_kwarg.yaml index 2ac6f96f9edbf..d153811b9166a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_kwarg.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_kwarg.yaml @@ -4,7 +4,7 @@ interactions: "ES"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?model-version=latest&showStats=true response: body: - string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":26,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":26,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - dbf379af-a317-47f7-8cb9-508c45bf31d5 + - 0de01b35-808a-4fd9-9ffb-95dd305ee6ab content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_none.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_none.yaml index c2e8f3a37937d..e0b801ce7534e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_none.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_none.yaml @@ -4,7 +4,7 @@ interactions: ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 4a730470-e0bf-46f2-95bb-e69de1dfbd2d + - 574f25d7-f91d-4930-be1a-62bac58ec2af content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '13' + - '6' status: code: 200 message: OK @@ -45,7 +45,7 @@ interactions: ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -55,21 +55,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - d46766e6-e8ee-466f-b0cb-5ca6766bd34a + - a2dfba17-883e-4220-a710-2810a9193dd5 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -77,7 +77,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '14' + - '7' status: code: 200 message: OK @@ -86,7 +86,7 @@ interactions: ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -96,21 +96,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 5f2451ba-29dd-4267-bba2-cadccc494974 + - 12e1201a-4492-4d8b-9ffe-4765653efe57 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -118,7 +118,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '6' status: code: 200 message: OK @@ -127,7 +127,7 @@ interactions: ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -137,21 +137,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 7eb6cdd5-9142-4a0b-8994-5bd77aea5742 + - fadba6e5-cec6-45e8-a2e1-62688bb6a9af content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -159,7 +159,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '14' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_no_result_attribute.yaml index 984b6a9e1bb17..6260de500f77a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_no_result_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,21 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - e5596b4f-83b8-48fa-8b65-3eb34fe41c2a + - cbaed1d1-a964-45f7-b7df-b4caad22816a content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_nonexistent_attribute.yaml index 43c74a00b0eb8..069485d553291 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,21 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - a013ede2-7c6a-4fc4-80d0-bf5c1b00a841 + - cd32356e-7077-4d5d-9057-759f56d6be3a content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_errors.yaml index 2205a1d99025f..12f5379d8c8c4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_errors.yaml @@ -5,7 +5,7 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,7 +15,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -26,14 +26,14 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations - see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2019-10-01"}' + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - acb47440-95c7-4b54-a0fe-dc941d8ec512 + - 4696c086-461e-408c-9781-e939d6d38f41 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_warnings.yaml index 1f86206274ecd..77cd525a7dbfd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_warnings.yaml @@ -4,7 +4,7 @@ interactions: :''(", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - a9b4bb8e-4e7d-46c2-bfd9-54e8d12b0b21 + - 33c3bd5e-8e5e-46b0-b739-1335de6b23d1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '17' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_duplicate_ids_error.yaml index 0403f5d516669..064ae6c2ff2a8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_duplicate_ids_error.yaml @@ -5,7 +5,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,7 +15,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -24,11 +24,11 @@ interactions: contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 3b4b92b3-ee37-44f4-a585-5f35267a0f77 + - 130129bf-0805-46cf-adb8-8d06c703dc31 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_empty_credential_class.yaml index 635df607cab87..b5f2564164a11 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_empty_credential_class.yaml @@ -4,7 +4,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:04 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_all_errors.yaml index 1ad1c6ba2f4cc..03e8ea8c26852 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_all_errors.yaml @@ -6,7 +6,7 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,7 +16,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -31,14 +31,14 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations - see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2019-10-01"}' + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - b1d46a45-3d64-4ae5-a1e6-3a217b055c20 + - 927d8622-6c72-42ce-8b20-9aa68e7878fb content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_some_errors.yaml index 2981492b7f670..843d293575089 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_some_errors.yaml @@ -7,7 +7,7 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,7 +17,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -27,16 +27,16 @@ interactions: hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code."}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text - is empty."}}}],"modelVersion":"2019-10-01"}' + is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 63384771-382a-46d9-bbd8-389ae19b218c + - dfe843d2-6cb2-490d-b3ee-ea4044ceb60d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_docs.yaml index f6eecbe40c6c8..21fea61aefe0c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_docs.yaml @@ -4,7 +4,7 @@ interactions: States"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -22,14 +22,14 @@ interactions: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Country Hint.","innererror":{"code":"InvalidCountryHint","message":"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country - code."}}}],"modelVersion":"2019-10-01"}' + code."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 19265f5b-cfac-4376-b6c3-f435474d4f06 + - b2031517-3e5c-4fe7-a766-d6a911d3188f content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_method.yaml index b9c006eab8823..f4a2d0d3fca62 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_method.yaml @@ -4,7 +4,7 @@ interactions: States"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -22,14 +22,14 @@ interactions: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Country Hint.","innererror":{"code":"InvalidCountryHint","message":"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country - code."}}}],"modelVersion":"2019-10-01"}' + code."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 704de4ad-a062-4a59-9706-61114f611145 + - 8a655c6a-114c-4b23-9e2f-a523d57b3158 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_out_of_order_ids.yaml index 13ec20b9d837d..9f88acfe4a935 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_out_of_order_ids.yaml @@ -6,7 +6,7 @@ interactions: ":D", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: string: '{"documents":[{"id":"56","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"0","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"19","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 8194be8f-2284-436d-b878-711535e0fa48 + - a5e65b29-6bf5-4c88-b729-e7615f51eb5d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:31:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_output_same_order_as_input.yaml index 697f8e93e56bc..f8666a65bbf85 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_output_same_order_as_input.yaml @@ -6,7 +6,7 @@ interactions: "five", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"5","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"5","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 7acba81f-4af2-45a2-9cbb-89d9623c95db + - 37e34da8-a0f3-47fc-9d02-6feb3b85008c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_pass_cls.yaml index 0fa211fb6af22..555c2d3b6355a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_pass_cls.yaml @@ -4,7 +4,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 323f2cbb-f92b-488a-ae2a-1902d4673096 + - 215e40db-beb1-450e-bcf4-849b9c657774 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_passing_only_string.yaml index 88d5a03efbd0a..beceb34ea79f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_passing_only_string.yaml @@ -7,7 +7,7 @@ interactions: "countryHint": "US"}, {"id": "4", "text": "", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,23 +17,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"warnings":[]}],"errors":[{"id":"4","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 9fcc3c4e-c0ab-4c43-8fe2-3ea7c1f1d9e4 + - ec1fa4ee-aff6-4803-9469-72bdf3506308 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_per_item_dont_use_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_per_item_dont_use_country_hint.yaml index a6d38f7c15191..ff61c3c3c615a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_per_item_dont_use_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_per_item_dont_use_country_hint.yaml @@ -6,7 +6,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 28b1bff6-586e-4618-8898-7dd8c41a565f + - edb01c81-a584-438b-a390-637ee8d671f2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_rotate_subscription_key.yaml index 575e422b805b9..d894c940a68b8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_rotate_subscription_key.yaml @@ -6,7 +6,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - dcf16c34-b2e1-4cba-af06-7f1025e14f0f + - e2f0d114-26da-4c7e-9582-45ce4bb9d416 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '8' status: code: 200 message: OK @@ -49,7 +49,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -59,7 +59,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -71,7 +71,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:58 GMT status: code: 401 message: PermissionDenied @@ -82,7 +82,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -92,21 +92,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - d91407e8-405e-421b-9e77-ac2a6c7c1b5f + - 005b6d95-e9d5-4f62-8f19-ac6b15e34963 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -114,7 +114,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_show_stats_and_model_version.yaml index a48a1f7636531..3f126a7bf928a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_show_stats_and_model_version.yaml @@ -6,7 +6,7 @@ interactions: ":D", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - b885ec99-9c84-406c-ae5a-89730c9b6ba2 + - 75eea94a-cb81-4736-b994-2595d4860438 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..4e517e0913929 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,43 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "countryHint": + "US"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '78' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/languages?showStats=false + response: + body: + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - a80b8f71-b9f5-4cca-b0f0-dd3509d38184 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 19:31:59 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '8' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_user_agent.yaml index 1eb950111f5e7..4e4a5a942cce4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_user_agent.yaml @@ -6,7 +6,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - e7b82277-8276-4ee8-bd8f-5420c531dae8 + - 9a255115-7d5e-41a6-8bd4-38fd92186da1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint.yaml index 4120c358d34b4..2ce5a214fe942 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "countryHint": "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - c8cae5a2-898c-4320-b2e4-5a3e1f343734 + - a68cd071-2c87-4175-b6d7-c5f4a23828ac content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_input.yaml index f2cbae68f52b5..2c2586c5e1faf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_input.yaml @@ -6,7 +6,7 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 82e09fb7-977c-459e-ab06-f646f0b759f8 + - 8bbfa1b3-0edc-4ce6-8d4c-fe19b1ce12af content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_per_item_hints.yaml index 8fc790defee31..5f7c804ddec2d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 26a25701-f156-4ece-8d4b-4a452664b21f + - 88349785-5df8-44fa-a181-18a0b80e9caa content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_input.yaml index 8638ba6a71ed0..52b2763b2ab16 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_input.yaml @@ -6,7 +6,7 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 44c91ebc-9e7b-4107-b492-e6811a25c461 + - 4633b63b-0dde-47b7-baf8-3b70667a572e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '26' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_per_item_hints.yaml index b3c627bb7c18c..82f5675ee4268 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 8cda4b5a-8838-4244-9f81-3173b3fbd257 + - 50641556-4312-44bd-8618-6a83abd333b9 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:44 GMT + - Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_dont_use_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_dont_use_country_hint.yaml index a86542113bdea..0290aec562c87 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_dont_use_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_dont_use_country_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "countryHint": ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 7c9531b7-b9ef-4acb-9fe7-d7b88725e022 + - c3ed3df9-3d3e-4e05-a4c6-75d16d636730 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:45 GMT + - Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_dict.yaml index 63898d6ce2c00..f978983f540ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_dict.yaml @@ -7,23 +7,23 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '354' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=true response: body: - string: '{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":41,"transactionsCount":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"statistics":{"charactersCount":39,"transactionsCount":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"statistics":{"charactersCount":4,"transactionsCount":1},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"statistics":{"charactersCount":46,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":41,"transactionsCount":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"statistics":{"charactersCount":39,"transactionsCount":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"statistics":{"charactersCount":4,"transactionsCount":1},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"statistics":{"charactersCount":46,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: d94f0fbd-be40-42ff-bed6-b965ea7be8b6 + apim-request-id: 7aeb9fbb-d4ea-4a80-ae62-43f377feb380 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_text_document_input.yaml index 0b50ac6bbb8eb..1d703deeb6c07 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_text_document_input.yaml @@ -7,27 +7,27 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '353' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 107b426b-0380-4176-889b-d0e3c12ff24c + apim-request-id: d9e09905-f4b2-4199-8fab-45e7ee67f427 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_credentials.yaml index 96b847d8e76e3..f4d501ce7081b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_credentials.yaml @@ -4,13 +4,13 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '88' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -20,7 +20,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:32:02 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_model_version_error.yaml index 657a367ac0665..37b3f0f011b9d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_model_version_error.yaml @@ -4,27 +4,27 @@ interactions: at.", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '99' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?model-version=bad&showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2019-10-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-07-01"}}}' headers: - apim-request-id: 8fb49529-a052-4607-bbd7-67a89128744d + apim-request-id: 62bf884f-77d6-413e-aad4-73b564771f64 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit.yaml index c2f2f4445da8a..1a822d687bcc0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit.yaml @@ -753,13 +753,13 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '61905' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -767,9 +767,9 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 1000 records are permitted."}}}' headers: - apim-request-id: c6e185a9-5654-4b2d-a6a7-3e79b7200910 + apim-request-id: fee37e90-f484-476e-9992-dda2fc14d609 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit_error.yaml index 86ee553acfd64..deac8a474bb36 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit_error.yaml @@ -718,13 +718,13 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58965' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -732,13 +732,13 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 1000 records are permitted."}}}' headers: - apim-request-id: 00a77b36-500c-434e-baa9-307c4a111d2d + apim-request-id: 97679993-3112-48f9-83a1-470cd18cd1d5 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '13' + x-envoy-upstream-service-time: '11' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_client_passed_default_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_client_passed_default_country_hint.yaml index 659b2fbeef94d..2700198dc722a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_client_passed_default_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_client_passed_default_country_hint.yaml @@ -6,27 +6,27 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 953e3a4e-b259-4c71-9a07-67e4e6cb4365 + apim-request-id: 59eb7cc9-5846-4bd8-9fe7-80d6683f00a6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK @@ -38,27 +38,27 @@ interactions: "DE"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 6dce5c9c-113c-4bd3-9e36-0f64bb4ed770 + apim-request-id: f5108d21-7671-48ac-a455-50b06266c5be content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK @@ -70,27 +70,27 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e3c0cf99-3a02-44d8-a2d7-654a95bfe0a2 + apim-request-id: 4d836c07-c4b2-4294-8a2d-a4f45af260e8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_kwarg.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_kwarg.yaml index 318eb84741b58..3a008f4772c1e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_kwarg.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_kwarg.yaml @@ -4,23 +4,23 @@ interactions: "ES"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '87' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?model-version=latest&showStats=true response: body: - string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":26,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":26,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 6143cb65-5cdf-4334-a8fe-0712449a3d4d + apim-request-id: 225331b8-8f31-4e9e-b96b-748641b9b6fd content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_none.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_none.yaml index 19b21ffc79daa..7da034149bcd9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_none.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_none.yaml @@ -4,23 +4,23 @@ interactions: ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '86' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 95a96846-394d-42e5-966a-21b64f1580d3 + apim-request-id: 0037af8b-5d96-48fb-9f3d-26e59c77df4f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -34,23 +34,23 @@ interactions: ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '86' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 3a06cf6b-0f7e-4bab-8c7b-70d0252c2340 + apim-request-id: 9f69be65-94d7-41ce-ad22-0af61b36a22c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -64,27 +64,27 @@ interactions: ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 402c2b36-368d-4dc0-ab58-750bba36d03f + apim-request-id: ed504e74-9fec-48e8-ac52-a86f8892198f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:31:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK @@ -94,23 +94,23 @@ interactions: ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 434c280f-c230-4f1f-8487-e662af1c0644 + apim-request-id: 9a323d32-d072-48fd-8367-ef4ad6870e82 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_no_result_attribute.yaml index 7ba9811922399..88865599d15f3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_no_result_attribute.yaml @@ -3,24 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '61' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 0554e944-c14e-4a8f-a1b3-ebf8b6f9b358 + apim-request-id: d5a472b6-1edc-4599-8821-e49478df5508 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_nonexistent_attribute.yaml index 270eaa7a54a8f..13cd5c4fd4739 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,24 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '61' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 2d0972f1-9c05-4171-a6b1-bb5dc1cb2bba + apim-request-id: 029b28d2-cc40-4a34-959d-42b9c294771c content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_errors.yaml index 2a93dc4039958..700e5edba8731 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_errors.yaml @@ -5,13 +5,13 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '5228' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -22,11 +22,11 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations - see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2019-10-01"}' + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 0546eff8-748b-4af5-a8f3-8e6d7b5c0c7d + apim-request-id: ede6d4ca-785a-486a-9dc5-98dd9ddf49a7 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_warnings.yaml index 70f18ef114543..3492dec96410d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_warnings.yaml @@ -4,27 +4,27 @@ interactions: :''(", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '101' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: af357aca-1a06-4cea-bcb9-e3d46a068965 + apim-request-id: dc8ec15d-37a9-4721-8893-f7c40ee19c60 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '5' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_duplicate_ids_error.yaml index 7a19130126a9d..8def0b727f931 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_duplicate_ids_error.yaml @@ -5,13 +5,13 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '156' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -19,9 +19,9 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: 8eb45a08-cafe-4a18-bf95-1ebbb4c20441 + apim-request-id: 521d96d9-27de-406c-8f44-86116d5f8df8 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_empty_credential_class.yaml index 165c5b8e8a7f0..078bbe69888c6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_empty_credential_class.yaml @@ -4,13 +4,13 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '88' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -20,7 +20,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_all_errors.yaml index 586e2c97efc6e..7e63a6326570e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_all_errors.yaml @@ -6,13 +6,13 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '5320' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -27,11 +27,11 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations - see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2019-10-01"}' + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: fca43c30-c24b-4707-b788-64eedc0658da + apim-request-id: 93b02a6d-c74a-4d2c-bec6-580ab871a0ff content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:44 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_some_errors.yaml index 2dfcc26980eee..3f305c975d136 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_some_errors.yaml @@ -7,13 +7,13 @@ interactions: "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '341' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -23,16 +23,16 @@ interactions: hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code."}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text - is empty."}}}],"modelVersion":"2019-10-01"}' + is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 46640073-4a4d-437a-8502-6436ddc59e2b + apim-request-id: 9ba14560-a138-4864-bbae-c29b4f6fb98f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2 - date: Fri, 24 Jul 2020 16:32:44 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_docs.yaml index 341a6ec9d24da..ff939534669f3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_docs.yaml @@ -4,13 +4,13 @@ interactions: States"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '83' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -18,15 +18,15 @@ interactions: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Country Hint.","innererror":{"code":"InvalidCountryHint","message":"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country - code."}}}],"modelVersion":"2019-10-01"}' + code."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e4ad770a-7a0e-455c-bedf-514223112e62 + apim-request-id: a54910c4-d980-4ae9-a3f6-80b95aa34534 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:44 GMT + date: Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_method.yaml index aaee341861d2c..75bd37f500922 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_method.yaml @@ -4,13 +4,13 @@ interactions: States"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '83' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -18,15 +18,15 @@ interactions: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Country Hint.","innererror":{"code":"InvalidCountryHint","message":"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country - code."}}}],"modelVersion":"2019-10-01"}' + code."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 453f65f8-a508-4786-aa17-51ea1572d655 + apim-request-id: 94eb9023-1437-499c-ab58-04eca171745f content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_out_of_order_ids.yaml index 94302c744d7e5..3d1a15cecbd27 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_out_of_order_ids.yaml @@ -6,29 +6,29 @@ interactions: ":D", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '256' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: string: '{"documents":[{"id":"56","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"0","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"19","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: efd59133-9888-4938-b865-3bbfb894cb57 + apim-request-id: 6f66098d-ff9a-4ef5-8feb-79e1d4d56db6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_output_same_order_as_input.yaml index 14bd8b474e8da..0fba57b36e7ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_output_same_order_as_input.yaml @@ -6,27 +6,27 @@ interactions: "five", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '264' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"5","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"5","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 566ba137-d50b-4e9c-af1c-68fade3ee438 + apim-request-id: 56bd9bb6-7488-41a3-bcf2-f232ba40615e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_pass_cls.yaml index e6ecd56442e9f..3c54f88383224 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_pass_cls.yaml @@ -4,27 +4,27 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '89' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e5129bae-469f-41a2-bc8f-2a74718a640f + apim-request-id: 75c58116-303f-44c7-9e51-3ab6643858e2 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_passing_only_string.yaml index 03e233da9e79b..4660f4d7db532 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_passing_only_string.yaml @@ -7,29 +7,29 @@ interactions: "countryHint": "US"}, {"id": "4", "text": "", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '400' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":1.0},"warnings":[]}],"errors":[{"id":"4","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: fa0ec23e-1bc1-41ca-8d06-fa4096707af9 + apim-request-id: 06f0c8cd-a589-4681-b91c-2dc62a11a47c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_per_item_dont_use_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_per_item_dont_use_country_hint.yaml index 7a5ff91039700..5a50284383e88 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_per_item_dont_use_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_per_item_dont_use_country_hint.yaml @@ -6,27 +6,27 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '245' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 33359a13-be2b-41eb-bdd0-5e62ba465326 + apim-request-id: d351a823-0b38-4e64-8ec1-59e9220265af content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_rotate_subscription_key.yaml index 7d6795d9b36f2..68e397ce83991 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_rotate_subscription_key.yaml @@ -6,27 +6,27 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e5259fef-6a15-483f-987c-02841de95064 + apim-request-id: 44a64bdb-8d97-4b2f-bae4-12783dfd5683 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK @@ -38,13 +38,13 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: @@ -54,7 +54,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT status: code: 401 message: PermissionDenied @@ -66,23 +66,23 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 7c866ffa-9002-44d1-b5af-0f9f5806b5de + apim-request-id: 5a16ef2b-475f-435d-af7c-2ff7b3ba8ea6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_show_stats_and_model_version.yaml index 537e41983b4fc..dcdc20b8daf40 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_show_stats_and_model_version.yaml @@ -6,25 +6,25 @@ interactions: ":D", "countryHint": "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '256' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 659acbc9-62e9-4685-9a80-555c2e4aa6bd + apim-request-id: 29c7fe41-5ef7-4c99-926e-b6792bc0f955 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:31:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..ffe37cfe28b9a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "countryHint": + "US"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '78' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/languages?showStats=false + response: + body: + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 47af96c0-79c3-4c15-a512-c04846d22165 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 19:32:00 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '7' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.0/languages?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_user_agent.yaml index 251fbda17f82a..394c72cee91ab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_user_agent.yaml @@ -6,27 +6,27 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 221b50d8-3ed8-42ea-be97-08eca6cd869a + apim-request-id: bf520109-b746-4465-a51c-b4c33b7662c1 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint.yaml index a4f8d277a6cff..8fef2c95010e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint.yaml @@ -6,27 +6,27 @@ interactions: was not as good as I hoped.", "countryHint": "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '288' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: eec8dafd-4162-4eab-a1d4-dcd948c67559 + apim-request-id: 078d9ac2-8eab-40c7-ad87-f51f3ee47850 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:32:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_input.yaml index 4e40f9a883292..3c296c4cbf51e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_input.yaml @@ -6,27 +6,27 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: cd3971ab-59dd-4ff7-9ce9-1d018861b070 + apim-request-id: 7d01f61d-a73f-472f-9355-804d93dd353a content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:45 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '15' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_per_item_hints.yaml index 93391c2bf70c6..0d96814f85ab4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_per_item_hints.yaml @@ -6,27 +6,27 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 2f6bc694-d58e-4e53-80ea-52b4d0b06065 + apim-request-id: 24db7660-800e-4838-b722-7ff432fe5db0 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_input.yaml index 0bd48495a3166..960ceb04a02f4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_input.yaml @@ -6,23 +6,23 @@ interactions: "CA"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '262' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 1712442a-1b0d-4ee1-ae42-c4851e9dcbea + apim-request-id: 6023081f-d74f-4f6d-a0b0-90b53fcaf16d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:46 GMT + date: Thu, 27 Aug 2020 19:32:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_per_item_hints.yaml index b0c6dab20fbf6..b295aac8e2012 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_per_item_hints.yaml @@ -6,23 +6,23 @@ interactions: "US"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '262' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 3835547e-2543-47e5-8ab7-06f610de2366 + apim-request-id: f600c3ad-6936-4d61-8504-c585dee89dd8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_dont_use_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_dont_use_country_hint.yaml index 3a67ae1e2d8d1..e1a7261b5c0b2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_dont_use_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_dont_use_country_hint.yaml @@ -6,23 +6,23 @@ interactions: was not as good as I hoped.", "countryHint": ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '282' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/languages?showStats=false response: body: - string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 88426c3b-36c1-4832-8f78-da90b1110622 + apim-request-id: a4530c89-b739-4b50-a2cc-ee213f0210df content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfc.yaml new file mode 100644 index 0000000000000..2f87f0a1e0628 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfc.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "a\u00f1o SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '83' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":9,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - b7b05bef-1c1e-4c6b-a8bf-84c3a401c6b1 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:37 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '64' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfd.yaml new file mode 100644 index 0000000000000..322c441042fcb --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfd.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "an\u0303o SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '84' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 097b0d6d-4a0b-42eb-894f-a40c40898515 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:37 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '65' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji.yaml new file mode 100644 index 0000000000000..2645816530295 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":7,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 6ba0ba8d-5278-4118-838b-d9bcde8ff3bf + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:38 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '63' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family.yaml new file mode 100644 index 0000000000000..7ac9fc554c7f0 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67 + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '141' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":13,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 1e2551dd-a250-48b0-9467-5794386c268e + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:37 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '77' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family_with_skin_tone_modifier.yaml new file mode 100644 index 0000000000000..3c7f8df55410d --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family_with_skin_tone_modifier.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\ud83c\udffb\u200d\ud83d\udc69\ud83c\udffd\u200d\ud83d\udc67\ud83c\udffe\u200d\ud83d\udc66\ud83c\udfff + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '189' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":17,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - d6fc0237-d843-48af-84f8-2b9797cdb70a + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:38 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '66' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_with_skin_tone_modifier.yaml new file mode 100644 index 0000000000000..b7a4a06293c39 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_with_skin_tone_modifier.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\ud83c\udffb SSN: 859-98-0987", + "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 1e4fc8d1-3655-46f6-b901-40d6d845adf9 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:39 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '69' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfc.yaml new file mode 100644 index 0000000000000..2c0106690aee7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfc.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\uc544\uac00 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 8a681705-efe1-45e4-a9d5-d94ed8b4180d + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:39 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '90' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfd.yaml new file mode 100644 index 0000000000000..8b35e48eb354a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfd.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\uc544\uac00 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 3f67ef37-e3ff-40d7-8f4c-a6cb5e47814a + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:40 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '62' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_zalgo_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_zalgo_text.yaml new file mode 100644 index 0000000000000..e1bea5c14033e --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_zalgo_text.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "o\u0335\u0308\u0307\u0312\u0303\u034b\u0307\u0305\u035b\u030b\u035b\u030e\u0341\u0351\u0304\u0310\u0302\u030e\u031b\u0357\u035d\u0333\u0318\u0318\u0355\u0354\u0355\u0327\u032d\u0327\u031f\u0319\u034e\u0348\u031e\u0322\u0354m\u0335\u035d\u0315\u0304\u030f\u0360\u034c\u0302\u0311\u033d\u034d\u0349\u0317g\u0335\u030b\u0352\u0344\u0360\u0313\u0312\u0308\u030d\u030c\u0343\u0305\u0351\u0312\u0343\u0305\u0305\u0352\u033f\u030f\u0301\u0357\u0300\u0307\u035b\u030f\u0300\u031b\u0344\u0300\u030a\u033e\u0340\u035d\u0314\u0349\u0322\u031e\u0321\u032f\u0320\u0324\u0323\u0355\u0322\u031f\u032b\u032b\u033c\u0330\u0353\u0345\u0321\u0328\u0326\u0321\u0356\u035c\u0327\u0323\u0323\u034e + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '750' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":121,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 086748cd-3c3a-4a96-8ff5-54a18ee1da31 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 16:54:40 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '105' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfc.yaml new file mode 100644 index 0000000000000..44c2db3f0fbc9 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfc.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "a\u00f1o SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '83' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":9,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: c1e06ef5-99e6-4dbb-98b5-49c393850029 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:26 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '70' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfd.yaml new file mode 100644 index 0000000000000..1034262b85cad --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfd.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "an\u0303o SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '84' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 67e2e849-6c82-4e45-bf6c-9d2d0c8fb9c1 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:27 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '76' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji.yaml new file mode 100644 index 0000000000000..4c54a36690130 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":7,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 2839f9cd-a984-4a35-93fc-04bf01a60278 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:28 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '72' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family.yaml new file mode 100644 index 0000000000000..05531c4dbe148 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67 + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '141' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":13,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 205151ba-0a8f-487a-a739-8147ba8e26c2 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:28 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '79' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family_with_skin_tone_modifier.yaml new file mode 100644 index 0000000000000..221a6307f04d8 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family_with_skin_tone_modifier.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\ud83c\udffb\u200d\ud83d\udc69\ud83c\udffd\u200d\ud83d\udc67\ud83c\udffe\u200d\ud83d\udc66\ud83c\udfff + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '189' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":17,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 8cc9f9b3-612c-436d-b612-c2d321e737f9 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:28 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '73' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_with_skin_tone_modifier.yaml new file mode 100644 index 0000000000000..dac51a3c746c9 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_with_skin_tone_modifier.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\ud83c\udffb SSN: 859-98-0987", + "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 79412dc8-ab27-4391-8b4e-255a46b70825 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:29 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '65' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfc.yaml new file mode 100644 index 0000000000000..3e0a77bc08cbc --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfc.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\uc544\uac00 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 0cc02e64-ef60-422c-b902-2959e93e5e1e + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:29 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '68' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfd.yaml new file mode 100644 index 0000000000000..95bde5c165244 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfd.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\uc544\uac00 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: b4367770-eedf-416b-b8ee-a5dd1361ac92 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:29 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '70' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_zalgo_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_zalgo_text.yaml new file mode 100644 index 0000000000000..d574bbb6eec6a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_zalgo_text.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "o\u0335\u0308\u0307\u0312\u0303\u034b\u0307\u0305\u035b\u030b\u035b\u030e\u0341\u0351\u0304\u0310\u0302\u030e\u031b\u0357\u035d\u0333\u0318\u0318\u0355\u0354\u0355\u0327\u032d\u0327\u031f\u0319\u034e\u0348\u031e\u0322\u0354m\u0335\u035d\u0315\u0304\u030f\u0360\u034c\u0302\u0311\u033d\u034d\u0349\u0317g\u0335\u030b\u0352\u0344\u0360\u0313\u0312\u0308\u030d\u030c\u0343\u0305\u0351\u0312\u0343\u0305\u0305\u0352\u033f\u030f\u0301\u0357\u0300\u0307\u035b\u030f\u0300\u031b\u0344\u0300\u030a\u033e\u0340\u035d\u0314\u0349\u0322\u031e\u0321\u032f\u0320\u0324\u0323\u0355\u0322\u031f\u032b\u032b\u033c\u0330\u0353\u0345\u0321\u0328\u0326\u0321\u0356\u035c\u0327\u0323\u0323\u034e + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '750' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":121,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 39bf984b-dcfd-45b9-ae83-e4d1fedebc73 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 16:55:30 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '111' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_dict.yaml index 2c495c14818a4..f6f2444cc22cf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_dict.yaml @@ -5,7 +5,7 @@ interactions: por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,23 +15,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=true response: body: string: '{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":50,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["Bill - Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":49,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":49,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - a1dc5e5b-6b95-4fba-8c0f-72fa4b1fc8cf + - 8c809bfa-dfb7-4940-8f8a-d0a187dee764 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_text_document_input.yaml index f9945d6ddc85a..1569790b733b2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_text_document_input.yaml @@ -5,7 +5,7 @@ interactions: por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,22 +15,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]},{"id":"2","keyPhrases":["Bill - Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 12f1524e-96a6-4bfa-b3be-a231085521e5 + - f91c579b-c63d-44ad-a2cc-27786bfdb06f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '14' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_credentials.yaml index 0548ef9ceaa2a..fdba609464e48 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_credentials.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:32:03 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_model_version_error.yaml index 7232fb03e2cf7..ed3e47989f311 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_model_version_error.yaml @@ -4,7 +4,7 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?model-version=bad&showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2019-10-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-07-01"}}}' headers: apim-request-id: - - 7fdf22bd-feb4-4eb4-96ec-5dbdaba47725 + - 35230203-617a-499d-882b-69b5582c029f content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit.yaml index f210131573f31..c040ca3ef458f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit.yaml @@ -748,7 +748,7 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - 508b2e5b-6400-4b8d-a9e5-99d3a80ef225 + - 765c9dcf-db9e-4391-a77e-8e4f8183aac5 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '88' + - '11' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit_error.yaml index fbc706fdee32e..d4719673fd200 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit_error.yaml @@ -713,7 +713,7 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - b405b156-5759-48fe-aec9-9da3099f23bc + - 4fce46a8-a05c-4e0d-b10a-056e0d63f995 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '28' + - '13' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_client_passed_default_language_hint.yaml index 6966617c9a8aa..cda6e588f9428 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_client_passed_default_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["the park","I will go"],"warnings":[]},{"id":"2","keyPhrases":["I did not like the hotel we stayed at"],"warnings":[]},{"id":"3","keyPhrases":["The - restaurant had really good food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + restaurant had really good food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 24393168-ca16-430e-aee9-2de400735e3c + - 8a7afaa7-8dab-40f2-856f-bbb2d03c45c7 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '8' status: code: 200 message: OK @@ -51,7 +51,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -61,22 +61,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - fb2f575c-9b11-49a0-8621-a95f3666b588 + - 3e2cdc27-5e43-4651-abe5-0e42ca083d68 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -84,7 +84,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '11' status: code: 200 message: OK @@ -95,7 +95,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -105,23 +105,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["the park","I will go"],"warnings":[]},{"id":"2","keyPhrases":["I did not like the hotel we stayed at"],"warnings":[]},{"id":"3","keyPhrases":["The - restaurant had really good food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + restaurant had really good food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 7aa045c3-3683-4d9c-8a8f-d21779493dd7 + - b3751022-8e82-474e-ab65-15604c0e9ffd content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_no_result_attribute.yaml index 815fe02f44f48..566cf263ce9ce 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_no_result_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,23 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - bac7a530-8e51-487a-b285-90e68e599ba3 + - b5faefe5-0260-456d-94b3-c9f5714dc861 content-type: - application/json; charset=utf-8 - csp-billing-usage: - - CognitiveServices.TextAnalytics.BatchScoring=0 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_nonexistent_attribute.yaml index cb661c47d74d9..4aa35b1244bf4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,23 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - eda65839-3f7c-4f65-b9ed-5b879c35221c + - ba2c1c33-7cfd-405f-a86e-41747a42f05a content-type: - application/json; charset=utf-8 - csp-billing-usage: - - CognitiveServices.TextAnalytics.BatchScoring=0 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_errors.yaml index 48432d780a0a6..543eeae5055ee 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_errors.yaml @@ -6,7 +6,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,7 +16,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -25,20 +25,18 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations - see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2019-10-01"}' + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - d6e92877-5f9c-4b01-b176-1147f3b903d5 + - 02f05987-1d24-48b1-8f3c-84f9857bd73c content-type: - application/json; charset=utf-8 - csp-billing-usage: - - CognitiveServices.TextAnalytics.BatchScoring=0 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -46,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_warnings.yaml index de00b99991ab9..f997cc5e60013 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_warnings.yaml @@ -4,7 +4,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,23 +14,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost"],"warnings":[{"code":"LongWordsInDocument","message":"The document contains very long words (longer than 64 characters). These words - will be truncated and may result in unreliable model predictions."}]}],"errors":[],"modelVersion":"2019-10-01"}' + will be truncated and may result in unreliable model predictions."}]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 9db1eddc-bf89-4fe6-867a-f33ae45bcdf8 + - dd291596-55f6-432a-a98c-bd79ae69101f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_duplicate_ids_error.yaml index 3cc8dde17dc4e..9e8048f4d1991 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_duplicate_ids_error.yaml @@ -4,7 +4,7 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -23,11 +23,11 @@ interactions: contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 0e5ee702-318b-4dc2-aed2-0ce3491d6de4 + - 10e10210-ca39-4490-ae96-459f344ed8b0 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '115' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_empty_credential_class.yaml index 6ad43a5093b7a..d68bfe892a34f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_empty_credential_class.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:04 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_all_errors.yaml index 6c7b4b4134f3f..ea52f6f907faf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_all_errors.yaml @@ -5,7 +5,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,25 +15,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 3f113b25-f3d0-4a67-b2b5-dcb8288cfb44 + - 74c5949f-4d41-4437-8364-fbb292b93de5 content-type: - application/json; charset=utf-8 - csp-billing-usage: - - CognitiveServices.TextAnalytics.BatchScoring=0 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_some_errors.yaml index 3516d4c89dd8f..cc8258ede163b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_some_errors.yaml @@ -5,7 +5,7 @@ interactions: fundado por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,23 +15,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}}],"modelVersion":"2019-10-01"}' + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 30a860fe-3391-4efe-95f8-0f6646540be6 + - 34c0d335-a14e-4cc8-965a-451d0d93df60 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_docs.yaml index 72263bd6365a3..c577efe592f2c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_docs.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,23 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}}],"modelVersion":"2019-10-01"}' + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - f8f1d7bf-d734-472f-97e2-f247a51e7f13 + - ae0efed4-0635-4804-80c9-189b4a8b9e67 content-type: - application/json; charset=utf-8 - csp-billing-usage: - - CognitiveServices.TextAnalytics.BatchScoring=0 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_method.yaml index 8ef63985d834c..3f0985fb2ff38 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_method.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,23 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}}],"modelVersion":"2019-10-01"}' + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - d68bc80b-dc0c-4786-9bb8-fd9fbf4b8560 + - a765f7bd-3f35-4288-962f-c24887183a55 content-type: - application/json; charset=utf-8 - csp-billing-usage: - - CognitiveServices.TextAnalytics.BatchScoring=0 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_language_kwarg_spanish.yaml index 086c9ddbdebc6..305e78dc1c551 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_language_kwarg_spanish.yaml @@ -4,7 +4,7 @@ interactions: "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","keyPhrases":["Bill - Gates","the CEO of Microsoft"],"statistics":{"charactersCount":35,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + Gates","the CEO of Microsoft"],"statistics":{"charactersCount":35,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - eda5bd78-7e7e-456f-a018-84b3de5100d1 + - 452a909d-1ffd-4e2c-b221-ab27332acc4a content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_out_of_order_ids.yaml index 576c9b2623a7a..a855727ff57c7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_out_of_order_ids.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - b82efbe6-b285-460b-9bf6-cdca01f4e9bd + - 1a5d9f0b-17de-4307-925d-70df21b90419 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:46 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_output_same_order_as_input.yaml index a7ac8e322290f..b567edfbabdbb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_output_same_order_as_input.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: - string: '{"documents":[{"id":"1","keyPhrases":[],"warnings":[]},{"id":"2","keyPhrases":[],"warnings":[]},{"id":"3","keyPhrases":[],"warnings":[]},{"id":"4","keyPhrases":[],"warnings":[]},{"id":"5","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","keyPhrases":[],"warnings":[]},{"id":"2","keyPhrases":[],"warnings":[]},{"id":"3","keyPhrases":[],"warnings":[]},{"id":"4","keyPhrases":[],"warnings":[]},{"id":"5","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - f50c1b4c-5d74-4f2f-b5e7-28b3d1d74ea4 + - c63a6ec1-1f9e-4bd0-8066-47aa408b5d58 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_pass_cls.yaml index d69aa0a38bf67..7b09521e001f3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_pass_cls.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: - string: '{"documents":[{"id":"0","keyPhrases":["Test","cls","endpoint"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","keyPhrases":["Test","cls","endpoint"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - e0a05ba4-8350-4aa4-aae2-c89993bffd3e + - 95e49418-cd74-4fdc-99bc-3b4ba54e4554 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_passing_only_string.yaml index 0d276d91beab2..d7435dd42bf0a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_passing_only_string.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,7 +16,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -24,16 +24,16 @@ interactions: string: '{"documents":[{"id":"0","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]},{"id":"1","keyPhrases":["Microsoft fue fundado por Bill Gates y Paul Allen"],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - ca9315ad-43b8-465e-8b18-c53bdb1bad8e + - c9e6c66b-0dd7-4c1d-b8c6-bde37ea9e17f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_per_item_dont_use_language_hint.yaml index 015efc4467848..a2d29b70c1289 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_per_item_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 19ac7e4f-11c9-47c2-910f-ab2ae479369d + - 628c5d5a-01ba-477a-b0a5-e6a9cec6d8a3 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11' + - '13' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_rotate_subscription_key.yaml index ae749752ecf86..835ca1f4be610 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_rotate_subscription_key.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - ca90ad95-949c-49fa-a1c6-2a93cdbea9fb + - f09acd7a-a38a-457d-8f5d-1441279fef76 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '10' status: code: 200 message: OK @@ -50,7 +50,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -60,7 +60,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -72,7 +72,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:04 GMT status: code: 401 message: PermissionDenied @@ -83,7 +83,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -93,22 +93,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 08e53e9a-da68-4250-bc3a-716276d08480 + - 3e46455a-dcaa-4a75-b1a4-bc47e60382d4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -116,7 +116,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_show_stats_and_model_version.yaml index 7ec0aa6f1d5b3..74c70091d1614 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_show_stats_and_model_version.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - b2dd2681-05ed-49a4-9a6d-f1e3abc0d838 + - be3aa999-8aee-4074-acbf-7f460b39ca22 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..65367345780bf --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '75' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/keyPhrases?showStats=false + response: + body: + string: '{"documents":[{"id":"0","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 03a7a93c-8aed-4c4b-8b6e-3e3dfa3aa5c6 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 19:32:04 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '10' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_too_many_documents.yaml index 87c592983e99c..7d0455583e701 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_too_many_documents.yaml @@ -9,7 +9,7 @@ interactions: {"id": "10", "text": "Eleven", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -19,7 +19,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -28,11 +28,11 @@ interactions: request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - 09909bc1-25c2-4215-a2d8-c6114e761a7b + - 31ba95e0-e8ca-43a1-933e-d6de696f076a content-type: - application/json; charset=utf-8 date: - - Tue, 04 Aug 2020 21:24:45 GMT + - Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_user_agent.yaml index ac51c536f619a..9e4a3bb602bea 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_user_agent.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 7712c14a-3f22-4b1b-9378-cded10398f1f + - 6e63dfb6-98c6-4c68-82f5-9860dfb2f23c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_dont_use_language_hint.yaml index 0642e4d6ccb0a..016c14c44643f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: - string: '{"documents":[{"id":"0","keyPhrases":["best day","life"],"warnings":[]},{"id":"1","keyPhrases":["hotel"],"warnings":[]},{"id":"2","keyPhrases":["restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","keyPhrases":["best day","life"],"warnings":[]},{"id":"1","keyPhrases":["hotel"],"warnings":[]},{"id":"2","keyPhrases":["restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - dcbc480a-b83b-4875-951d-b1f0808781ff + - 5698f2bc-a52f-4900-b134-b6069ff194ae content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '15' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint.yaml index acb236b7fe7f8..cf73874729128 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["This was the best day","my"],"warnings":[]},{"id":"1","keyPhrases":["like the hotel we stayed","It was too expensive","I did"],"warnings":[]},{"id":"2","keyPhrases":["as - good as I hoped","The restaurant was"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + good as I hoped","The restaurant was"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 591564a0-8960-4793-a5ed-27b29b170cfd + - dcc815ee-6fb8-411b-a0de-11c47ad894b9 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 709c70cb588c6..292d60c1669bc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["the park","I will go"],"warnings":[]},{"id":"2","keyPhrases":["I did not like the hotel we stayed at"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 3035fd59-72f5-4179-aaf1-a205b8757b5d + - 896079b0-89c7-4e37-87db-37bf52b61227 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:47 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_input.yaml index aa90729092a6e..3ee813d50be01 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,7 +6,7 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,7 +16,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -25,16 +25,16 @@ interactions: \ to the veterinarian\"],\"warnings\":[]},{\"id\":\"4\",\"keyPhrases\":[\"\ Espa\xF1ol\",\"Este\",\"un document escrito\"],\"warnings\":[]},{\"id\":\"\ 3\",\"keyPhrases\":[\"\u732B\u306F\u5E78\u305B\"],\"warnings\":[]}],\"errors\"\ - :[],\"modelVersion\":\"2019-10-01\"}" + :[],\"modelVersion\":\"2020-07-01\"}" headers: apim-request-id: - - 663df110-444c-4687-bb63-fa20b4d13725 + - e774b347-2da9-4aab-8e32-85a9f8944c9e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 800922c5a2645..107368271aa3c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,7 +16,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -25,16 +25,16 @@ interactions: ,\"the veterinarian\"],\"warnings\":[]},{\"id\":\"2\",\"keyPhrases\":[\"document\ \ escrito\",\"Espa\xF1ol\"],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\"\ :[\"\u732B\u306F\u5E78\u305B\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ - :\"2019-10-01\"}" + :\"2020-07-01\"}" headers: apim-request-id: - - 976fb829-fca1-461b-9365-4e8d496841e0 + - 322052c8-551d-4aa0-8f91-35d612dc91e9 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:48 GMT + - Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_dict.yaml index e348ccce2359c..d716556b8fc12 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_dict.yaml @@ -5,29 +5,29 @@ interactions: por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '200' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=true response: body: string: '{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":50,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["Bill - Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":49,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":49,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 464b770a-6eba-46c4-90b1-4aee87689925 + apim-request-id: 72525c4e-9e54-4aa2-bc53-046e905c9a0a content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_text_document_input.yaml index 75571dc691bf4..36eb337dfdf11 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_text_document_input.yaml @@ -5,28 +5,28 @@ interactions: por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '200' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]},{"id":"2","keyPhrases":["Bill - Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 52d19de4-ae26-435c-8c3a-6adb16619cca + apim-request-id: 38098dc0-f282-446c-b5df-922dcf78775d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_credentials.yaml index 957dcaabd35fa..58b22b2643263 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_credentials.yaml @@ -4,13 +4,13 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -20,7 +20,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:50 GMT + date: Thu, 27 Aug 2020 19:32:08 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_model_version_error.yaml index af73617e8de39..011d887c35e7a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_model_version_error.yaml @@ -4,27 +4,27 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '101' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?model-version=bad&showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2019-10-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-07-01"}}}' headers: - apim-request-id: 2fb9b99b-0e5f-41c6-91eb-7d089b18eb3c + apim-request-id: b10aa9f0-fd79-4cf9-827a-ad2007266291 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '6' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit.yaml index 9f6d45a9e1c17..2332e2766a118 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit.yaml @@ -748,27 +748,27 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58755' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: bf8d8f75-d1cc-4a1f-ac3a-19305d8affd0 + apim-request-id: bfa5eacb-8f89-486a-8652-286ced10984d content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '35' + x-envoy-upstream-service-time: '10' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit_error.yaml index 693910a6250cd..43fbb4f31abb6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit_error.yaml @@ -713,27 +713,27 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '55962' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 16b64a34-7382-45f0-abd6-c3a2245ffea1 + apim-request-id: c320967b-855b-4d97-ab37-fa6c1b4434e3 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:50 GMT + date: Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '19' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_client_passed_default_language_hint.yaml index c37b01483b154..f444df3409737 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_client_passed_default_language_hint.yaml @@ -6,29 +6,29 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["the park","I will go"],"warnings":[]},{"id":"2","keyPhrases":["I did not like the hotel we stayed at"],"warnings":[]},{"id":"3","keyPhrases":["The - restaurant had really good food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + restaurant had really good food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 3fea7699-b489-4d16-befe-a15b61dd98bc + apim-request-id: 03eeac48-4618-495f-a5c6-252ecd1ffd29 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK @@ -40,28 +40,28 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 78f8ac1e-1eda-42b5-89d8-1c6e03d095cd + apim-request-id: 16dcb319-f28a-4cf2-b842-a7de3c9c45fa content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK @@ -73,29 +73,29 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["the park","I will go"],"warnings":[]},{"id":"2","keyPhrases":["I did not like the hotel we stayed at"],"warnings":[]},{"id":"3","keyPhrases":["The - restaurant had really good food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + restaurant had really good food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: f454c8b4-7e92-45da-ac98-62d6f080ac74 + apim-request-id: 00049009-5234-40ea-93a4-ae0ae3ecbe55 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:50 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_no_result_attribute.yaml index 85862cbb606f8..ece414ae86be3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_no_result_attribute.yaml @@ -3,29 +3,28 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: beb8aede-873f-43f1-ae0c-da559b8db8ef + apim-request-id: 55f3b42a-8ede-453a-af5b-b52ed52d9ac7 content-type: application/json; charset=utf-8 - csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=0 - date: Fri, 24 Jul 2020 16:32:50 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_nonexistent_attribute.yaml index 8747168d77bf2..324a8fa943cd7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,25 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: f73240a0-3f35-4ce7-876a-a9bd7756d3b7 + apim-request-id: 0fe75926-9003-48b7-a39e-5dd2f7406593 content-type: application/json; charset=utf-8 - csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=0 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_errors.yaml index 63c4981b1c4ea..eae3999679097 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_errors.yaml @@ -6,13 +6,13 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '5308' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -21,20 +21,19 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations - see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2019-10-01"}' + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 4035421d-154f-459b-aa89-76e8bf964b26 + apim-request-id: 6c350159-1e50-484e-9021-110ccaf4ae95 content-type: application/json; charset=utf-8 - csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=0 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_warnings.yaml index d3b33e2881e9d..4b0e58d5143b0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_warnings.yaml @@ -4,29 +4,29 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '413' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost"],"warnings":[{"code":"LongWordsInDocument","message":"The document contains very long words (longer than 64 characters). These words - will be truncated and may result in unreliable model predictions."}]}],"errors":[],"modelVersion":"2019-10-01"}' + will be truncated and may result in unreliable model predictions."}]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: ed062a5f-71a5-4c7e-bb2c-a3e4ecf91d34 + apim-request-id: 5658fa9e-daa9-41ed-a59f-4631ec3ec39e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_duplicate_ids_error.yaml index 917748bd55984..56144b3775063 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_duplicate_ids_error.yaml @@ -4,13 +4,13 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '150' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -18,13 +18,13 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: a0a74962-faea-471e-a3c8-7f7c589d6530 + apim-request-id: e30f5294-c146-49c9-bc32-1ceb00dc99a1 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_empty_credential_class.yaml index 68820e3601d34..93b4a34212499 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_empty_credential_class.yaml @@ -4,13 +4,13 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -20,7 +20,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:07 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_all_errors.yaml index fb949b1745601..d2d39cba918c9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_all_errors.yaml @@ -5,31 +5,30 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '156' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 872df718-1a9c-4980-b0ad-beeaa4a686b0 + apim-request-id: 785bc67c-d34b-4033-a443-ab63d2481dc6 content-type: application/json; charset=utf-8 - csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=0 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_some_errors.yaml index 6a6a7f6e64162..3038121dfbece 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_some_errors.yaml @@ -5,29 +5,29 @@ interactions: fundado por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '205' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}}],"modelVersion":"2019-10-01"}' + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: acc1d893-8446-4a6c-9430-c0c78e15c58b + apim-request-id: 35beb60a-646c-4d62-912d-262a93384e6f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:50 GMT + date: Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_docs.yaml index a47122c371dbd..9942ac5c81f6c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_docs.yaml @@ -4,29 +4,28 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}}],"modelVersion":"2019-10-01"}' + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: baf4943d-29d8-41d0-98c7-62ec2c9a249c + apim-request-id: b2fd402d-10ee-4fb7-8097-718b34a4156a content-type: application/json; charset=utf-8 - csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=0 - date: Fri, 24 Jul 2020 16:32:50 GMT + date: Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_method.yaml index 3442ff379ff22..5b5b8c9934cb1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_method.yaml @@ -4,29 +4,28 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: da,de,en,es,fi,fr,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv"}}}],"modelVersion":"2019-10-01"}' + language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 0953a5d2-ac21-4231-b2ca-80aa5b5cfa59 + apim-request-id: 057b77c4-6fdf-47ac-adbe-bb8234073fef content-type: application/json; charset=utf-8 - csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=0 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_language_kwarg_spanish.yaml index 2d90abe85eb3d..94a1fa7797e50 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_language_kwarg_spanish.yaml @@ -4,28 +4,28 @@ interactions: "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '93' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","keyPhrases":["Bill - Gates","the CEO of Microsoft"],"statistics":{"charactersCount":35,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + Gates","the CEO of Microsoft"],"statistics":{"charactersCount":35,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: adf9177c-740e-4b86-a2d0-0248f31e811e + apim-request-id: 0b00bf17-5026-4ecf-a2f6-630ae3ee2e99 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_out_of_order_ids.yaml index 422d3c16d2c3e..ff5fc0e54fb71 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_out_of_order_ids.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 0b0a2a0c-c8ba-4ec5-b784-f3ea7d2427bf + apim-request-id: 96fb143a-3d2b-47cd-8de4-d65b0a3ba6dd content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:47 GMT + date: Thu, 27 Aug 2020 19:32:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_output_same_order_as_input.yaml index 93e3e865b6622..e7bf8083b833f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_output_same_order_as_input.yaml @@ -6,27 +6,27 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: - string: '{"documents":[{"id":"1","keyPhrases":[],"warnings":[]},{"id":"2","keyPhrases":[],"warnings":[]},{"id":"3","keyPhrases":[],"warnings":[]},{"id":"4","keyPhrases":[],"warnings":[]},{"id":"5","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"1","keyPhrases":[],"warnings":[]},{"id":"2","keyPhrases":[],"warnings":[]},{"id":"3","keyPhrases":[],"warnings":[]},{"id":"4","keyPhrases":[],"warnings":[]},{"id":"5","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 6e5dcf93-10c4-4fb0-8927-8c72d8a3d789 + apim-request-id: 7637794f-baa4-4c53-91b4-e17b451137c9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_pass_cls.yaml index 08d6e479b828e..3228feb6b61fe 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_pass_cls.yaml @@ -4,27 +4,27 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '86' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: - string: '{"documents":[{"id":"0","keyPhrases":["Test","cls","endpoint"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","keyPhrases":["Test","cls","endpoint"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 6d3aabd0-1930-46d5-a7d8-1119e6a9b3bf + apim-request-id: d931d4b3-f9e0-41a6-ad28-3cf805beca41 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_passing_only_string.yaml index 3001b50982630..1f87d36f4ce47 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_passing_only_string.yaml @@ -6,13 +6,13 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '243' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -20,16 +20,16 @@ interactions: string: '{"documents":[{"id":"0","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]},{"id":"1","keyPhrases":["Microsoft fue fundado por Bill Gates y Paul Allen"],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: b570e13a-871e-447f-94b2-df06d49687ca + apim-request-id: 330fb0d2-efbb-4ad7-afb4-45afe937aa84 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_per_item_dont_use_language_hint.yaml index aa76cfea8e4ec..5a5f31264bcf2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_per_item_dont_use_language_hint.yaml @@ -6,28 +6,28 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '236' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e073e0bb-f79e-4988-bbfa-4234a11e54d1 + apim-request-id: 9a3dac39-dc9e-4348-9c53-2e5645778a34 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '14' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_rotate_subscription_key.yaml index 1683cb51c50ae..671a2f670d260 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_rotate_subscription_key.yaml @@ -6,28 +6,28 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: c5c76435-0a9f-44ea-bb29-96ecde9dd1a5 + apim-request-id: b5314678-cf9f-4a47-a356-f15088e76417 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK @@ -39,13 +39,13 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -55,7 +55,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT status: code: 401 message: PermissionDenied @@ -67,28 +67,28 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 3d1162fe-4397-4e24-8300-5735162763e1 + apim-request-id: a2ce2f43-b094-40c6-98e4-4406904ae07f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_show_stats_and_model_version.yaml index b3b9cd278b212..7b0d14310c5ed 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_show_stats_and_model_version.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2019-10-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e2903f20-e815-4a70-8c06-e2daaad408ea + apim-request-id: d425b732-39e5-487d-a95e-f061b173d29c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..610f9446b9548 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,31 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '75' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/keyPhrases?showStats=false + response: + body: + string: '{"documents":[{"id":"0","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 762e919f-014a-428c-ba41-bdb0b00dfec0 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 19:32:07 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '8' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.0/keyPhrases?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_too_many_documents.yaml index 0ec6cdfc833a1..86933d523f586 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_too_many_documents.yaml @@ -9,13 +9,13 @@ interactions: {"id": "10", "text": "Eleven", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '534' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -23,13 +23,13 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 93d95b37-de8d-4b41-80b6-7bb617d2658f + apim-request-id: 9fdefad7-45a7-4092-ba57-1748b69c408f content-type: application/json; charset=utf-8 - date: Tue, 04 Aug 2020 21:24:45 GMT + date: Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '3' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_user_agent.yaml index 1cc3067594092..1dbf2a321776c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_user_agent.yaml @@ -6,28 +6,28 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 0adeaded-6610-43a7-bd39-dfc2058d0522 + apim-request-id: 558b6377-7393-4c35-9203-00d4e35f0c55 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_dont_use_language_hint.yaml index b8d00f9fc54e6..e25301522beca 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_dont_use_language_hint.yaml @@ -6,27 +6,27 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '273' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: - string: '{"documents":[{"id":"0","keyPhrases":["best day","life"],"warnings":[]},{"id":"1","keyPhrases":["hotel"],"warnings":[]},{"id":"2","keyPhrases":["restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + string: '{"documents":[{"id":"0","keyPhrases":["best day","life"],"warnings":[]},{"id":"1","keyPhrases":["hotel"],"warnings":[]},{"id":"2","keyPhrases":["restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: eebf745d-da7e-4d36-9bd6-6043ddb2208f + apim-request-id: 4447d989-adaa-43b8-9719-cc72812ac927 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:50 GMT + date: Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint.yaml index 4438365ff9cef..e7c2781647c0d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint.yaml @@ -6,29 +6,29 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '279' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["This was the best day","my"],"warnings":[]},{"id":"1","keyPhrases":["like the hotel we stayed","It was too expensive","I did"],"warnings":[]},{"id":"2","keyPhrases":["as - good as I hoped","The restaurant was"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + good as I hoped","The restaurant was"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 6c82c32f-6052-4964-98b9-b2b1e74e51e9 + apim-request-id: 5f8ea8ba-d7da-43dd-b643-1d566940b60e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 28f0dbc7ef6fe..b90156f4c796d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["the park","I will go"],"warnings":[]},{"id":"2","keyPhrases":["I did not like the hotel we stayed at"],"warnings":[]},{"id":"3","keyPhrases":["restaurant","good - food"],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' + food"],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e484df49-591e-4abb-b2a1-423e001e2c2d + apim-request-id: 79b17942-eb17-44ba-86be-b259e82f9560 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:48 GMT + date: Thu, 27 Aug 2020 19:32:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_input.yaml index de6fffd8bb098..c8adc01754a04 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,13 +6,13 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -21,16 +21,16 @@ interactions: \ to the veterinarian\"],\"warnings\":[]},{\"id\":\"4\",\"keyPhrases\":[\"\ Espa\xF1ol\",\"Este\",\"un document escrito\"],\"warnings\":[]},{\"id\":\"\ 3\",\"keyPhrases\":[\"\u732B\u306F\u5E78\u305B\"],\"warnings\":[]}],\"errors\"\ - :[],\"modelVersion\":\"2019-10-01\"}" + :[],\"modelVersion\":\"2020-07-01\"}" headers: - apim-request-id: 5b1d04ff-ac44-45a5-bc93-ef5662f0530f + apim-request-id: 9f43f6eb-e9b8-401d-9e68-790910d15a95 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index ce4f0f23da891..28ff9bbcedf9a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,13 +6,13 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/keyPhrases?showStats=false response: @@ -21,16 +21,16 @@ interactions: ,\"the veterinarian\"],\"warnings\":[]},{\"id\":\"2\",\"keyPhrases\":[\"document\ \ escrito\",\"Espa\xF1ol\"],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\"\ :[\"\u732B\u306F\u5E78\u305B\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ - :\"2019-10-01\"}" + :\"2020-07-01\"}" headers: - apim-request-id: 36700dd7-4ea9-41e0-9476-5d063f1ff835 + apim-request-id: c32c9383-ddfd-4259-959b-7e2b52870d15 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:49 GMT + date: Thu, 27 Aug 2020 19:32:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_dict.yaml index ca94c5cd398b7..bc734b9a79547 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_dict.yaml @@ -7,7 +7,7 @@ interactions: und Paul Allen gegr\u00fcndet.", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":68,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -34,13 +34,13 @@ interactions: Allen","category":"Person","offset":52,"length":10,"confidenceScore":0.98}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - e3dfc9b0-ff48-46af-a97e-ed1646abcd2f + - 5c7589b2-b419-4825-b59c-50e65461301a content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -48,7 +48,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '88' + - '74' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_text_document_input.yaml index 383331f428a8d..ec7aadacf1ff3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_text_document_input.yaml @@ -7,7 +7,7 @@ interactions: und Paul Allen gegr\u00fcndet.", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -34,13 +34,13 @@ interactions: Allen","category":"Person","offset":52,"length":10,"confidenceScore":0.98}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 8971f287-f80e-49c1-a177-655d2160a528 + - a36aa787-18cd-4463-96cf-f74b47127196 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -48,7 +48,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '84' + - '76' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_credentials.yaml index 6b015f7602e6b..ed971840d8593 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_credentials.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:08 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_model_version_error.yaml index d7ed8fb43d12b..610fb2095ed4d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_model_version_error.yaml @@ -4,7 +4,7 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2020-04-01,2019-10-01,2020-02-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-02-01,2020-04-01"}}}' headers: apim-request-id: - - ce6f5d5a-370e-4cdc-9aa7-dd226a7a4863 + - 9feeeeba-1c5f-4957-8efa-ff0913ffee4e content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '12' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit.yaml index 9a6ffff436068..592ef2aaaab1c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit.yaml @@ -748,7 +748,7 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 11413a6a-19cc-499d-b510-7abf522c78c9 + - 75d1262f-3bc1-4276-9744-e9a47c8024ff content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '13' + - '11' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit_error.yaml index 3e17dc694447d..5cdd51ad3f3ec 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit_error.yaml @@ -713,7 +713,7 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 6b6dafcc-307b-4724-b4b4-fbdda466e279 + - d988e058-6f8e-4b79-9f76-dfade8770692 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '12' + - '18' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_client_passed_default_language_hint.yaml index 0f94473a2d140..90429b7d87bf2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_client_passed_default_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"I will go to the park","category":"Product","offset":0,"length":21,"confidenceScore":0.51}],"warnings":[]},{"id":"2","entities":[{"text":"hotel @@ -26,13 +26,13 @@ interactions: restaurant had really good food","category":"Organization","offset":0,"length":35,"confidenceScore":0.47}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 342b3816-dc70-4b3b-95e8-106e58e0b4e6 + - 05323e44-7781-475e-9d19-1bfa9a91c616 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '61' + - '62' status: code: 200 message: OK @@ -51,7 +51,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -61,21 +61,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 00a84aaa-fdcf-483d-85ce-2ef1dfac66e6 + - 4d7e9beb-c4fe-417d-8fba-0374409dd4bd content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -83,7 +83,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '73' + - '75' status: code: 200 message: OK @@ -94,7 +94,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -104,9 +104,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"I will go to the park","category":"Product","offset":0,"length":21,"confidenceScore":0.51}],"warnings":[]},{"id":"2","entities":[{"text":"hotel @@ -114,13 +114,13 @@ interactions: restaurant had really good food","category":"Organization","offset":0,"length":35,"confidenceScore":0.47}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - f0ec3d64-b04b-403e-bc89-c288f3fe7475 + - 9bdbaa9a-df0b-4510-a833-688a851a10ed content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -128,7 +128,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '81' + - '66' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_no_result_attribute.yaml index c4fddfd62061a..5672448f39013 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_no_result_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - d80ef079-8ec4-4c05-9aa4-29b1653ef594 + - 5c0880da-b4e7-42a1-8369-1a8636bd9f71 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_nonexistent_attribute.yaml index 89712ab2afc67..963eb4b2957b0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 5c7ee3ca-6114-464a-9769-60f5e3173194 + - f87fb7b3-6c37-46c5-b82c-0c6cfb583299 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_errors.yaml index 356ae67461029..c54cf641bd7c2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_errors.yaml @@ -6,7 +6,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -32,11 +32,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 22fde167-8a5f-48c0-92d6-dc9b182e9555 + - fdc7330c-dd28-4921-83f2-477f0cf019e4 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_warnings.yaml index 612d1d1012d5b..d691e6d8ca35d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_warnings.yaml @@ -4,7 +4,7 @@ interactions: :''(", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - cce93ad3-6587-4c7f-9cd9-c70935c8c98b + - 41bacd8d-52f1-4d60-824c-0a3ac1eb8c83 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '82' + - '71' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_duplicate_ids_error.yaml index 3606553dc3b1d..02de8b55f9b7f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_duplicate_ids_error.yaml @@ -4,7 +4,7 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 22777aa3-46e1-4f56-9b09-d5f8e2ed6b1f + - 172cfafc-6ec5-4d29-8882-e64afa579c2f content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_empty_credential_class.yaml index 0bf3e2c9b5026..9a38115b92ec3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_empty_credential_class.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:11 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_all_errors.yaml index ec8a08ec1faad..37f1c44001836 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_all_errors.yaml @@ -4,7 +4,7 @@ interactions: "Hola", "language": "Spanish"}, {"id": "3", "text": "", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -28,11 +28,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 6d299485-1450-403e-a59b-d7c9139cef37 + - d73521c0-24e7-4272-8117-6a9f3e7df7ed content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:49 GMT + - Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_some_errors.yaml index ed080baa71323..19703763f36ba 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_some_errors.yaml @@ -5,7 +5,7 @@ interactions: "language": "Spanish"}, {"id": "3", "text": "", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.8},{"text":"Bill @@ -30,13 +30,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 0c7cc811-d948-4c84-98d7-774033dfd78a + - f81a2833-a059-48a7-b0eb-350fb2fee079 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '90' + - '94' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_docs.yaml index 3fa77ef7ac1a9..8867317528bba 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_docs.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -24,11 +24,11 @@ interactions: language code. Supported languages: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - bdbdc474-4c6f-4347-aacf-e3f8254f1d55 + - 36835a20-0031-4f6c-8101-3daad544ee13 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_method.yaml index 0a30ef06b2e38..56a12e123dcaf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_method.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -24,11 +24,11 @@ interactions: language code. Supported languages: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 4122d8f9-dece-44fa-8013-762c68e5f39f + - c752207e-6636-42f7-b01c-0464fa3aabe8 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_language_kwarg_spanish.yaml index 37e4763744025..85b49c727fa41 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_language_kwarg_spanish.yaml @@ -4,7 +4,7 @@ interactions: "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.76},{"text":"CEO","category":"PersonType","offset":18,"length":3,"confidenceScore":0.66},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.38}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 298936b7-c69e-42a0-9a2d-022af7bb194e + - 29282959-f5f5-425e-916c-61989326b2eb content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '68' + - '58' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_no_offset_length_v3_categorized_entities.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_no_offset_length_v3_categorized_entities.yaml new file mode 100644 index 0000000000000..a890f3a988db8 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_no_offset_length_v3_categorized_entities.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/recognition/general?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.82},{"text":"Bill + Gates","category":"Person","offset":25,"length":10,"confidenceScore":0.84},{"text":"Paul + Allen","category":"Person","offset":40,"length":10,"confidenceScore":0.89}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 8ebab42d-0090-4d36-8e52-721f4c4b87d7 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 20:56:21 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '82' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_offset_length.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_offset_length.yaml new file mode 100644 index 0000000000000..260f798ecc10b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_offset_length.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.82},{"text":"Bill + Gates","category":"Person","offset":25,"length":10,"confidenceScore":0.84},{"text":"Paul + Allen","category":"Person","offset":40,"length":10,"confidenceScore":0.89}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - c588af7e-ff6c-4bca-9be0-bc50b81df611 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 18:31:19 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '80' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_out_of_order_ids.yaml index e4a82a33a073c..e1b33f29fa592 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_out_of_order_ids.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 29dc84bc-9b70-4330-a52d-12d9be9d78da + - 18af93af-808d-4053-977c-85825e531000 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '73' + - '66' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_output_same_order_as_input.yaml index aae6b9d409e17..fdb6f00b078ce 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_output_same_order_as_input.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"one","category":"Quantity","subcategory":"Number","offset":0,"length":3,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"two","category":"Quantity","subcategory":"Number","offset":0,"length":3,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"three","category":"Quantity","subcategory":"Number","offset":0,"length":5,"confidenceScore":0.8}],"warnings":[]},{"id":"4","entities":[{"text":"four","category":"Quantity","subcategory":"Number","offset":0,"length":4,"confidenceScore":0.8}],"warnings":[]},{"id":"5","entities":[{"text":"five","category":"Quantity","subcategory":"Number","offset":0,"length":4,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - e249c914-10ec-4c5f-9590-1f41588fe23d + - db897d3d-3817-4e49-a733-6e13b995e0ff content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '152' + - '63' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_pass_cls.yaml index 304715f4aa1ec..bf98859486119 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_pass_cls.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 164da941-5c73-4d83-8c1b-315cabcdd588 + - cbe49b39-fe2c-4be7-9680-5b6e3c82efa5 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '67' + - '92' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_passing_only_string.yaml index cc1c71b81d0ad..678be3f156745 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_passing_only_string.yaml @@ -8,7 +8,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -18,9 +18,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.81},{"text":"Bill @@ -34,13 +34,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 15d71555-b5cb-413d-9b3d-166b4758bb39 + - 6fce1383-5f90-486e-8d15-695fd8925073 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -48,7 +48,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '94' + - '112' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_per_item_dont_use_language_hint.yaml index abbd3bd809a77..b4db3184f5714 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_per_item_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - db979dc4-7d21-4303-b7f8-ccc249dd07c1 + - ac689e27-df80-4243-a238-220359a724e2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '145' + - '79' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_rotate_subscription_key.yaml index e76eb90795ad4..81ac11a9bc676 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_rotate_subscription_key.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 228b889f-1a77-4e5b-9684-8019d12fbee0 + - 71944a34-5635-41fc-ba73-ca70dbe9d3ad content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '108' + - '109' status: code: 200 message: OK @@ -49,7 +49,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -59,9 +59,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -71,7 +71,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:50 GMT + - Thu, 27 Aug 2020 19:32:11 GMT status: code: 401 message: PermissionDenied @@ -82,7 +82,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -92,21 +92,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 095e5155-4e34-4253-ab44-036cd49dc859 + - 6f2d0b0a-5963-48c7-b168-ee8b9de6ca6a content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -114,7 +114,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '83' + - '74' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_show_stats_and_model_version.yaml index f56b980e6b7f5..5f92c7f7d98bd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_show_stats_and_model_version.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 8111d7b3-6440-4173-af2d-c2cf6fc44a2d + - 6b8ca7ad-ccd3-4c67-88d9-b0f5e2a53029 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '69' + - '61' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..68753c5fe26e9 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '75' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/recognition/general?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 82cb67cb-e799-42df-aaee-5f1cc466d09c + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 19:32:08 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '61' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_too_many_documents.yaml index 84fa52b5bcfe1..5375e998225ca 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_too_many_documents.yaml @@ -6,7 +6,7 @@ interactions: "en"}, {"id": "5", "text": "Six", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,20 +16,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 7b7a85db-7d73-4d66-ad20-dfe39ba1a663 + - 375d6616-7707-452d-a54e-154a006f8214 content-type: - application/json; charset=utf-8 date: - - Tue, 04 Aug 2020 21:24:46 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_user_agent.yaml index 0179474a45848..347bb7210fb2c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_user_agent.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - be80426a-5177-4171-b20e-baa9ec3a37b0 + - da382525-9a84-4441-9955-d1331a9ed820 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '111' + - '109' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_dont_use_language_hint.yaml index 09c0d3c229ea0..c89919fc1ca15 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"2","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.71}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 8f74198d-98bd-4fcf-9ce6-65492f247cd0 + - dd5575ec-9299-4239-980f-800c14732945 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '110' + - '108' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint.yaml index 88f438df0a9f3..e9cdef8915d1b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - b804738c-5f66-4e20-a0b8-3d3fd6be556f + - ecb58321-1cdf-4e40-9714-b0bcd401ae36 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index e1f42559c91d9..4ee3a365d4ea2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"I will go to the park","category":"Product","offset":0,"length":21,"confidenceScore":0.51}],"warnings":[]},{"id":"2","entities":[{"text":"hotel we stayed at","category":"Location","offset":19,"length":18,"confidenceScore":0.69}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 15be8002-652a-437e-b9bf-1c375d135407 + - 4da74c28-89db-40bd-bedd-de77760ebfc4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '107' + - '80' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_input.yaml index 054df131fcb39..3d103f70b8c13 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,7 +6,7 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 85b2dec7-9000-4fe0-b616-0910ce07d02d + - a3b9ca91-f27b-4ae6-abcf-b252c3bddc9d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '18' + - '22' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index b85c9f57bef95..b5bee6249e314 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"entities\":[],\"warnings\":[]},{\"\ @@ -30,13 +30,13 @@ interactions: }" headers: apim-request-id: - - cfb3fb7f-cb3e-43b6-a060-9c6f39c8d9c5 + - e258fd45-27b4-4719-82aa-24fb6ef40014 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:51 GMT + - Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '94' + - '79' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_dict.yaml index b244316fbf847..710f4f55e57db 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_dict.yaml @@ -7,15 +7,15 @@ interactions: und Paul Allen gegr\u00fcndet.", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '362' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":68,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -29,16 +29,16 @@ interactions: Gates","category":"Person","offset":37,"length":10,"confidenceScore":0.86},{"text":"Paul Allen","category":"Person","offset":52,"length":10,"confidenceScore":0.98}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 65f18a29-41aa-4fba-9778-be7079694cc2 + apim-request-id: dd296642-7582-4a5c-9fe6-61de4997734f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '88' + x-envoy-upstream-service-time: '78' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_text_document_input.yaml index 1fdb8e8cde589..3cb14f66b9c6b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_text_document_input.yaml @@ -7,15 +7,15 @@ interactions: und Paul Allen gegr\u00fcndet.", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '362' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -29,16 +29,16 @@ interactions: Gates","category":"Person","offset":37,"length":10,"confidenceScore":0.86},{"text":"Paul Allen","category":"Person","offset":52,"length":10,"confidenceScore":0.98}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: de39f48c-2692-4b86-b691-f49d4dcceab2 + apim-request-id: de4fcda5-7b57-4602-860a-8d9ccf9414bd content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '93' + x-envoy-upstream-service-time: '79' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_credentials.yaml index 6e3b0bab2fcbf..3e09b23c92976 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_credentials.yaml @@ -4,15 +4,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -20,9 +20,9 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:13 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_model_version_error.yaml index 0969624290c72..f237258b222a7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_model_version_error.yaml @@ -4,29 +4,29 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '101' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2020-04-01,2019-10-01,2020-02-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-02-01,2020-04-01"}}}' headers: - apim-request-id: 04f62dd7-a44c-4135-b65e-0d0351808aae + apim-request-id: a3148e5a-b74f-4e14-a06d-3802cd84ef1c content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '8' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=bad&showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit.yaml index 5587fd087d156..8a155e8623c8d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit.yaml @@ -748,29 +748,29 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58755' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 78247336-f4e0-4a31-a834-2357afed21d4 + apim-request-id: 701ff04c-68fe-4356-8186-d5b4df549a16 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit_error.yaml index 3763483bb0926..e40764e795ab1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit_error.yaml @@ -713,29 +713,29 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '55962' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 266bd6e9-198a-4d14-968c-0710f8682550 + apim-request-id: e8d960e7-2494-46fd-9eed-ba847f61dd84 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '16' + x-envoy-upstream-service-time: '11' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_client_passed_default_language_hint.yaml index f86c8d7b564ec..d87d3479e641a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_client_passed_default_language_hint.yaml @@ -6,33 +6,33 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"I will go to the park","category":"Product","offset":0,"length":21,"confidenceScore":0.51}],"warnings":[]},{"id":"2","entities":[{"text":"hotel we stayed at","category":"Location","offset":19,"length":18,"confidenceScore":0.69}],"warnings":[]},{"id":"3","entities":[{"text":"The restaurant had really good food","category":"Organization","offset":0,"length":35,"confidenceScore":0.47}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: c807c077-38db-4b7b-ba0a-ee9502dab692 + apim-request-id: e83bc5a0-3a17-4ac1-9621-76a923daf7f6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '100' + x-envoy-upstream-service-time: '98' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -40,31 +40,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: dfd5420f-7d9a-447b-b0ed-e73e2134a521 + apim-request-id: 7070e541-5c97-4463-842c-cb6b5f5c4039 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '91' + x-envoy-upstream-service-time: '101' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -72,31 +72,31 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"I will go to the park","category":"Product","offset":0,"length":21,"confidenceScore":0.51}],"warnings":[]},{"id":"2","entities":[{"text":"hotel we stayed at","category":"Location","offset":19,"length":18,"confidenceScore":0.69}],"warnings":[]},{"id":"3","entities":[{"text":"The restaurant had really good food","category":"Organization","offset":0,"length":35,"confidenceScore":0.47}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 15295932-e4ca-4ccb-a8a4-56768029c3d7 + apim-request-id: 57277b68-82bc-4356-94c6-44f7e76a3e18 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '72' + x-envoy-upstream-service-time: '68' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_no_result_attribute.yaml index 7f94b5b0c563e..2ba9bd590d35c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_no_result_attribute.yaml @@ -3,24 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: ec05cc81-df53-4da6-ba92-98d31bb54813 + apim-request-id: 456b9910-ec3b-409d-af56-90801a900440 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:50 GMT + date: Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_nonexistent_attribute.yaml index ffbcc08f6dacc..3cf769af96cd9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,30 +3,30 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 65f42798-dd03-4b83-b1d6-c70e16b99b89 + apim-request-id: 4c070084-a479-4621-9e5a-27f19c8edf28 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '1' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_errors.yaml index cdb73c08388e4..aac7ce374c627 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_errors.yaml @@ -6,15 +6,15 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '5308' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -27,15 +27,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 5c1dfd56-c75f-4dc3-b297-015654437160 + apim-request-id: 18c8b239-97bd-4cd9-95cb-21fd12f1c23d content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_warnings.yaml index 193db94e90242..db2f2b8f4da99 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_warnings.yaml @@ -4,29 +4,29 @@ interactions: :''(", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '98' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: e2244930-e473-41d9-b5b1-c0162734d1f4 + apim-request-id: aa8d6538-21ca-4d3d-95b8-329c4fbddcd1 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '85' + x-envoy-upstream-service-time: '104' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_duplicate_ids_error.yaml index e02ef044ac94d..96fe3784d4069 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_duplicate_ids_error.yaml @@ -4,29 +4,29 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '150' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: b05a5a13-40b6-4e2c-95f4-c98bc597975e + apim-request-id: 292c70c4-0ff0-4ed4-8ecb-e61cd617ef8c content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_empty_credential_class.yaml index d1b952033c44d..e9b8390fab0d5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_empty_credential_class.yaml @@ -4,15 +4,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -20,9 +20,9 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:11 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_all_errors.yaml index a56c9c12a7208..992fbf1898cf4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_all_errors.yaml @@ -4,15 +4,15 @@ interactions: "Hola", "language": "Spanish"}, {"id": "3", "text": "", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '153' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,9 +23,9 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 0cc28fef-6973-45ef-b30a-267724521a35 + apim-request-id: ee3c4a81-42f3-44b2-b24a-d02d6cf5fe57 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -33,5 +33,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_some_errors.yaml index 2c9c16650ccc1..9b804eb74d48b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_some_errors.yaml @@ -5,15 +5,15 @@ interactions: "language": "Spanish"}, {"id": "3", "text": "", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '221' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.8},{"text":"Bill @@ -25,16 +25,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: da486603-eafc-4a26-9ccb-ea18c5b95944 + apim-request-id: b0c2372d-c860-498d-87fc-8f974e60b4dd content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '93' + x-envoy-upstream-service-time: '92' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_docs.yaml index ff4504546ba45..f9a58ee4e152b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_docs.yaml @@ -4,30 +4,30 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: db2fb1e1-cec1-4cdf-8bcc-d0b8794ca04f + apim-request-id: a335c738-df7e-431b-bad9-fbb956b4c678 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '1' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_method.yaml index 05e9bf9f5c6f2..dde1389ac6efe 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_method.yaml @@ -4,30 +4,30 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 5df1ec1a-e306-45c8-a4fa-97dab0aeba98 + apim-request-id: 14ddc644-18db-45ea-accb-355155b1981d content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '1' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_language_kwarg_spanish.yaml index c1a5eeb39aad7..5fb0bda8bcb57 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_language_kwarg_spanish.yaml @@ -4,30 +4,30 @@ interactions: "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '93' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.76},{"text":"CEO","category":"PersonType","offset":18,"length":3,"confidenceScore":0.66},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.38}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: ca3cc0b1-7bb8-4193-9f3d-a04f73c4c1f7 + apim-request-id: 030669af-85b5-4a56-bbff-067dc5701cc7 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '62' + x-envoy-upstream-service-time: '105' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_no_offset_length_v3_categorized_entities.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_no_offset_length_v3_categorized_entities.yaml new file mode 100644 index 0000000000000..aebd409f1c108 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_no_offset_length_v3_categorized_entities.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/recognition/general?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.82},{"text":"Bill + Gates","category":"Person","offset":25,"length":10,"confidenceScore":0.84},{"text":"Paul + Allen","category":"Person","offset":40,"length":10,"confidenceScore":0.89}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: feb5af55-adf4-46b5-8895-5036980c89ea + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 20:56:23 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '103' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.0/entities/recognition/general?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_offset_length.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_offset_length.yaml new file mode 100644 index 0000000000000..59b2dfb526020 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_offset_length.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.82},{"text":"Bill + Gates","category":"Person","offset":25,"length":10,"confidenceScore":0.84},{"text":"Paul + Allen","category":"Person","offset":40,"length":10,"confidenceScore":0.89}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 9c7c584f-622e-47b1-b6b7-5539fb986bdc + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 18:31:19 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '83' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_out_of_order_ids.yaml index a0338f84e728b..765507320ca9a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_out_of_order_ids.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: f4ca3d49-d617-47a7-876f-60b885a7535c + apim-request-id: 10a15b86-33b7-4af9-9bf5-bdc16f137e47 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '61' + x-envoy-upstream-service-time: '60' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_output_same_order_as_input.yaml index cbd04542a68e2..e1f34f0f36583 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_output_same_order_as_input.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"one","category":"Quantity","subcategory":"Number","offset":0,"length":3,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"two","category":"Quantity","subcategory":"Number","offset":0,"length":3,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"three","category":"Quantity","subcategory":"Number","offset":0,"length":5,"confidenceScore":0.8}],"warnings":[]},{"id":"4","entities":[{"text":"four","category":"Quantity","subcategory":"Number","offset":0,"length":4,"confidenceScore":0.8}],"warnings":[]},{"id":"5","entities":[{"text":"five","category":"Quantity","subcategory":"Number","offset":0,"length":4,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: da2ea466-6b82-479a-9a41-4aae33901ae0 + apim-request-id: 25f1423a-bf5a-4587-aa21-20d223a6bcee content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '71' + x-envoy-upstream-service-time: '69' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_pass_cls.yaml index 9b48654a25b80..90b19325780f5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_pass_cls.yaml @@ -4,29 +4,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '86' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 4743fbf1-d4ec-4d08-873d-1dcf8a29053b + apim-request-id: 075a54ca-692e-4776-b9c8-68742add84e6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '65' + x-envoy-upstream-service-time: '73' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_passing_only_string.yaml index a57d9db3919ed..3f8e0d4a9be1c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_passing_only_string.yaml @@ -8,15 +8,15 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '405' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.81},{"text":"Bill @@ -29,16 +29,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 17178476-3e07-4c7f-8185-db701b1beaf5 + apim-request-id: 2ad6a1cb-8873-4fe2-9dd4-4269bf7beb8b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:09 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '92' + x-envoy-upstream-service-time: '116' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_per_item_dont_use_language_hint.yaml index e13f580ffdeab..c76feeff4711c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_per_item_dont_use_language_hint.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '236' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 01d8b8d7-1bc1-4406-9ff9-a1fbb40607da + apim-request-id: a824f306-e640-46dd-ae07-0a03764180b7 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '121' + x-envoy-upstream-service-time: '100' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_rotate_subscription_key.yaml index d28746a24408c..85fdc7b5673ec 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_rotate_subscription_key.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: b2e5da80-6835-4217-b8c9-45c5d90bf02f + apim-request-id: 9fd0d5ce-3b80-4203-81ab-30586e614a53 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:51 GMT + date: Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '120' + x-envoy-upstream-service-time: '102' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -38,15 +38,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -54,11 +54,11 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:10 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -66,29 +66,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 5ec4a9bc-24ce-458c-abd6-0a14e25a76d5 + apim-request-id: b893155c-2950-4a68-9b97-2e321fb6b630 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:10 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '90' + x-envoy-upstream-service-time: '100' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_show_stats_and_model_version.yaml index f13bdf3b6c76c..1c82e5ab8d993 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_show_stats_and_model_version.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: a017cf5d-14bf-4770-876b-83b85788be2a + apim-request-id: 1752f789-8c76-49ea-ae8c-26349524d985 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:53 GMT + date: Thu, 27 Aug 2020 19:32:11 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '64' + x-envoy-upstream-service-time: '62' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..2bb9883f783d8 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,31 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '75' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/recognition/general?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 9a227f00-5b42-4610-86ef-a79c5508e704 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 19:32:12 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '72' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.0/entities/recognition/general?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_too_many_documents.yaml index e162af594f0cf..71640b87e2696 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_too_many_documents.yaml @@ -6,29 +6,29 @@ interactions: "en"}, {"id": "5", "text": "Six", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '295' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: adfcb11b-4e75-43d3-bd45-2aaf8c12d147 + apim-request-id: ad10de34-6a72-44f5-baa6-3a8b999c778c content-type: application/json; charset=utf-8 - date: Tue, 04 Aug 2020 21:24:46 GMT + date: Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '6' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_user_agent.yaml index 76fdc3052dbda..c26bdc32a7751 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_user_agent.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.83}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: c7083a40-622b-488b-b4bd-961f5e62a67b + apim-request-id: ee1a4e14-057b-4cb9-8f72-aada9e6bbcf9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '116' + x-envoy-upstream-service-time: '98' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_dont_use_language_hint.yaml index 3a610051ab9ec..b0b09e9e4cc35 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_dont_use_language_hint.yaml @@ -6,29 +6,29 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '273' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.76}],"warnings":[]},{"id":"2","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.71}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 627a7869-2975-4ef0-ae1b-387d14a8fce8 + apim-request-id: deee8ae0-2a5b-42c2-bd0b-57b4163411a6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '126' + x-envoy-upstream-service-time: '118' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint.yaml index 311a177a89d71..382d2312e1c4d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint.yaml @@ -6,29 +6,29 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '279' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 92d3687d-0881-49e8-a51e-40b944ef39d4 + apim-request-id: bbe6d35d-e9ac-471e-939f-86282c613644 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:53 GMT + date: Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '28' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 58eb019772320..f849a30afdd7d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,30 +6,30 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"I will go to the park","category":"Product","offset":0,"length":21,"confidenceScore":0.51}],"warnings":[]},{"id":"2","entities":[{"text":"hotel we stayed at","category":"Location","offset":19,"length":18,"confidenceScore":0.69}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.7}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 0e548cbb-aca0-4e8d-b7c1-f8822f33fffa + apim-request-id: e8146615-0224-46eb-a49c-6cea96f14190 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '72' + x-envoy-upstream-service-time: '88' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_input.yaml index 59beeea616e84..6b41f9bb62e00 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,29 +6,29 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 5666c40f-8046-40b8-b517-d3c5a026a701 + apim-request-id: 3e403e12-d91d-41f4-b91e-b8e1918e2ee8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '22' + x-envoy-upstream-service-time: '26' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 4eb073ad334bd..b50794f1cffd3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,15 +6,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"entities\":[],\"warnings\":[]},{\"\ @@ -25,16 +25,16 @@ interactions: ,\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"\ }" headers: - apim-request-id: fd2c4ed3-bda7-4bf3-aadd-80aad96825bb + apim-request-id: 8d4acc67-4585-4b5a-a8de-7b878138db49 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:52 GMT + date: Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '105' + x-envoy-upstream-service-time: '107' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_dict.yaml index 8081c5425871b..5aafdd30adcea 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_dict.yaml @@ -5,7 +5,7 @@ interactions: por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","statistics":{"charactersCount":50,"transactionsCount":1},"entities":[{"name":"Bill @@ -31,13 +31,13 @@ interactions: Allen","url":"https://es.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.38}],"language":"es","id":"Microsoft","url":"https://es.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 4160c7cf-d35f-45a2-9209-016817ec43bf + - f759755c-4ca3-4774-9e9c-02a4039a7694 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_text_document_input.yaml index 6ec543b54ce14..b6eb5b6ff1952 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_text_document_input.yaml @@ -5,7 +5,7 @@ interactions: por Bill Gates y Paul Allen", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"name":"Bill Gates","matches":[{"text":"Bill @@ -31,13 +31,13 @@ interactions: Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 5f47fcab-660e-4935-b27d-5fdf13438a25 + - 4ee64643-daef-4a30-8201-a1c8b9a235df content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2 date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '20' + - '18' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_credentials.yaml index 2eb9944c0af78..a9fdb5b143225 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_credentials.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:16 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_model_version_error.yaml index e9c3283611bc6..17b4d2477f788 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_model_version_error.yaml @@ -4,7 +4,7 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2020-02-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-02-01"}}}' headers: apim-request-id: - - 5a1acd94-b720-40b1-a15b-b7ef2f90dec8 + - 2e933a96-ae5a-4001-94f3-742133d29ef9 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '6' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit.yaml index 8297c25e994e3..13b1919ae30a9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit.yaml @@ -748,7 +748,7 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 89b8ad88-a954-4ee5-812d-a422cb2e0f5d + - 47b13c0b-8d90-433c-af2d-2b7c90121e02 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '12' + - '13' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit_error.yaml index bcea6315ec8ae..a9c530f1f2d4d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit_error.yaml @@ -713,7 +713,7 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 3b71ea53-fcd9-4b20-b71b-8277cc1dcbec + - d3cc984a-f9f1-4ac5-bae9-021962b7d429 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '22' + - '17' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml new file mode 100644 index 0000000000000..537c216e5a8be --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://cognitiveusw2dev.azure-api.net/text/analytics/v3.1-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill + Gates","matches":[{"text":"Bill Gates","offset":25,"length":10,"confidenceScore":0.52}],"language":"en","id":"Bill + Gates","url":"https://en.wikipedia.org/wiki/Bill_Gates","dataSource":"Wikipedia"},{"bingId":"df2c4376-9923-6a54-893f-2ee5a5badbc7","name":"Paul + Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul + Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: + - 34b34e81-fcc2-4c1e-85b2-116f85196a4c + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Mon, 31 Aug 2020 18:48:40 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '27' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_client_passed_default_language_hint.yaml index f700a02eb40d4..f2fa381235276 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_client_passed_default_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 9b97ed9b-7e9c-4c93-a5d0-989cfed2c210 + - 8d621a46-3149-41c4-b609-a5e6e485eb43 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '42' + - '112' status: code: 200 message: OK @@ -49,7 +49,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -59,21 +59,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 5fbaf613-b88a-4f9b-8601-373d330ccb2f + - 07e2b784-676c-4238-b596-7b803f1bf43b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -92,7 +92,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -102,21 +102,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 79a31c9b-d193-4d71-b790-e709f3cbe5bf + - 420e54c4-e149-4aac-95d1-6bc54984c6cc content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -124,7 +124,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '25' + - '17' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_no_result_attribute.yaml index 596c9209ca0af..82acd601b0169 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_no_result_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 0647649b-3e29-4733-9699-54140928dace + - ca5432da-dcc0-4bcf-a685-a15b7a360df7 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_nonexistent_attribute.yaml index f0a223af119b0..0f76888f35b5d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 00434868-b438-4f14-be49-9ae5697a23f6 + - 0ba9719b-3350-439a-b954-3cb8282db565 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_errors.yaml index cace20eda695e..0e492c0899d94 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_errors.yaml @@ -6,7 +6,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -32,11 +32,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - b8e50cf6-c03e-4a1f-bc00-a7e81b96985b + - 4ca5881f-cab1-4fc4-80f7-c41660fa3697 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_warnings.yaml index 2ebfcdba1d1c5..6f92bcb87299f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_warnings.yaml @@ -4,7 +4,7 @@ interactions: :''(", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 5ec736e9-b7a7-4a08-96d6-7e02203f65ec + - 0328e0c5-7f5d-4a1f-992d-b3f7c027042f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '23' + - '16' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_duplicate_ids_error.yaml index b1f33b78ff9ed..98c74b42b0ac6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_duplicate_ids_error.yaml @@ -4,7 +4,7 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - d11116e6-97e4-4297-8f54-157582fb352f + - 700ba2d4-81eb-480e-b175-c6ae61136622 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_empty_credential_class.yaml index 2eb9944c0af78..44fa70f41d1e9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_empty_credential_class.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:52 GMT + - Thu, 27 Aug 2020 19:32:17 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_all_errors.yaml index f7908518ea2c9..17a22e3f971bd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_all_errors.yaml @@ -4,7 +4,7 @@ interactions: "Microsoft fue fundado por Bill Gates y Paul Allen", "language": "Spanish"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -26,11 +26,11 @@ interactions: language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - ad7decfd-817a-48e9-bebc-d1e79cc9604c + - 26f5f20b-4648-4020-824d-22d467bfd440 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_some_errors.yaml index ba563211c8195..e67e506a24c4c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_some_errors.yaml @@ -4,7 +4,7 @@ interactions: "Microsoft fue fundado por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"2","entities":[{"name":"Bill Gates","matches":[{"text":"Bill @@ -28,13 +28,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 0f59c287-eec4-49b2-b08a-6ebb4e17e394 + - a0cd1145-2339-4f0f-922e-cc9202cb0cfc content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_docs.yaml index be9f1639a9f7e..1a854ec8025fc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_docs.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -24,11 +24,11 @@ interactions: language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 4521f87f-478b-4e8e-a4c5-9dc4947060cb + - 28eb589b-aa81-4e6c-890d-322d24f31a82 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_method.yaml index 64b39a83a7097..57637ab10f4f4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_method.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -24,11 +24,11 @@ interactions: language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 8c47d0e8-47c6-44e5-b024-a564b2a10892 + - 2480a700-5dc5-4d33-9994-f43b5db8c18f content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_language_kwarg_spanish.yaml index 32b2dbd4f8309..1f8f0b3219e7b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_language_kwarg_spanish.yaml @@ -4,7 +4,7 @@ interactions: "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"name":"Bill @@ -26,13 +26,13 @@ interactions: ejecutivo","url":"https://es.wikipedia.org/wiki/Director_ejecutivo","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 3c3df070-832f-433d-a960-661858c31770 + - fc380a4a-2be8-46f9-9094-c9b05f682257 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '36' + - '12' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_no_offset_length_v3_linked_entity_match.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_no_offset_length_v3_linked_entity_match.yaml new file mode 100644 index 0000000000000..b203d7fda45d5 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_no_offset_length_v3_linked_entity_match.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/linking?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[{"name":"Bill Gates","matches":[{"text":"Bill + Gates","offset":25,"length":10,"confidenceScore":0.52}],"language":"en","id":"Bill + Gates","url":"https://en.wikipedia.org/wiki/Bill_Gates","dataSource":"Wikipedia"},{"name":"Paul + Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul + Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: + - 59196e61-2b8a-44af-8d44-faa6bc642eed + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 20:56:23 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '19' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_offset_length.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_offset_length.yaml new file mode 100644 index 0000000000000..2c4311036a77a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_offset_length.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"name":"Bill Gates","matches":[{"text":"Bill + Gates","offset":25,"length":10,"confidenceScore":0.52}],"language":"en","id":"Bill + Gates","url":"https://en.wikipedia.org/wiki/Bill_Gates","dataSource":"Wikipedia"},{"name":"Paul + Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul + Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: + - d072190a-ba10-42b8-a561-b648277d9c95 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Fri, 28 Aug 2020 18:31:20 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '16' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_out_of_order_ids.yaml index a92eeada9df68..9ab27727592ed 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_out_of_order_ids.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - e9fe43da-5048-4601-ae76-d14971f580f7 + - e2b5b225-6628-4201-812a-f020f931d647 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '19' + - '30' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_output_same_order_as_input.yaml index 442d6710a57fc..4c3ef185d7b90 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_output_same_order_as_input.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 5f52dbac-3707-4243-89ad-713e7734a26f + - 08b06f33-14d0-4f76-8d1f-9fd9c957c916 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5 date: - - Fri, 24 Jul 2020 16:32:54 GMT + - Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '18' + - '16' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_pass_cls.yaml index 812e74443d80b..36caa56d0fbdb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_pass_cls.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"name":".test","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.02}],"language":"en","id":".test","url":"https://en.wikipedia.org/wiki/.test","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 6ad14174-59e4-402a-9f53-a2a0453d3d53 + - 3538b702-e337-442d-b729-e3125c31bc91 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_passing_only_string.yaml index e0f941ac68bb4..a3acdccea91c8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_passing_only_string.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"name":"Bill Gates","matches":[{"text":"Bill @@ -34,13 +34,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 36282cc5-775e-4aa3-92db-b8e94a992869 + - f6254588-8536-4bd3-9996-c61855b67a49 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -48,7 +48,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '26' + - '21' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_per_item_dont_use_language_hint.yaml index 021514242ec0f..4d10fd94ff9c1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_per_item_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 0f81e4d1-7751-414f-9e05-0ac33fbb8fe2 + - 7f204986-d6e5-4dd1-b920-b7ffc68f66c6 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '18' + - '28' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_rotate_subscription_key.yaml index c2890b573267d..8c73836042354 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_rotate_subscription_key.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 7ad4d363-7984-4215-b5ac-4a8bda5a5be9 + - 48d9f768-5f96-4fdf-9ad4-7207163e572b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '19' + - '22' status: code: 200 message: OK @@ -49,7 +49,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -59,9 +59,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -71,7 +71,7 @@ interactions: content-length: - '224' date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT status: code: 401 message: PermissionDenied @@ -82,7 +82,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -92,21 +92,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 87848571-95b8-4913-9c27-18e9948ae0b2 + - 6edeef77-c6f7-4d62-8d8f-eccd409dbc25 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -114,7 +114,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '22' + - '21' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_show_stats_and_model_version.yaml index 29d560d86b2f1..0d05e229c819f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_show_stats_and_model_version.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 4a1c7b65-8307-4589-9aab-5cbf2c6f4e0a + - a6a5e386-d8a6-432c-a358-6c447833db44 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '18' + - '15' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..4c837457848f1 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '75' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/linking?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: + - b25d8803-ed8c-4f99-8fd3-d9a558e7c483 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 19:32:16 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '22' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_too_many_documents.yaml index 7624f2e43fdfc..60f87840d3525 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_too_many_documents.yaml @@ -6,7 +6,7 @@ interactions: "en"}, {"id": "5", "text": "Six", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,20 +16,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 54eb3dbe-d893-488f-bd4c-7836003a4a01 + - b54773e8-55b7-4802-bece-ba1d2bdc6400 content-type: - application/json; charset=utf-8 date: - - Tue, 04 Aug 2020 21:24:47 GMT + - Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_user_agent.yaml index d6a2345d9dcac..8d8b9909db44d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_user_agent.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 58643084-7b61-4e27-b8eb-3d22d4ccfcc6 + - c6b1d713-4e19-4631-97db-247c2e89a782 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_dont_use_language_hint.yaml index 509f22dce9c8c..df35eac1a1449 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - c9c49a5a-3366-4063-8620-8c2d9d27580a + - 95eafb45-0575-4b3c-934e-acb71b6ec472 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '19' + - '23' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint.yaml index b69363e4c9421..00ad2c15d0cce 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -30,11 +30,11 @@ interactions: language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - fc5cfbb4-cc8b-4fdd-80b7-364697293a7b + - 24ebfa33-9f2b-4a9e-9c5d-051046ec8ef1 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 96a5d19f6c585..b1c4a22644e06 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 65d883bb-fea9-4e90-82cb-3356318d9bb0 + - d586834c-e4a2-4146-8dcf-787c9941c1cd content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '17' + - '18' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_input.yaml index ccf0d2918aaaf..0f68c7ebd6c33 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,7 +6,7 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -30,11 +30,11 @@ interactions: language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - eb99cec2-70e8-47d0-922e-a897d2f9dea5 + - fad6b34c-e6cf-4c9f-9164-d9743a6948b8 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index d69172a02a622..0f79bb46f6ba4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - f4c781bb-17f4-4015-9e6b-9db07f45f60d + - 253f81b6-e653-405b-a92a-65d8d2d330bb content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Fri, 24 Jul 2020 16:32:53 GMT + - Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '20' + - '19' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_dict.yaml index 20c88ee25b339..230d81984d12c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_dict.yaml @@ -5,15 +5,15 @@ interactions: por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '200' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","statistics":{"charactersCount":50,"transactionsCount":1},"entities":[{"name":"Bill @@ -26,10 +26,10 @@ interactions: Allen","matches":[{"text":"Paul Allen","offset":39,"length":10,"confidenceScore":0.9}],"language":"es","id":"Paul Allen","url":"https://es.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.38}],"language":"es","id":"Microsoft","url":"https://es.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: fd94c924-ab60-44f2-93e3-b10acccde0d5 + apim-request-id: 44767714-6a4c-424a-924c-2281ebd644a9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -37,5 +37,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_text_document_input.yaml index 726f4d4ebb694..96ae9022483e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_text_document_input.yaml @@ -5,15 +5,15 @@ interactions: por Bill Gates y Paul Allen", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '200' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"name":"Bill Gates","matches":[{"text":"Bill @@ -26,16 +26,16 @@ interactions: Allen","matches":[{"text":"Paul Allen","offset":39,"length":10,"confidenceScore":0.55}],"language":"en","id":"Paul Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 025755c7-b02e-47c8-9a7d-9bc05b057cc3 + apim-request-id: bb8696f3-516f-4e16-968c-806f4976bbd7 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '20' + x-envoy-upstream-service-time: '22' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_credentials.yaml index f6eb4a8b8c7bb..f7547cf9bae6b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_credentials.yaml @@ -4,15 +4,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -20,9 +20,9 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:16 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_model_version_error.yaml index 1ed7dca17f7a3..ca9b99fbbe943 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_model_version_error.yaml @@ -4,29 +4,29 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '101' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2020-02-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-02-01"}}}' headers: - apim-request-id: 7249675b-85f5-4e8d-9419-edbce42d40d7 + apim-request-id: 3e856ba3-2402-4c02-b0be-da00335ca015 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?model-version=bad&showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit.yaml index ef2eee9b4e869..c666ad2b67fb0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit.yaml @@ -748,29 +748,29 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58755' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: fbca31f1-04a0-43ca-b267-d90d406db170 + apim-request-id: 19d2f5eb-5f76-41f5-951d-82b702978b80 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '11' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit_error.yaml index ea4099b21f85d..adfa81c01bbfa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit_error.yaml @@ -713,29 +713,29 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '55962' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 6007033c-e14d-4fb2-ac42-b20824683b0f + apim-request-id: 22d07c20-a381-40d3-a681-05b77d5cd948 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:55 GMT + date: Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '16' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml new file mode 100644 index 0000000000000..2c4123289eb05 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://cognitiveusw2dev.azure-api.net/text/analytics/v3.1-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill + Gates","matches":[{"text":"Bill Gates","offset":25,"length":10,"confidenceScore":0.52}],"language":"en","id":"Bill + Gates","url":"https://en.wikipedia.org/wiki/Bill_Gates","dataSource":"Wikipedia"},{"bingId":"df2c4376-9923-6a54-893f-2ee5a5badbc7","name":"Paul + Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul + Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: 70ab796e-3da1-4a55-86b4-16c4b19a97a8 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Mon, 31 Aug 2020 18:48:41 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '26' + status: + code: 200 + message: OK + url: https://cognitiveusw2dev.azure-api.net/text/analytics/v3.1-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_client_passed_default_language_hint.yaml index 3d22cf0baafc1..e037dbf92eec0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_client_passed_default_language_hint.yaml @@ -6,31 +6,31 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 469f7ac4-71a1-480a-b677-32c9cb37b495 + apim-request-id: b120bee4-b313-4ef4-917a-3baed429b68f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:53 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '25' + x-envoy-upstream-service-time: '35' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -38,31 +38,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 50825193-f63a-4938-ac9c-474c0666b202 + apim-request-id: ecd6ee2d-ebc6-45e1-b6c2-0cf4d51bbde0 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '20' + x-envoy-upstream-service-time: '18' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -70,29 +70,29 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 22af470d-c9e3-482a-8ea1-e545a027c842 + apim-request-id: 63e51e08-7497-401b-b872-6c410d8af657 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '16' + x-envoy-upstream-service-time: '227' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_no_result_attribute.yaml index 277ae06a996c4..27a6e317b3b7f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_no_result_attribute.yaml @@ -3,24 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: e46f5195-cac5-4ad6-93d7-adc35e71c844 + apim-request-id: 1f12c053-2f58-40a4-9be0-72f5218376c1 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_nonexistent_attribute.yaml index 73b70a3026a2e..21f6483ace0ab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,24 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: c7da8cc2-d67a-429e-9e7b-3ea1135082d8 + apim-request-id: c1561b9e-ab75-4847-a57c-e531ed5ccb1d content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_errors.yaml index 98228f15b915a..a07f969cc9889 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_errors.yaml @@ -6,15 +6,15 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '5308' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -27,15 +27,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 1efcd7ae-7817-4d9d-b7d7-4488c750ab2f + apim-request-id: 2fdae09d-20f0-4c19-a4ef-1c3e091ed1cc content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '1' + x-envoy-upstream-service-time: '5' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_warnings.yaml index 942af5ce87eea..c33bb072de8fc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_warnings.yaml @@ -4,29 +4,29 @@ interactions: :''(", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '98' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 17bf9844-ece6-48bf-9846-ea55e0e21a9b + apim-request-id: 2e3b187d-d789-4230-9ebc-88f9c63b3c4e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:53 GMT + date: Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '21' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_duplicate_ids_error.yaml index 18868d4215e6d..ff52555217b74 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_duplicate_ids_error.yaml @@ -4,29 +4,29 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '150' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: 2161000b-0b54-49f5-b803-2a0aeea14b11 + apim-request-id: 4a7a2750-6002-4940-9046-eb950493df48 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '6' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_empty_credential_class.yaml index eb3ca2a20d64e..f23c9da152aae 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_empty_credential_class.yaml @@ -4,15 +4,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -20,9 +20,9 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:53 GMT + date: Thu, 27 Aug 2020 19:32:19 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_all_errors.yaml index 80c2a8cd47083..f793fd61567f1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_all_errors.yaml @@ -4,15 +4,15 @@ interactions: "Microsoft fue fundado por Bill Gates y Paul Allen", "language": "Spanish"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '155' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -21,9 +21,9 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 537d5f63-cf53-4a58-a44e-1ef5c3049ed5 + apim-request-id: eca7186d-9dd6-430e-bfbd-7ac428b1c6f2 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -31,5 +31,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_some_errors.yaml index 1c9b300eea9cb..7afa82a14091e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_some_errors.yaml @@ -4,15 +4,15 @@ interactions: "Microsoft fue fundado por Bill Gates y Paul Allen", "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '150' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"2","entities":[{"name":"Bill Gates","matches":[{"text":"Bill @@ -23,16 +23,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: b9b8759e-0f33-43bc-8cc2-aa235472e7d0 + apim-request-id: 4bdf3ace-c34e-4543-b16a-5fb5f994435a content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:53 GMT + date: Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '15' + x-envoy-upstream-service-time: '22' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_docs.yaml index 66f8999cda448..25c4344c241b8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_docs.yaml @@ -4,24 +4,24 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 77dfcf1f-3432-445d-8c41-2b7f61d12d66 + apim-request-id: 1f0d032f-3687-45d7-a39f-701b2e12b720 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -29,5 +29,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_method.yaml index 800c870687570..7e1f4b9449388 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_method.yaml @@ -4,24 +4,24 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 0977ae21-8661-4ad2-b74f-aaea52b10322 + apim-request-id: 89b316e0-fee1-4533-a6e8-c6aa3c073f3d content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:55 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -29,5 +29,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_language_kwarg_spanish.yaml index b2d8a03cb4977..efd2f0a1efa91 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_language_kwarg_spanish.yaml @@ -4,15 +4,15 @@ interactions: "language": "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '93' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"name":"Bill @@ -21,16 +21,16 @@ interactions: ejecutivo","matches":[{"text":"CEO","offset":18,"length":3,"confidenceScore":0.22}],"language":"es","id":"Director ejecutivo","url":"https://es.wikipedia.org/wiki/Director_ejecutivo","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 96d24414-61f1-45e4-b0ba-2d79ba7b7157 + apim-request-id: 69998e1a-3cb1-4dcc-bcd5-dec8224942b3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:55 GMT + date: Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '17' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_no_offset_length_v3_linked_entity_match.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_no_offset_length_v3_linked_entity_match.yaml new file mode 100644 index 0000000000000..163f1e5edb72a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_no_offset_length_v3_linked_entity_match.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/linking?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[{"name":"Bill Gates","matches":[{"text":"Bill + Gates","offset":25,"length":10,"confidenceScore":0.52}],"language":"en","id":"Bill + Gates","url":"https://en.wikipedia.org/wiki/Bill_Gates","dataSource":"Wikipedia"},{"name":"Paul + Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul + Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: 9ca5fcb3-09d4-473f-ba54-97b5e4fad832 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 20:56:24 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '17' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.0/entities/linking?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_offset_length.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_offset_length.yaml new file mode 100644 index 0000000000000..0c4326cb0a824 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_offset_length.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"name":"Bill Gates","matches":[{"text":"Bill + Gates","offset":25,"length":10,"confidenceScore":0.52}],"language":"en","id":"Bill + Gates","url":"https://en.wikipedia.org/wiki/Bill_Gates","dataSource":"Wikipedia"},{"name":"Paul + Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul + Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: 608ba7e5-391e-4e1b-9397-43b6d8f0c144 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Fri, 28 Aug 2020 18:31:20 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '17' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_out_of_order_ids.yaml index f532f47567b6e..5cc645e6a0548 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_out_of_order_ids.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 33247fd1-7a5b-4d05-be46-212e9d179ebb + apim-request-id: 78e6513f-4ebd-4fc3-a992-7a733a1039be content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '20' + x-envoy-upstream-service-time: '17' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_output_same_order_as_input.yaml index 56b28a32d832e..7463b2868214a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_output_same_order_as_input.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 229ba3d2-0692-4ebd-ad22-0bdd986e7777 + apim-request-id: 9bd3fd58-ed24-4e9e-bacc-85ed6abacd90 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '15' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_pass_cls.yaml index a2bc3802c12f7..4db9bfa7a1f3a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_pass_cls.yaml @@ -4,29 +4,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '86' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"name":".test","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.02}],"language":"en","id":".test","url":"https://en.wikipedia.org/wiki/.test","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 95399e26-fec8-4c71-bf46-41c6d8344ef5 + apim-request-id: a7ab09cb-6989-4041-836d-cb6deacde0f4 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '20' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_passing_only_string.yaml index 5b581412c8a36..de8de42666623 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_passing_only_string.yaml @@ -6,15 +6,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '243' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"name":"Bill Gates","matches":[{"text":"Bill @@ -29,16 +29,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 6e846d7b-c38e-4e85-96d5-881a966bb493 + apim-request-id: 922d74ab-5d46-47f4-846e-b0e572eae97e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '15' + x-envoy-upstream-service-time: '20' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_per_item_dont_use_language_hint.yaml index 2e9ba11c2b9f2..6f9ab905977ed 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_per_item_dont_use_language_hint.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '236' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 9fe7703b-6ba0-45d5-9ec6-8ee4ecc734e0 + apim-request-id: d550fd00-a7c6-479b-83cf-b57b2c2b295c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:55 GMT + date: Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_rotate_subscription_key.yaml index 05e14e2b178f9..0f9e3324bc97e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_rotate_subscription_key.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 118eda7d-ce05-4319-9113-713873ef0eed + apim-request-id: 7e745c1d-5dcf-4201-9a22-2a3151a58310 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '28' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -38,15 +38,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -54,11 +54,11 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:21 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -66,23 +66,23 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 5c8055fc-ba3e-4a14-84be-7d445f310de1 + apim-request-id: a39330f2-e71f-4ba3-908a-c8e83da663bc content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -90,5 +90,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_show_stats_and_model_version.yaml index a9add4cab5836..06e95fdb1f79a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_show_stats_and_model_version.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: be1949a7-90b0-442d-a5e4-d8f4f70183c2 + apim-request-id: 3026de3b-9e0b-4873-88cc-c256cc825472 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Fri, 24 Jul 2020 16:32:55 GMT + date: Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '18' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_string_index_type_not_fail_v3.yaml new file mode 100644 index 0000000000000..d81f490d6dca3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_string_index_type_not_fail_v3.yaml @@ -0,0 +1,31 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "please don''t fail", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '75' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/linking?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: 5ae1c436-117a-404c-ad53-bf5fae2c0230 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 19:32:22 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '22' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.0/entities/linking?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_too_many_documents.yaml index f22ac6f8c53b8..00b0a86b2d0c6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_too_many_documents.yaml @@ -6,23 +6,23 @@ interactions: "en"}, {"id": "5", "text": "Six", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '295' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: f0e9e45e-7a90-4b71-8366-c5cf0c4c4d14 + apim-request-id: 9b98225e-146b-4e74-9021-703a1b2925d1 content-type: application/json; charset=utf-8 - date: Tue, 04 Aug 2020 21:24:47 GMT + date: Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -30,5 +30,5 @@ interactions: status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_user_agent.yaml index 8df745d5fa6a6..f2c4763d7a3b5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_user_agent.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 91c99cfb-6cff-4875-be5f-45049318de2e + apim-request-id: 3cd8f925-4259-4bfe-8a97-7cdc2b4ea786 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '21' + x-envoy-upstream-service-time: '18' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_dont_use_language_hint.yaml index d1e416480b26d..298ba632d4855 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_dont_use_language_hint.yaml @@ -6,29 +6,29 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '273' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 5f54fc71-e850-480b-8302-1bd53fe461ca + apim-request-id: cda36a3a-17ee-4db6-9f60-e99b1b6969e3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:55 GMT + date: Thu, 27 Aug 2020 19:32:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '22' + x-envoy-upstream-service-time: '36' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint.yaml index db0d67dcd6854..c9a02c5339684 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint.yaml @@ -6,15 +6,15 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '279' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -25,9 +25,9 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 4793450f-091a-4a73-8e00-cef2601a1ee0 + apim-request-id: 2bbc5dea-18cb-4d86-8bba-6835a4f405f2 content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -35,5 +35,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index c59970badac24..f730e51e36223 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: d6f10f38-8662-4984-9298-5280bd55065d + apim-request-id: 359f535a-68d6-43ed-aa62-ec3c808145ea content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:55 GMT + date: Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '43' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_input.yaml index cd927bfed9308..2143745774fd9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,15 +6,15 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,9 +25,9 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es"}}}],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 0e8b861c-c482-4948-8f86-06a2bd59819d + apim-request-id: 24c36bec-7d81-4a3e-befc-a8ce6822caad content-type: application/json; charset=utf-8 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -35,5 +35,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index b4fc91911f520..854da5018d795 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: a0737de8-e4ad-40d1-9709-404d4bf77a13 + apim-request-id: d0d3be60-07d3-4012-b1ad-2ec83fb0deac content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Fri, 24 Jul 2020 16:32:54 GMT + date: Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '28' + x-envoy-upstream-service-time: '16' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml index 6115f8866337f..23f1707bcc7bc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml @@ -6,7 +6,7 @@ interactions: "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,25 +16,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA - Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil - CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + Routing Number","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"New + Zealand Social Welfare Number","offset":18,"length":9,"confidenceScore":0.65},{"text":"111000025","category":"Portugal + Tax Identification Number","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 13864f85-984d-4a9b-8df3-c1409f0731b2 + - 9b77a7ab-96b7-4649-9237-a9adf10127db content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:42 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '155' + - '132' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml index 83aef7498df71..f0ed93b6f3a8e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml @@ -6,7 +6,7 @@ interactions: "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,25 +16,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA - Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil - CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + Routing Number","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"New + Zealand Social Welfare Number","offset":18,"length":9,"confidenceScore":0.65},{"text":"111000025","category":"Portugal + Tax Identification Number","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 276ffd38-55e9-4b8a-b4c8-a4af7c8286d9 + - a609f561-bb88-4571-84e7-478a670d3549 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:42 GMT + - Thu, 27 Aug 2020 19:32:17 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '116' + - '135' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml index 43251cb00dd48..d698307d3de43 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Thu, 23 Jul 2020 17:18:42 GMT + - Thu, 27 Aug 2020 19:32:18 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml index f1724aa7e3088..eb606c30a01ca 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml @@ -4,7 +4,7 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2020-04-01,2019-10-01,2020-02-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-02-01,2020-04-01,2020-07-01"}}}' headers: apim-request-id: - - c999c1e5-ba3b-4351-b65d-4356362357c6 + - e8d6a18a-53f3-4404-a8a0-0bfbc08aaf97 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:43 GMT + - Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml index e6d9bfac4ea9d..33e113dd91608 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml @@ -748,7 +748,7 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - e5020bb3-4385-4907-a1b3-61723f79cc79 + - 25a33acf-f793-4c69-bb97-46449d3fe853 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:44 GMT + - Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '12' + - '13' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml index 6df091febc9b7..9665c85dc1d92 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml @@ -713,7 +713,7 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 6218bc52-cde1-4519-8dc8-4b4092efdf08 + - 2ea55982-d5ac-4b50-97d5-7c373c7d0081 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:44 GMT + - Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml index 3c9c62ee0c6a4..554b5dc6d5441 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -27,14 +27,14 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - e517622a-4ba2-4b27-8be3-ffd90abfb08a + - f7cd8364-9393-4ee6-8164-1df9cda01c70 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:44 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -53,7 +53,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -63,21 +63,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 8e0ca8ea-a7f1-4d04-842d-754d62659c85 + - a1ed5ef1-4fea-46ed-b836-659475a32277 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:46 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -85,7 +85,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '105' + - '109' status: code: 200 message: OK @@ -96,7 +96,7 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -106,9 +106,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -117,14 +117,14 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - e78f6c84-2db5-49ed-8225-d4cde4b86ffe + - ef15bf35-0343-4aa5-8d12-97b1af5243ec content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:46 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -132,7 +132,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml index 0bb07ba438d76..35988a577216d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,21 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 4dba7af2-29bb-432a-9178-13ef624f7d00 + - bbdd91e0-cdc9-4708-8d20-d4d5be6a4aff content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:45 GMT + - Thu, 27 Aug 2020 19:32:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml index bf373a45aa291..32c5b23e32da6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,7 +3,7 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -13,21 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 166e1ed8-b99e-4510-b4d1-5d75ea2f8657 + - 40338d13-59a7-41fc-bf9f-39bcbe3030a6 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:46 GMT + - Thu, 27 Aug 2020 19:32:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml index 33172475a45f4..15f50d6385f47 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml @@ -6,7 +6,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -29,14 +29,14 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations - see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 860c6f8f-a447-4ec6-9b05-97c5608db3be + - 1d7d7f7e-12f7-4e26-a0f1-358dd5e68859 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:47 GMT + - Thu, 27 Aug 2020 19:32:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml index b71ea37404f97..8b88801be5154 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml @@ -4,7 +4,7 @@ interactions: :''(", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - ae9db402-9b0d-4553-b16c-253ece9ed33d + - 2c9c52d3-850e-442f-9d59-1e8e4265f60a content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 23 Jul 2020 17:18:47 GMT + - Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '89' + - '127' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml index a99d43e7817fb..6b059da4371eb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml @@ -4,7 +4,7 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 30ffe8c5-5001-4d47-800f-eaabba1d0476 + - 7168cdaf-4b84-476d-9ef2-7bd8136feb81 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:47 GMT + - Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml index e1b1c1696e6d6..ae282bef6b3cc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Thu, 23 Jul 2020 17:18:47 GMT + - Thu, 27 Aug 2020 19:32:19 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml index 2cb6dac5da50b..888e6ed8f939f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml @@ -4,7 +4,7 @@ interactions: "Hola", "language": "Spanish"}, {"id": "3", "text": "", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,14 +25,14 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 7fe78d0f-6593-4b2f-9ae1-b60130cd536e + - a0bdd2e2-4d69-4df9-a295-a95b4f0377fc content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:48 GMT + - Thu, 27 Aug 2020 19:32:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml index 8919d3d7bcdb8..076de6808107b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml @@ -5,7 +5,7 @@ interactions: CPF number?", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","entities":[{"text":"998.214.865-68","category":"Brazil @@ -25,16 +25,16 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 51708468-566e-4842-8040-bba767c70b62 + - 120bc6cc-6db4-41ef-928e-66bf40ee61ed content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 23 Jul 2020 17:18:49 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '81' + - '75' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml index 9aab4df07b0dc..cb0650e058bae 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 12a8aace-0a2e-4d2f-8f8f-eda36292b9c4 + - 7744a13d-caf7-490e-91c1-2ed98b6aabfa content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:48 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml index e12d677551cfc..21761d6ee6612 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml @@ -4,7 +4,7 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 091a3f26-8289-46b5-84e9-53e768af8099 + - 1b0f61a4-f15f-42c4-99b7-19607b852cb1 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:49 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_korean_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_korean_nfc.yaml new file mode 100644 index 0000000000000..ab64d71e8c5c7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_korean_nfc.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\uc544\uac00 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - bc6a9e60-774c-443a-9c35-6cbffa210d22 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 19:32:21 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '72' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_korean_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_korean_nfd.yaml new file mode 100644 index 0000000000000..cf88fbd01eeae --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_korean_nfd.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\uc544\uac00 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 3362c6da-0e2e-49be-a661-2c55332f2928 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 27 Aug 2020 19:32:21 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '68' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml index 630dc3868ef06..740f8adf3d90f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml @@ -4,7 +4,7 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill - Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.81},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.64}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.81},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.64}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 985c402a-0b74-4e08-99b6-c3e7bd65cb6c + - 30a05f6a-9222-4173-9391-94cbc884ebf5 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 23 Jul 2020 17:18:50 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml deleted file mode 100644 index d6d1481df3b19..0000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml +++ /dev/null @@ -1,44 +0,0 @@ -interactions: -- request: - body: '{"documents": [{"id": "0", "text": "\ud83d\udc69 SSN: 859-98-0987", "language": - "en"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '87' - Content-Type: - - application/json - User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) - method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false - response: - body: - string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. - Social Security Number (SSN)","offset":7,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' - headers: - apim-request-id: - - 5adb2043-5e38-41ef-95e6-45e0813a92b5 - content-type: - - application/json; charset=utf-8 - csp-billing-usage: - - CognitiveServices.TextAnalytics.BatchScoring=1 - date: - - Tue, 04 Aug 2020 22:02:53 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '65' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml index 915900cec00e5..1671cad6e8531 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - f418d976-9a1d-470a-bf54-f651eae438f4 + - a3493dae-85d1-49d4-a577-6576413cf439 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Thu, 23 Jul 2020 17:18:51 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '71' + - '64' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml index 52010d6d45cdd..c07f6e0572e1b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - b73d414c-77b4-4732-985f-8429761f6f6e + - 90ba8b73-da3b-4018-9991-c3116fb36f3f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5 date: - - Thu, 23 Jul 2020 17:18:51 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '64' + - '74' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml index 8a11ff62aa8b0..14cebef2d0f05 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml @@ -4,7 +4,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 610f90f1-6b0e-4da9-b901-a49a0446cb6d + - 8a8147fd-2fc8-4042-a01f-eb9bba5c40fc content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 23 Jul 2020 17:18:52 GMT + - Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '77' + - '74' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml index caf22991e8a19..e0dbd21874852 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml @@ -7,7 +7,7 @@ interactions: {"id": "3", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -17,27 +17,29 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA - Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + Routing Number","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"New + Zealand Social Welfare Number","offset":18,"length":9,"confidenceScore":0.65},{"text":"111000025","category":"Portugal + Tax Identification Number","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 09bb7695-a0b3-4468-8dde-4be27d7a2b82 + - 0e9b80e1-e74f-449b-b08a-771e48bb9c07 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:52 GMT + - Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +47,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '110' + - '137' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml index 4f1f295bfaab8..5a16a3611d43d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - f3aaa4c2-89dd-49e8-9da7-df2a929da79d + - bb48ee12-770a-4d71-a2a7-ea30caa599a9 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:53 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '78' + - '82' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml new file mode 100644 index 0000000000000..ee650032c7a00 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "I work at Microsoft and my phone number + is 333-333-3333", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"333-333-3333","category":"Phone + Number","offset":43,"length":12,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - c2319b95-6fd2-46c9-80e3-06c8f2701825 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Mon, 31 Aug 2020 20:32:54 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '79' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text.yaml new file mode 100644 index 0000000000000..da525c49fea0f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "My SSN is 859-98-0987.", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '80' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://cognitiveusw2dev.azure-api.net/text/analytics/v3.1-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"redactedText":"My SSN is ***********.","id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - c5ba8c84-0e46-471a-b4c8-f02c411c20ec + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Mon, 31 Aug 2020 20:15:43 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '78' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text_v3_1_preview_1.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text_v3_1_preview_1.yaml new file mode 100644 index 0000000000000..621c6af4efd50 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text_v3_1_preview_1.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "My SSN is 859-98-0987.", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '80' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - 4ae026d1-15d1-4d77-8913-46922e72d7cb + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Mon, 31 Aug 2020 19:58:17 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '68' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml index 16bc090742521..89deb9f049d2b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 62420b86-ba2f-4072-8b84-a38812d95461 + - 67817078-fcf6-483e-b95f-23140828b574 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:53 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '77' + - '96' status: code: 200 message: OK @@ -49,7 +49,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -59,9 +59,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -71,7 +71,7 @@ interactions: content-length: - '224' date: - - Thu, 23 Jul 2020 17:18:53 GMT + - Thu, 27 Aug 2020 19:32:21 GMT status: code: 401 message: PermissionDenied @@ -82,7 +82,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -92,21 +92,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 88eb6c1d-7ae6-4cde-b702-c5b9c966fa0d + - 6913efd8-0834-4e52-8e4a-6302c7979d9c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:53 GMT + - Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -114,7 +114,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '73' + - '152' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml index a479942ee575a..1682bfa127c66 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 8b7f87bf-9f61-49a9-8922-df3b7eae9483 + - c94b7e10-ee0b-434e-af07-5054b39c87c1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Thu, 23 Jul 2020 17:18:54 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '61' + - '62' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml index 71e25ea034c56..b53195935671e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml @@ -6,7 +6,7 @@ interactions: "en"}, {"id": "5", "text": "Six", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,20 +16,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - a4ca5330-0c19-4f05-b0f1-340a4811f13f + - 5bdd7340-d5c5-41b6-ac2d-18533938d933 content-type: - application/json; charset=utf-8 date: - - Tue, 04 Aug 2020 21:24:47 GMT + - Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml index 8c49dbc2c0ba0..5f1f3a6d13f5d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 739b9ff6-e3f2-4041-b78b-c2d390ca9ed6 + - 45f74f51-713a-4dc0-adf4-b80ba0f9a268 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:54 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '77' + - '93' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml index ebedb39b5cbb4..22257016f01d4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 0f25d1cb-0166-4738-8795-84c423d91cea + - d60ce436-4886-404e-be9b-f313e803a85b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Thu, 23 Jul 2020 17:18:55 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '89' + - '127' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml index 3662a1b3e4962..4d088496d67b0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml @@ -6,7 +6,7 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -27,14 +27,14 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - cb56e9a0-cd4c-4993-8dfd-73de11e11b05 + - b95c1ece-3f2e-42d3-871c-5ba5c0cdcc84 content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:55 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 4ae9d2f8c7b10..77e7fefa2b5f4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,25 +16,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 1fbd838e-78e4-4f31-82ab-a938eadcc52a + - 79decd0f-84e6-4041-b6be-3e9c1357a2ed content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 23 Jul 2020 17:18:55 GMT + - Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '68' + - '70' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml index ce527caa8a668..2a5d05e6dead1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,7 +6,7 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -27,14 +27,14 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - bd493308-10ac-4a0c-a559-9f7a74ac4850 + - 933a1b16-a91d-4a42-8ca2-3b36645d3dba content-type: - application/json; charset=utf-8 date: - - Thu, 23 Jul 2020 17:18:56 GMT + - Thu, 27 Aug 2020 19:32:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '5' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index c1da00e77783f..fa5f1b115182d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,7 +6,7 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate Connection: @@ -16,25 +16,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: apim-request-id: - - 29a834cb-81ac-47dd-951a-5662f273892f + - a233480b-7b8f-4f17-a2a1-660c7604c3ed content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 23 Jul 2020 17:18:56 GMT + - Thu, 27 Aug 2020 19:32:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '60' + - '56' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml index 04a4bc7abfd3a..f90b091090bab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml @@ -6,33 +6,35 @@ interactions: "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '315' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA - Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil - CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + Routing Number","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"New + Zealand Social Welfare Number","offset":18,"length":9,"confidenceScore":0.65},{"text":"111000025","category":"Portugal + Tax Identification Number","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: c4e0391d-522b-418c-a87e-f72c6c97f98b + apim-request-id: 57420848-7e2e-4cc5-9b35-b09e33f63963 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:44 GMT + date: Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '108' + x-envoy-upstream-service-time: '101' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml index 6d1ee80da1d7c..8ac00eb328030 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml @@ -6,33 +6,35 @@ interactions: "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '315' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA - Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil - CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + Routing Number","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"New + Zealand Social Welfare Number","offset":18,"length":9,"confidenceScore":0.65},{"text":"111000025","category":"Portugal + Tax Identification Number","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 4d0ae1a3-25c0-4790-ab39-081afa0a43a3 + apim-request-id: ee5ca9b1-9705-4a35-b4b8-b06f85d2ca02 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:45 GMT + date: Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '109' + x-envoy-upstream-service-time: '102' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml index 96d6c3d4a0b87..a023c3c9a13a2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml @@ -4,15 +4,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -20,9 +20,9 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Thu, 23 Jul 2020 17:19:45 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml index 4e1306e98bdee..293c2488b3b91 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml @@ -4,23 +4,23 @@ interactions: at.", "language": "english"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '101' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid - model version. Possible values are: latest,2020-04-01,2019-10-01,2020-02-01"}}}' + model version. Possible values are: latest,2019-10-01,2020-02-01,2020-04-01,2020-07-01"}}}' headers: - apim-request-id: ba42b7a5-d3b0-4c87-a0f5-0436156f76b1 + apim-request-id: 43bedb24-bd9c-44ae-90c5-460a32119809 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:45 GMT + date: Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml index 0fe34da57c2b0..4d10c69255dc9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml @@ -748,29 +748,29 @@ interactions: {"id": "1049", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58755' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 995c6d23-0bc5-4396-b3af-96c997a2e97c + apim-request-id: 37da7e75-6c21-445a-aaa6-b55d2da0905d content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:46 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml index 3f1f1d23f729f..0f6d3efba8cfa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml @@ -713,29 +713,29 @@ interactions: "1000", "text": "hello world", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '55962' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch - request contains too many records. Max 1000 records are permitted."}}}' + request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: aa9589a7-7057-4899-8853-64e9a9a4588e + apim-request-id: 81161f83-2b34-4eb4-b8ba-49cc40e927df content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:47 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '14' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml index 5669a1da3adb1..e33bfab35515f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml @@ -6,15 +6,15 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,19 +23,19 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 63a32671-e4f1-4ecf-b8dd-5c58051ebda9 + apim-request-id: 72900d93-a5ad-4ef6-b515-25221980fad3 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:47 GMT + date: Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '1' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -43,31 +43,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 272a4c80-6b40-476f-9d05-701c2a54ea72 + apim-request-id: c999cf14-f1fa-4a82-9cad-5e6c137a84c3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:47 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '92' + x-envoy-upstream-service-time: '83' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -75,15 +75,15 @@ interactions: "es"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -92,11 +92,11 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: f344bd29-a1d2-4109-8499-fc1817740a61 + apim-request-id: 87d50a97-692b-478f-ae4c-ecc742ddc8f2 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:47 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -104,5 +104,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_diacritics_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_diacritics_nfc.yaml new file mode 100644 index 0000000000000..c47f7647102c9 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_diacritics_nfc.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "a\u00f1o SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '83' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Fri, 28 Aug 2020 16:56:28 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_diacritics_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_diacritics_nfd.yaml new file mode 100644 index 0000000000000..ae26beef9a992 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_diacritics_nfd.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "an\u0303o SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '84' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Fri, 28 Aug 2020 16:56:28 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml index 8fe2598fc88b5..63e7992456c06 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml @@ -3,24 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 2d1f109a-17ed-4b83-b1aa-ee11406f4c72 + apim-request-id: c62dcb0e-de00-4c1f-bfeb-4a757297665b content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:48 GMT + date: Thu, 27 Aug 2020 19:32:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml index 032e12b2f14bb..888ba222d32be 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -3,24 +3,24 @@ interactions: body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '58' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: f363c9a3-910b-4437-95f5-b3bfb7d1038c + apim-request-id: 7555b158-b4fd-48db-b80e-907817c236f2 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:48 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml index ca234b3ee88c7..5a5683622b6d0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml @@ -6,15 +6,15 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '5308' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,17 +25,17 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations - see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: f7e35a3b-dfe2-494c-82b7-f3ab5759b8c3 + apim-request-id: bdccbcd2-f4aa-4a08-a823-ee11d6a7e98a content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:49 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml index 164878ac9be1a..df39201ee93d0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml @@ -4,29 +4,29 @@ interactions: :''(", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '98' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: c4071053-3e6e-4bfa-bc65-6a85f13e053f + apim-request-id: 1174b12d-1b69-4ca0-99c8-dc8720bcc910 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 23 Jul 2020 17:19:49 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '79' + x-envoy-upstream-service-time: '102' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml index b5208e4b463e6..a256cdda166f7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml @@ -4,23 +4,23 @@ interactions: "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '150' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: eb8ac9bb-71d3-4895-925d-be0bd9e70da7 + apim-request-id: e67e8d7d-d60e-4925-b11e-87454e545736 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:50 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji.yaml new file mode 100644 index 0000000000000..cdb44d9ae10e4 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Fri, 28 Aug 2020 16:56:27 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_family.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_family.yaml new file mode 100644 index 0000000000000..48ddda9d21a87 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_family.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67 + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '141' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Fri, 28 Aug 2020 16:56:28 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_family_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_family_with_skin_tone_modifier.yaml new file mode 100644 index 0000000000000..1cfa26f6a7f2b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_family_with_skin_tone_modifier.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\ud83c\udffb\u200d\ud83d\udc69\ud83c\udffd\u200d\ud83d\udc67\ud83c\udffe\u200d\ud83d\udc66\ud83c\udfff + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '189' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Fri, 28 Aug 2020 16:56:28 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_with_skin_tone_modifier.yaml new file mode 100644 index 0000000000000..85a8b4c683485 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_emoji_with_skin_tone_modifier.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69\ud83c\udffb SSN: 859-98-0987", + "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '99' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Fri, 28 Aug 2020 16:56:28 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml index 0fcb799634842..a023c3c9a13a2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml @@ -4,15 +4,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '85' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -20,9 +20,9 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Thu, 23 Jul 2020 17:19:49 GMT + date: Thu, 27 Aug 2020 19:32:23 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml index 0bbd383679e5e..2b2f0220f3833 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml @@ -4,15 +4,15 @@ interactions: "Hola", "language": "Spanish"}, {"id": "3", "text": "", "language": "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '153' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -21,11 +21,11 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 04aae24c-cda5-46df-82d8-d00ce1b997e0 + apim-request-id: 7c0d7dc0-d0c1-41fb-9e65-70d574e289b6 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:50 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -33,5 +33,5 @@ interactions: status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml index a1bd4c36a655e..1bd044ee937d9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml @@ -5,15 +5,15 @@ interactions: CPF number?", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '192' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","entities":[{"text":"998.214.865-68","category":"Brazil @@ -21,18 +21,18 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: b41905c9-2f2d-40ee-821e-2482d4882b61 + apim-request-id: 99992683-434e-48e9-8201-3f7adeb81f56 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 23 Jul 2020 17:19:50 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '79' + x-envoy-upstream-service-time: '80' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml index 07bf4a04c6db6..c70b9fe8f0b97 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml @@ -4,30 +4,30 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: a77e3fea-6c23-477f-8a72-3885cb74e89f + apim-request-id: f6023f95-fa23-444a-8eb2-63a3738839f8 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:51 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml index ab4b47342a6bc..3242cf3439670 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml @@ -4,30 +4,30 @@ interactions: in an invalid language hint", "language": "notalanguage"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '134' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 439917d9-3122-42b3-923f-f45d5927a520 + apim-request-id: 3ec87b00-53b7-4a4e-8e81-918ae5c25aa3 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:51 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '1' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_korean_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_korean_nfc.yaml new file mode 100644 index 0000000000000..906c950775e96 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_korean_nfc.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\uc544\uac00 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: f7cdcc8b-eb6f-4a04-8e6d-77d2eaeaf8f9 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 19:32:24 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '68' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_korean_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_korean_nfd.yaml new file mode 100644 index 0000000000000..52e339150f694 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_korean_nfd.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\uc544\uac00 SSN: 859-98-0987", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":8,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 297a6648-784e-4424-8019-1085237d7a5d + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Thu, 27 Aug 2020 19:32:24 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '62' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml index 4c931318f80ba..66e98bebbf334 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml @@ -4,30 +4,30 @@ interactions: "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '93' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill - Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.81},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.64}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.81},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.64}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e612f043-5b57-4974-ac8f-8eaca05cdffe + apim-request-id: 5ad422ee-f8c3-47f5-b78c-b23eea574c45 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 23 Jul 2020 17:19:52 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '72' + x-envoy-upstream-service-time: '68' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml deleted file mode 100644 index 002d22e7cd3e7..0000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml +++ /dev/null @@ -1,33 +0,0 @@ -interactions: -- request: - body: '{"documents": [{"id": "0", "text": "\ud83d\udc69 SSN: 859-98-0987", "language": - "en"}]}' - headers: - Accept: - - application/json - Content-Length: - - '87' - Content-Type: - - application/json - User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) - method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false - response: - body: - string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. - Social Security Number (SSN)","offset":7,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' - headers: - apim-request-id: 81958835-c65b-4944-8be5-3da9d1ba3f16 - content-type: application/json; charset=utf-8 - csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Tue, 04 Aug 2020 22:02:53 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '77' - status: - code: 200 - message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false -version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml index 8854aaac4d1a6..857d88682d611 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: d2c34707-fd54-46d1-afcb-6428d916171f + apim-request-id: 3cafa2e1-fbcd-44c7-ab11-726dd74bcdf4 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Thu, 23 Jul 2020 17:19:52 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '65' + x-envoy-upstream-service-time: '61' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml index 5f4753385eaba..2d35ef44ed908 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '249' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 10d501bf-1bf5-48be-85bd-818a8a4d6bb3 + apim-request-id: a9661dd9-24be-4466-ac59-8898ad3661f8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 - date: Thu, 23 Jul 2020 17:19:53 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '75' + x-envoy-upstream-service-time: '78' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml index 61672923a8120..7aefaccbeec8d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml @@ -4,29 +4,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '86' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 6ab92cde-4042-45d2-913b-d6dad6184a02 + apim-request-id: 55a5b072-c151-49b2-9852-54c9133df269 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 23 Jul 2020 17:19:53 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '67' + x-envoy-upstream-service-time: '66' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml index 49919db5c1a5f..6ec3272c45738 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml @@ -7,35 +7,37 @@ interactions: {"id": "3", "text": "", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '358' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA - Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + Routing Number","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"New + Zealand Social Welfare Number","offset":18,"length":9,"confidenceScore":0.65},{"text":"111000025","category":"Portugal + Tax Identification Number","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 21f124c4-b892-42b9-be5e-3a0e28bc5a7b + apim-request-id: b251a5b4-7fef-4e29-9983-f3f5bd7cdd63 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:54 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '138' + x-envoy-upstream-service-time: '161' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml index 41c33df290daf..41c7c0931bed7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '236' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 6fa308e2-4146-49ac-8ce0-0a2e16abfe4b + apim-request-id: 1a93da83-85eb-4aac-8926-e1ca29043a33 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:55 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '76' + x-envoy-upstream-service-time: '114' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml new file mode 100644 index 0000000000000..7395d5ac2e411 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "I work at Microsoft and my phone number + is 333-333-3333", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"333-333-3333","category":"Phone + Number","offset":43,"length":12,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 9265752d-3262-4dbb-94d6-be26889e3db9 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Mon, 31 Aug 2020 20:32:55 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '82' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text.yaml new file mode 100644 index 0000000000000..df78eca471132 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "My SSN is 859-98-0987.", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '80' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://cognitiveusw2dev.azure-api.net/text/analytics/v3.1-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"redactedText":"My SSN is ***********.","id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: dc638432-dc71-4f52-aadb-829c2dfd1935 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Mon, 31 Aug 2020 20:15:43 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '80' + status: + code: 200 + message: OK + url: https://cognitiveusw2dev.azure-api.net//text/analytics/v3.1-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text_v3_1_preview_1.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text_v3_1_preview_1.yaml new file mode 100644 index 0000000000000..55b101e7b851e --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text_v3_1_preview_1.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "My SSN is 859-98-0987.", "language": + "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '80' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: eeda4dd4-74dd-4e54-88cb-5a0352f065cf + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Mon, 31 Aug 2020 19:58:17 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '106' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml index 7240fb83ad835..197e7a7b620fd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e2afbde5-c8c3-449e-a0e2-bb5614441303 + apim-request-id: f2635c08-1d74-485b-8b1c-514cd9c61542 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:54 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '89' + x-envoy-upstream-service-time: '90' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -38,15 +38,15 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -54,11 +54,11 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Thu, 23 Jul 2020 17:19:54 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT status: code: 401 message: PermissionDenied - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -66,29 +66,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 2b14ce51-9676-4d12-9b44-097d78573dfb + apim-request-id: aeb55f41-e114-480a-a2ba-7e5250f22f08 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:55 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '93' + x-envoy-upstream-service-time: '73' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml index 84d162bbfe7c2..9977aacfda814 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml @@ -6,31 +6,31 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '241' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document - text is empty."}}}],"modelVersion":"2020-04-01"}' + text is empty."}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 78db8b35-0650-43b1-a905-2cd921c8d718 + apim-request-id: d5e8fa24-c0ea-446c-82ce-465afd420a54 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Thu, 23 Jul 2020 17:19:55 GMT + date: Thu, 27 Aug 2020 19:32:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '66' + x-envoy-upstream-service-time: '63' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml index c7dc13663acac..56706be0ec8ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml @@ -6,29 +6,29 @@ interactions: "en"}, {"id": "5", "text": "Six", "language": "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '295' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 1cf45e2b-3522-4d49-9607-067c075b1345 + apim-request-id: 8525f819-bc0c-4ff5-9a0f-52759fb16d7f content-type: application/json; charset=utf-8 - date: Tue, 04 Aug 2020 21:24:48 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml index d8f59385c8582..fdc25f6346bac 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml @@ -6,29 +6,29 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 0893dd3a-bf7e-41d4-bcab-e428b9b5d47d + apim-request-id: 39ee2ff0-2d84-4625-9124-3cc5685c1bc6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:57 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '83' + x-envoy-upstream-service-time: '97' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml index 621a498dac4eb..5e701f52db693 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml @@ -6,29 +6,29 @@ interactions: was not as good as I hoped.", "language": ""}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '273' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: - string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 5bb21583-5cc7-4ab1-a81e-b7fcf1236fad + apim-request-id: 127e5be5-8c8e-45da-a6ec-e30c204e9999 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Thu, 23 Jul 2020 17:19:58 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '131' + x-envoy-upstream-service-time: '115' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml index afb081801c193..2d0224ebfafe3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml @@ -6,15 +6,15 @@ interactions: was not as good as I hoped.", "language": "fr"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '279' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -23,17 +23,17 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: e8eae430-8838-4fda-9dd5-ae283cbdd325 + apim-request-id: c0c5352c-a4ec-42b1-a305-152abfb9eb50 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:58 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 57c8e5b5bf65d..0853da6e78e23 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -6,33 +6,33 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '240' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 79b03f0e-bebb-4096-8010-14fb8734dadd + apim-request-id: dbf6df1e-c572-4af1-8b8b-1c99573fbc50 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 23 Jul 2020 17:19:57 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '80' + x-envoy-upstream-service-time: '92' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml index d94542bb0494b..560f9f00effea 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -6,15 +6,15 @@ interactions: "de"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,17 +23,17 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: c6aa447e-1084-4062-965a-ad3db86ab494 + apim-request-id: b8a22188-a7ee-4271-9b97-8ac6d0d94087 content-type: application/json; charset=utf-8 - date: Thu, 23 Jul 2020 17:19:59 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '1' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index b6435020ea8fb..55daf2e0fd944 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -6,33 +6,33 @@ interactions: "en"}]}' headers: Accept: - - application/json + - application/json, text/json Content-Length: - '253' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + language code. Supported languages: en"}}}],"modelVersion":"2020-07-01"}' headers: - apim-request-id: 718b9664-7ee9-49ed-8d15-243f632afe44 + apim-request-id: fa6a6003-0b1f-41a1-be65-36b4407fd016 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Thu, 23 Jul 2020 17:19:58 GMT + date: Thu, 27 Aug 2020 19:32:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '64' + x-envoy-upstream-service-time: '58' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_zalgo_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_zalgo_text.yaml new file mode 100644 index 0000000000000..4adce716edfed --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_zalgo_text.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "o\u0335\u0308\u0307\u0312\u0303\u034b\u0307\u0305\u035b\u030b\u035b\u030e\u0341\u0351\u0304\u0310\u0302\u030e\u031b\u0357\u035d\u0333\u0318\u0318\u0355\u0354\u0355\u0327\u032d\u0327\u031f\u0319\u034e\u0348\u031e\u0322\u0354m\u0335\u035d\u0315\u0304\u030f\u0360\u034c\u0302\u0311\u033d\u034d\u0349\u0317g\u0335\u030b\u0352\u0344\u0360\u0313\u0312\u0308\u030d\u030c\u0343\u0305\u0351\u0312\u0343\u0305\u0305\u0352\u033f\u030f\u0301\u0357\u0300\u0307\u035b\u030f\u0300\u031b\u0344\u0300\u030a\u033e\u0340\u035d\u0314\u0349\u0322\u031e\u0321\u032f\u0320\u0324\u0323\u0355\u0322\u031f\u032b\u032b\u033c\u0330\u0353\u0345\u0321\u0328\u0326\u0321\u0356\u035c\u0327\u0323\u0323\u034e + SSN: 859-98-0987", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '750' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Fri, 28 Aug 2020 16:56:28 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py index 27f8b6466927e..0205cd265cb38 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py @@ -16,7 +16,7 @@ TextAnalyticsClient, TextDocumentInput, VERSION, - TextAnalyticsApiVersion + TextAnalyticsApiVersion, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -665,3 +665,30 @@ def test_opinion_mining_v3(self, client): client.analyze_sentiment(["will fail"], show_opinion_mining=True) assert "'show_opinion_mining' is only available for API version v3.1-preview.1 and up" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_offset_length(self, client): + result = client.analyze_sentiment(["I like nature. I do not like being inside"]) + sentences = result[0].sentences + self.assertEqual(sentences[0].offset, 0) + self.assertEqual(sentences[0].length, 14) + self.assertEqual(sentences[1].offset, 15) + self.assertEqual(sentences[1].length, 26) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_no_offset_length_v3_sentence_sentiment(self, client): + result = client.analyze_sentiment(["I like nature. I do not like being inside"]) + sentences = result[0].sentences + self.assertIsNone(sentences[0].offset) + self.assertIsNone(sentences[0].length) + self.assertIsNone(sentences[1].offset) + self.assertIsNone(sentences[1].length) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + client.analyze_sentiment(["please don't fail"]) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py index 77320c796ffcc..5ff9656e6fc30 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py @@ -17,7 +17,7 @@ VERSION, DetectLanguageInput, TextDocumentInput, - TextAnalyticsApiVersion + TextAnalyticsApiVersion, ) from testcase import GlobalTextAnalyticsAccountPreparer @@ -681,3 +681,30 @@ async def test_opinion_mining_v3(self, client): await client.analyze_sentiment(["will fail"], show_opinion_mining=True) assert "'show_opinion_mining' is only available for API version v3.1-preview.1 and up" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_offset_length(self, client): + result = await client.analyze_sentiment(["I like nature. I do not like being inside"]) + sentences = result[0].sentences + self.assertEqual(sentences[0].offset, 0) + self.assertEqual(sentences[0].length, 14) + self.assertEqual(sentences[1].offset, 15) + self.assertEqual(sentences[1].length, 26) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_no_offset_length_v3_sentence_sentiment(self, client): + result = await client.analyze_sentiment(["I like nature. I do not like being inside"]) + sentences = result[0].sentences + self.assertIsNone(sentences[0].offset) + self.assertIsNone(sentences[0].length) + self.assertIsNone(sentences[1].offset) + self.assertIsNone(sentences[1].length) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + await client.analyze_sentiment(["please don't fail"]) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language.py index 2a25dea3f3e08..abc85d1358fa0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language.py @@ -16,7 +16,8 @@ DetectLanguageInput, TextAnalyticsClient, DetectLanguageInput, - VERSION + VERSION, + TextAnalyticsApiVersion, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -590,3 +591,10 @@ def callback(pipeline_response, deserialized, _): cls=callback ) assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + client.detect_language(["please don't fail"]) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py index 5c8c0cc2aaad3..cfd7965b517af 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py @@ -16,7 +16,8 @@ from azure.ai.textanalytics import ( VERSION, DetectLanguageInput, - DetectLanguageInput + DetectLanguageInput, + TextAnalyticsApiVersion, ) from testcase import GlobalTextAnalyticsAccountPreparer @@ -603,3 +604,10 @@ def callback(pipeline_response, deserialized, _): cls=callback ) assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + await client.detect_language(["please don't fail"]) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py new file mode 100644 index 0000000000000..f7494d6fdcbed --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest +import platform +import functools + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential +from testcase import TextAnalyticsTest, GlobalTextAnalyticsAccountPreparer +from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer +from azure.ai.textanalytics import TextAnalyticsClient + +# pre-apply the client_cls positional argument so it needn't be explicitly passed below +# the first one +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + +# TODO: add back offset and length checks throughout this test once I add them + +class TestEncoding(TextAnalyticsTest): + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_emoji(self, client): + result = client.recognize_pii_entities(["👩 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 7) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_emoji_with_skin_tone_modifier(self, client): + result = client.recognize_pii_entities(["👩🏻 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 8) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_emoji_family(self, client): + result = client.recognize_pii_entities(["👩‍👩‍👧‍👧 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 13) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_emoji_family_with_skin_tone_modifier(self, client): + result = client.recognize_pii_entities(["👩🏻‍👩🏽‍👧🏾‍👦🏿 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 17) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_diacritics_nfc(self, client): + result = client.recognize_pii_entities(["año SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 9) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_diacritics_nfd(self, client): + result = client.recognize_pii_entities(["año SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 10) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_korean_nfc(self, client): + result = client.recognize_pii_entities(["아가 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 8) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_korean_nfd(self, client): + result = client.recognize_pii_entities(["아가 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 8) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_zalgo_text(self, client): + result = client.recognize_pii_entities(["ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ SSN: 859-98-0987"]) + + + self.assertEqual(result[0].entities[0].offset, 121) + self.assertEqual(result[0].entities[0].length, 11) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding_async.py new file mode 100644 index 0000000000000..83868cb5d4d13 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding_async.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest +import platform +import functools + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential +from testcase import GlobalTextAnalyticsAccountPreparer +from asynctestcase import AsyncTextAnalyticsTest +from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer +from azure.ai.textanalytics.aio import TextAnalyticsClient + +# pre-apply the client_cls positional argument so it needn't be explicitly passed below +# the first one +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + +# TODO: add back offset and length checks throughout this test once I add them + +class TestEncoding(AsyncTextAnalyticsTest): + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_emoji(self, client): + result = await client.recognize_pii_entities(["👩 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 7) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_emoji_with_skin_tone_modifier(self, client): + result = await client.recognize_pii_entities(["👩🏻 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 8) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_emoji_family(self, client): + result = await client.recognize_pii_entities(["👩‍👩‍👧‍👧 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 13) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_emoji_family_with_skin_tone_modifier(self, client): + result = await client.recognize_pii_entities(["👩🏻‍👩🏽‍👧🏾‍👦🏿 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 17) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_diacritics_nfc(self, client): + result = await client.recognize_pii_entities(["año SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 9) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_diacritics_nfd(self, client): + result = await client.recognize_pii_entities(["año SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 10) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_korean_nfc(self, client): + result = await client.recognize_pii_entities(["아가 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 8) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_korean_nfd(self, client): + result = await client.recognize_pii_entities(["아가 SSN: 859-98-0987"]) + self.assertEqual(result[0].entities[0].offset, 8) + self.assertEqual(result[0].entities[0].length, 11) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_zalgo_text(self, client): + result = await client.recognize_pii_entities(["ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ SSN: 859-98-0987"]) + + + self.assertEqual(result[0].entities[0].offset, 121) + self.assertEqual(result[0].entities[0].length, 11) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py index bf59db3bc4cbe..a8f843e9e4093 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py @@ -15,7 +15,8 @@ from azure.ai.textanalytics import ( TextAnalyticsClient, TextDocumentInput, - VERSION + VERSION, + TextAnalyticsApiVersion, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -527,3 +528,10 @@ def callback(pipeline_response, deserialized, _): cls=callback ) assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + client.extract_key_phrases(["please don't fail"]) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py index e9ac995b87b3a..b9a7b9960e59f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py @@ -16,7 +16,8 @@ from azure.ai.textanalytics import ( VERSION, DetectLanguageInput, - TextDocumentInput + TextDocumentInput, + TextAnalyticsApiVersion, ) from testcase import GlobalTextAnalyticsAccountPreparer @@ -542,3 +543,10 @@ def callback(pipeline_response, deserialized, _): cls=callback ) assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + await client.extract_key_phrases(["please don't fail"]) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_json_pointer.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_json_pointer.py new file mode 100644 index 0000000000000..211891e638cef --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_json_pointer.py @@ -0,0 +1,111 @@ +# 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 pytest +from azure.ai.textanalytics._models import ( + AnalyzeSentimentResult, + AspectSentiment, + OpinionSentiment, + SentenceSentiment, + _get_indices, +) + +from azure.ai.textanalytics._response_handlers import sentiment_result + +from azure.ai.textanalytics._generated.v3_1_preview_1 import models as _generated_models + + +@pytest.fixture +def generated_aspect_opinion_confidence_scores(): + return _generated_models.AspectConfidenceScoreLabel( + positive=1.0, + neutral=0.0, + negative=0.0, + ) + +@pytest.fixture +def generated_sentiment_confidence_score(): + return _generated_models.SentimentConfidenceScorePerLabel( + positive=1.0, + neutral=0.0, + negative=0.0, + ) + +@pytest.fixture +def generated_aspect_relation(): + return _generated_models.AspectRelation( + relation_type="opinion", + ref="#/documents/0/sentences/1/opinions/0" + ) + +@pytest.fixture +def generated_aspect(generated_aspect_opinion_confidence_scores, generated_aspect_relation): + return _generated_models.SentenceAspect( + text="aspect", + sentiment="positive", + confidence_scores=generated_aspect_opinion_confidence_scores, + offset=0, + length=6, + relations=[generated_aspect_relation], + ) + +@pytest.fixture +def generated_opinion(generated_aspect_opinion_confidence_scores): + return _generated_models.SentenceOpinion( + text="good", + sentiment="positive", + confidence_scores=generated_aspect_opinion_confidence_scores, + offset=0, + length=4, + is_negated=False, + ) + +def generated_sentence_sentiment(generated_sentiment_confidence_score, index, aspects=[], opinions=[]): + return _generated_models.SentenceSentiment( + text="not relevant", + sentiment="positive", + confidence_scores=generated_sentiment_confidence_score, + offset=0, + length=12, + aspects=aspects, + opinions=opinions, + ) + +@pytest.fixture +def generated_document_sentiment(generated_aspect, generated_opinion, generated_sentiment_confidence_score): + aspect_sentence = generated_sentence_sentiment(generated_sentiment_confidence_score, index=0, aspects=[generated_aspect]) + opinion_sentence = generated_sentence_sentiment(generated_sentiment_confidence_score, index=1, opinions=[generated_opinion]) + + return _generated_models.DocumentSentiment( + id=1, + sentiment="positive", + confidence_scores=generated_sentiment_confidence_score, + sentences=[aspect_sentence, opinion_sentence], + warnings=[], + ) + +@pytest.fixture +def generated_sentiment_response(generated_document_sentiment): + return _generated_models.SentimentResponse( + documents=[generated_document_sentiment], + errors=[], + model_version="0000-00-00", + ) + + +class TestJsonPointer(): + + def test_json_pointer_parsing(self): + assert [1, 0, 15] == _get_indices("#/documents/1/sentences/0/opinions/15") + + def test_opinion_different_sentence_aspect(self, generated_sentiment_response): + # the first sentence has the aspect, and the second sentence has the opinion + # the desired behavior is the first wrapped sentence object has an aspect, and it's opinion + # is in the second sentence. + # the second sentence will have no mined opinions, since we define that as an aspect and opinion duo + wrapped_sentiment = sentiment_result(response="not relevant", obj=generated_sentiment_response, response_headers={})[0] + assert wrapped_sentiment.sentences[0].mined_opinions[0].opinions[0].text == "good" + assert not wrapped_sentiment.sentences[1].mined_opinions diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py index 02833c8926ae8..fcfea2889843c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py @@ -15,7 +15,8 @@ from azure.ai.textanalytics import ( TextAnalyticsClient, TextDocumentInput, - VERSION + VERSION, + TextAnalyticsApiVersion, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -543,3 +544,38 @@ def callback(pipeline_response, deserialized, _): cls=callback ) assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_offset_length(self, client): + result = client.recognize_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + entities = result[0].entities + + self.assertEqual(entities[0].offset, 0) + self.assertEqual(entities[0].length, 9) + + self.assertEqual(entities[1].offset, 25) + self.assertEqual(entities[1].length, 10) + + self.assertEqual(entities[2].offset, 40) + self.assertEqual(entities[2].length, 10) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_no_offset_length_v3_categorized_entities(self, client): + result = client.recognize_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + entities = result[0].entities + + self.assertIsNone(entities[0].offset) + self.assertIsNone(entities[0].length) + self.assertIsNone(entities[1].offset) + self.assertIsNone(entities[1].length) + self.assertIsNone(entities[2].offset) + self.assertIsNone(entities[2].length) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + client.recognize_entities(["please don't fail"]) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py index fb2c3dc10d134..eee520fb7a9dc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py @@ -16,7 +16,8 @@ from azure.ai.textanalytics import ( VERSION, DetectLanguageInput, - TextDocumentInput + TextDocumentInput, + TextAnalyticsApiVersion, ) from testcase import GlobalTextAnalyticsAccountPreparer @@ -562,3 +563,38 @@ def callback(pipeline_response, deserialized, _): cls=callback ) assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_offset_length(self, client): + result = await client.recognize_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + entities = result[0].entities + + self.assertEqual(entities[0].offset, 0) + self.assertEqual(entities[0].length, 9) + + self.assertEqual(entities[1].offset, 25) + self.assertEqual(entities[1].length, 10) + + self.assertEqual(entities[2].offset, 40) + self.assertEqual(entities[2].length, 10) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_no_offset_length_v3_categorized_entities(self, client): + result = await client.recognize_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + entities = result[0].entities + + self.assertIsNone(entities[0].offset) + self.assertIsNone(entities[0].length) + self.assertIsNone(entities[1].offset) + self.assertIsNone(entities[1].length) + self.assertIsNone(entities[2].offset) + self.assertIsNone(entities[2].length) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + await client.recognize_entities(["please don't fail"]) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py index 2eb8989c066e8..3701e1d58e714 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py @@ -3,7 +3,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ - +import os import pytest import platform import functools @@ -15,7 +15,8 @@ from azure.ai.textanalytics import ( TextAnalyticsClient, TextDocumentInput, - VERSION + VERSION, + TextAnalyticsApiVersion, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -545,3 +546,57 @@ def callback(pipeline_response, deserialized, _): cls=callback ) assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_offset_length(self, client): + result = client.recognize_linked_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + entities = result[0].entities + + # the entities are being returned in a non-sequential order by the service + microsoft_entity = [entity for entity in entities if entity.name == "Microsoft"][0] + bill_gates_entity = [entity for entity in entities if entity.name == "Bill Gates"][0] + paul_allen_entity = [entity for entity in entities if entity.name == "Paul Allen"][0] + + self.assertEqual(microsoft_entity.matches[0].offset, 0) + self.assertEqual(microsoft_entity.matches[0].length, 9) + + self.assertEqual(bill_gates_entity.matches[0].offset, 25) + self.assertEqual(bill_gates_entity.matches[0].length, 10) + + self.assertEqual(paul_allen_entity.matches[0].offset, 40) + self.assertEqual(paul_allen_entity.matches[0].length, 10) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_no_offset_length_v3_linked_entity_match(self, client): + result = client.recognize_linked_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + entities = result[0].entities + + self.assertIsNone(entities[0].matches[0].offset) + self.assertIsNone(entities[0].matches[0].length) + self.assertIsNone(entities[1].matches[0].offset) + self.assertIsNone(entities[1].matches[0].length) + self.assertIsNone(entities[2].matches[0].offset) + self.assertIsNone(entities[2].matches[0].length) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + client.recognize_linked_entities(["please don't fail"]) + + # currently only have this as playback since the dev endpoint is unreliable + @pytest.mark.playback_test_only + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={ + "api_version": TextAnalyticsApiVersion.V3_1_PREVIEW_2, + "text_analytics_account_key": os.environ.get('AZURE_TEXT_ANALYTICS_KEY'), + "text_analytics_account": "https://cognitiveusw2dev.azure-api.net/" + }) + def test_bing_id(self, client): + result = client.recognize_linked_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + for doc in result: + for entity in doc.entities: + assert entity.bing_entity_search_api_id # this checks if it's None and if it's empty diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py index c3aa9c522a68b..4a2488da0c80b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py @@ -3,7 +3,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ - +import os import pytest import platform import functools @@ -16,7 +16,8 @@ from azure.ai.textanalytics import ( VERSION, DetectLanguageInput, - TextDocumentInput + TextDocumentInput, + TextAnalyticsApiVersion, ) from testcase import GlobalTextAnalyticsAccountPreparer @@ -581,3 +582,57 @@ def callback(pipeline_response, deserialized, _): cls=callback ) assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_offset_length(self, client): + result = await client.recognize_linked_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + entities = result[0].entities + + # the entities are being returned in a non-sequential order by the service + microsoft_entity = [entity for entity in entities if entity.name == "Microsoft"][0] + bill_gates_entity = [entity for entity in entities if entity.name == "Bill Gates"][0] + paul_allen_entity = [entity for entity in entities if entity.name == "Paul Allen"][0] + + self.assertEqual(microsoft_entity.matches[0].offset, 0) + self.assertEqual(microsoft_entity.matches[0].length, 9) + + self.assertEqual(bill_gates_entity.matches[0].offset, 25) + self.assertEqual(bill_gates_entity.matches[0].length, 10) + + self.assertEqual(paul_allen_entity.matches[0].offset, 40) + self.assertEqual(paul_allen_entity.matches[0].length, 10) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_no_offset_length_v3_linked_entity_match(self, client): + result = await client.recognize_linked_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + entities = result[0].entities + + self.assertIsNone(entities[0].matches[0].offset) + self.assertIsNone(entities[0].matches[0].length) + self.assertIsNone(entities[1].matches[0].offset) + self.assertIsNone(entities[1].matches[0].length) + self.assertIsNone(entities[2].matches[0].offset) + self.assertIsNone(entities[2].matches[0].length) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_string_index_type_not_fail_v3(self, client): + # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't + # cause v3.0 calls to fail + await client.recognize_linked_entities(["please don't fail"]) + + # currently only have this as playback since the dev endpoint is unreliable + @pytest.mark.playback_test_only + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={ + "api_version": TextAnalyticsApiVersion.V3_1_PREVIEW_2, + "text_analytics_account_key": os.environ.get('AZURE_TEXT_ANALYTICS_KEY'), + "text_analytics_account": "https://cognitiveusw2dev.azure-api.net/" + }) + async def test_bing_id(self, client): + result = await client.recognize_linked_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + for doc in result: + for entity in doc.entities: + assert entity.bing_entity_search_api_id # this checks if it's None and if it's empty diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py index ed046172df381..fbafdb0e446ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py @@ -3,7 +3,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ - +import os import pytest import platform import functools @@ -15,7 +15,9 @@ from azure.ai.textanalytics import ( TextAnalyticsClient, TextDocumentInput, - VERSION + VERSION, + TextAnalyticsApiVersion, + PiiEntityDomainType, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -85,13 +87,6 @@ def test_all_successful_passing_text_document_input(self, client): self.assertNotEqual(entity.length, 0) self.assertIsNotNone(entity.confidence_score) - @GlobalTextAnalyticsAccountPreparer() - @TextAnalyticsClientPreparer() - def test_length_with_emoji(self, client): - result = client.recognize_pii_entities(["👩 SSN: 859-98-0987"]) - self.assertEqual(result[0].entities[0].offset, 7) - self.assertEqual(result[0].entities[0].length, 11) - @GlobalTextAnalyticsAccountPreparer() @TextAnalyticsClientPreparer() def test_passing_only_string(self, client): @@ -572,3 +567,42 @@ def callback(response): language="en", raw_response_hook=callback ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + def test_recognize_pii_entities_v3(self, client): + with pytest.raises(NotImplementedError) as excinfo: + client.recognize_pii_entities(["this should fail"]) + + assert "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" in str(excinfo.value) + + # currently only have this as playback since the dev endpoint is unreliable + @pytest.mark.playback_test_only + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={ + "api_version": TextAnalyticsApiVersion.V3_1_PREVIEW_2, + "text_analytics_account_key": os.environ.get('AZURE_TEXT_ANALYTICS_KEY'), + "text_analytics_account": "https://cognitiveusw2dev.azure-api.net/" + }) + def test_redacted_text(self, client): + result = client.recognize_pii_entities(["My SSN is 859-98-0987."]) + self.assertEqual("My SSN is ***********.", result[0].redacted_text) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_redacted_text_v3_1_preview_1(self, client): + result = client.recognize_pii_entities(["My SSN is 859-98-0987."]) + self.assertIsNone(result[0].redacted_text) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_phi_domain_filter(self, client): + # without the domain filter, this should return two entities: Microsoft as an org, + # and the phone number. With the domain filter, it should only return one. + result = client.recognize_pii_entities( + ["I work at Microsoft and my phone number is 333-333-3333"], + domain_filter=PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION + ) + self.assertEqual(len(result[0].entities), 1) + self.assertEqual(result[0].entities[0].text, '333-333-3333') + self.assertEqual(result[0].entities[0].category, 'Phone Number') diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py index 361ef60bd42c4..863504c2ebbc4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py @@ -3,7 +3,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ - +import os import pytest import platform import functools @@ -17,6 +17,8 @@ from azure.ai.textanalytics import ( TextDocumentInput, VERSION, + TextAnalyticsApiVersion, + PiiEntityDomainType, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -83,13 +85,6 @@ async def test_all_successful_passing_text_document_input(self, client): self.assertIsNotNone(entity.length) self.assertIsNotNone(entity.confidence_score) - @GlobalTextAnalyticsAccountPreparer() - @TextAnalyticsClientPreparer() - async def test_length_with_emoji(self, client): - result = await client.recognize_pii_entities(["👩 SSN: 859-98-0987"]) - self.assertEqual(result[0].entities[0].offset, 7) - self.assertEqual(result[0].entities[0].length, 11) - @GlobalTextAnalyticsAccountPreparer() @TextAnalyticsClientPreparer() async def test_passing_only_string(self, client): @@ -570,3 +565,42 @@ def callback(response): language="en", raw_response_hook=callback ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) + async def test_recognize_pii_entities_v3(self, client): + with pytest.raises(NotImplementedError) as excinfo: + await client.recognize_pii_entities(["this should fail"]) + + assert "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" in str(excinfo.value) + + # currently only have this as playback since the dev endpoint is unreliable + @pytest.mark.playback_test_only + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={ + "api_version": TextAnalyticsApiVersion.V3_1_PREVIEW_2, + "text_analytics_account_key": os.environ.get('AZURE_TEXT_ANALYTICS_KEY'), + "text_analytics_account": "https://cognitiveusw2dev.azure-api.net/" + }) + async def test_redacted_text(self, client): + result = await client.recognize_pii_entities(["My SSN is 859-98-0987."]) + self.assertEqual("My SSN is ***********.", result[0].redacted_text) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_redacted_text_v3_1_preview_1(self, client): + result = await client.recognize_pii_entities(["My SSN is 859-98-0987."]) + self.assertIsNone(result[0].redacted_text) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_phi_domain_filter(self, client): + # without the domain filter, this should return two entities: Microsoft as an org, + # and the phone number. With the domain filter, it should only return one. + result = await client.recognize_pii_entities( + ["I work at Microsoft and my phone number is 333-333-3333"], + domain_filter=PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION + ) + self.assertEqual(len(result[0].entities), 1) + self.assertEqual(result[0].entities[0].text, '333-333-3333') + self.assertEqual(result[0].entities[0].category, 'Phone Number') diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py index eca9da158bffb..602c910bdcd31 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py @@ -116,12 +116,15 @@ def linked_entity(linked_entity_match): language="English", data_source_entity_id="Bill Gates", url="https://en.wikipedia.org/wiki/Bill_Gates", - data_source="wikipedia" + data_source="wikipedia", + bing_entity_search_api_id="12345678" ) model_repr = ( "LinkedEntity(name=Bill Gates, matches=[{}, {}], "\ "language=English, data_source_entity_id=Bill Gates, "\ - "url=https://en.wikipedia.org/wiki/Bill_Gates, data_source=wikipedia)".format(linked_entity_match[1], linked_entity_match[1]) + "url=https://en.wikipedia.org/wiki/Bill_Gates, data_source=wikipedia, bing_entity_search_api_id=12345678)".format( + linked_entity_match[1], linked_entity_match[1] + ) ) assert repr(model) == model_repr return model, model_repr @@ -287,11 +290,13 @@ def test_recognize_pii_entities_result(self, pii_entity, text_analytics_warning, model = _models.RecognizePiiEntitiesResult( id="1", entities=[pii_entity[0]], + redacted_text="***********", warnings=[text_analytics_warning[0]], statistics=text_document_statistics[0], is_error=False ) - model_repr = "RecognizePiiEntitiesResult(id=1, entities=[{}], warnings=[{}], statistics={}, is_error=False)".format( + model_repr = "RecognizePiiEntitiesResult(id=1, entities=[{}], redacted_text=***********, warnings=[{}], " \ + "statistics={}, is_error=False)".format( pii_entity[1], text_analytics_warning[1], text_document_statistics[1] ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_unittests.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_unittests.py deleted file mode 100644 index 1ec9d72224eb9..0000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_unittests.py +++ /dev/null @@ -1,14 +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. -# -------------------------------------------------------------------------- -from azure.ai.textanalytics._models import _get_indices -from testcase import TextAnalyticsTest - - -class TestUnittests(TextAnalyticsTest): - - def test_json_pointer_parsing(self): - assert [1, 0, 15] == _get_indices("#/documents/1/sentences/0/opinions/15") diff --git a/sdk/textanalytics/ci.yml b/sdk/textanalytics/ci.yml index 6e43364cfcce1..00842af2116b5 100644 --- a/sdk/textanalytics/ci.yml +++ b/sdk/textanalytics/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -34,4 +33,4 @@ extends: - name: azure_ai_textanalytics safeName: azureaitextanalytics - name: azure_ai_nspkg - safeName: azureainspkg \ No newline at end of file + safeName: azureainspkg diff --git a/sdk/timeseriesinsights/ci.yml b/sdk/timeseriesinsights/ci.yml index a7320505b2171..c1aa0f2f3d3ab 100644 --- a/sdk/timeseriesinsights/ci.yml +++ b/sdk/timeseriesinsights/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: timeseriesinsights Artifacts: - name: azure_mgmt_timeseriesinsights - safeName: azuremgmttimeseriesinsights \ No newline at end of file + safeName: azuremgmttimeseriesinsights diff --git a/sdk/trafficmanager/ci.yml b/sdk/trafficmanager/ci.yml index d5c6ea8abb887..903dc59851cd5 100644 --- a/sdk/trafficmanager/ci.yml +++ b/sdk/trafficmanager/ci.yml @@ -1,5 +1,4 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: branches: @@ -30,4 +29,4 @@ extends: ServiceDirectory: trafficmanager Artifacts: - name: azure_mgmt_trafficmanager - safeName: azuremgmttrafficmanager \ No newline at end of file + safeName: azuremgmttrafficmanager diff --git a/shared_requirements.txt b/shared_requirements.txt index b0f969160504b..e8075c11025b8 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -10,6 +10,7 @@ azure-common~=1.1 azure-core<2.0.0,>=1.2.2 azure-cosmosdb-table~=1.0 azure-datalake-store~=0.0.18 +azure-data-nspkg<2.0.0,>=1.0.0 azure-eventhub<6.0.0,>=5.0.0 azure-eventgrid~=1.1 azure-graphrbac~=0.40.0 @@ -97,7 +98,7 @@ futures mock typing typing-extensions -msal<2.0.0,>=1.3.0 +msal<1.5.0,>=1.3.0 msal-extensions~=0.2.2 msrest>=0.5.0 msrestazure<2.0.0,>=0.4.32 @@ -119,12 +120,14 @@ isodate>=0.6.0 #override azure-cosmos azure-core<2.0.0,>=1.0.0 #override azure-eventhub azure-core<2.0.0,>=1.5.0 #override azure-identity azure-core<2.0.0,>=1.0.0 +#override azure-keyvault-administration msrest>=0.6.0 #override azure-keyvault-certificates msrest>=0.6.0 #override azure-keyvault-keys msrest>=0.6.0 #override azure-keyvault-secrets msrest>=0.6.0 #override azure-keyvault-certificates azure-core<2.0.0,>=1.7.0 #override azure-keyvault-keys azure-core<2.0.0,>=1.7.0 #override azure-keyvault-secrets azure-core<2.0.0,>=1.7.0 +#override azure-keyvault-administration azure-core<2.0.0,>=1.7.0 #override azure-ai-textanalytics msrest>=0.6.0 #override azure-ai-textanalytics azure-core<2.0.0,>=1.4.0 #override azure-search-documents azure-core<2.0.0,>=1.4.0 @@ -138,7 +141,7 @@ isodate>=0.6.0 #override azure-storage-file-share msrest>=0.6.10 #override azure-storage-file-datalake azure-core<2.0.0,>=1.6.0 #override azure-storage-file-datalake msrest>=0.6.10 -#override azure-storage-file-datalake azure-storage-blob~=12.4.0b1 +#override azure-storage-file-datalake azure-storage-blob~=12.4.0 opencensus>=0.6.0 opencensus-ext-threading opencensus-ext-azure>=0.3.1 @@ -152,7 +155,9 @@ opentelemetry-api==0.10b0 #override azure-servicebus msrest>=0.6.17,<2.0.0 #override azure-servicebus azure-core<2.0.0,>=1.6.0 #override azure-search-documents msrest>=0.6.10 +#override azure-eventgrid azure-core<2.0.0,>=1.7.0 #override azure-synapse-accesscontrol azure-core>=1.6.0,<2.0.0 #override azure-synapse-spark azure-core>=1.6.0,<2.0.0 #override azure-synapse-artifacts azure-core>=1.6.0,<2.0.0 -#override azure-data-tables msrest>=0.6.10 \ No newline at end of file +#override azure-data-tables msrest>=0.6.10 +#override azure-ai-anomalydetector azure-core>=1.6.0,<2.0.0